Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
integrator
/
on-demand
/
subscription
Subscribing an instance
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/integrator/on-demand/subscription \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "withCalls": true
}
'

Overview

Method used to subscribe an instance.
To use Partner endpoints, provide the Partner Token in the Authorization field using the following format: Bearer <Partner-Token>It is not necessary to send the Client-Token in these requests.

Attributes

Optional

withCalls
boolean
Defines whether the instance will be created with call support
The withCalls attribute is optional. If not sent, the request will continue to work normally with the default behavior. This feature is only available for accounts with call functionality enabled.

Request Body

{
  "withCalls": true
}

Response

201

405

Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.

415

If you receive a 415 error, make sure to add the “Content-Type” header to your request, which in most cases is “application/json”.