Skip to main content
POST
/
v1
/
subscriptions
Create a subscription
curl --request POST \
  --url https://api.bondio.co/v1/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "planId": "plan.id1"
}
'
{
  "id": "<string>",
  "esimIccid": "<string>",
  "planId": "<string>",
  "plan": {
    "name": "<string>",
    "dataMegaBytes": 123,
    "periodDays": 123,
    "periodIterations": 1,
    "throttledSpeedKbps": 0,
    "label": "<string>",
    "coverageProfileId": "<string>"
  },
  "createdAt": 123,
  "activatedAt": 123,
  "expireAt": 123,
  "purchasedAllowance": {
    "dataBytes": 1,
    "voiceSeconds": 123,
    "smsMessages": 123
  },
  "remainingAllownace": {
    "dataBytes": 1,
    "voiceSeconds": 123,
    "smsMessages": 123
  },
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Exactly one of the plan or planId must be provided.

planId
string
required

The unique id of a plan. The plan must not be archived or an addon.

plan
object

Response

Returns the created subscription.

id
string
required
esimIccid
string
required
planId
string
required
deprecated
plan
PlanForAttachment · object
required
Example:
{
"name": "Australia 1GB 7d",
"dataMegaBytes": 1024,
"periodDays": 1,
"periodIterations": 7,
"throttledSpeedKbps": 128,
"label": "alpha",
"coverageProfileId": "cvpr_ybrs38es"
}
createdAt
integer
required
activatedAt
integer | null
required
expireAt
integer | null
required
purchasedAllowance
Allowance · object
required
Example:
{
"dataBytes": 1024,
"voiceSeconds": 60,
"smsMessages": 100
}
remainingAllownace
Allowance · object
required
Example:
{
"dataBytes": 1024,
"voiceSeconds": 60,
"smsMessages": 100
}
state
enum<string>
required
Available options:
active,
expired,
ready
metadata
object
required