Skip to main content
GET
/
instances
/
{instanceId}
/
token
/
{token}
/
me
Instance data
curl --request GET \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/me \
  --header 'Client-Token: <api-key>'
{
  "id": "<string>",
  "token": "<string>",
  "name": "<string>",
  "due": 123,
  "connected": true,
  "paymentStatus": "<string>",
  "created": "<string>",
  "connectedCallbackUrl": "<string>",
  "deliveryCallbackUrl": "<string>",
  "disconnectedCallbackUrl": "<string>",
  "messageStatusCallbackUrl": "<string>",
  "presenceChatCallbackUrl": "<string>",
  "receivedCallbackUrl": "<string>",
  "receiveCallbackSentByMe": true,
  "callRejectAuto": true,
  "callRejectMessage": "<string>",
  "autoReadMessage": true,
  "initialDataCallbackUrl": "<string>"
}

Overview

This method returns your instance data and settings.

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Response

200

id
string
Instance ID
token
string
Instance token
name
string
Instance name
due
number
Instance expiration date timestamp (unix timestamp)
connected
boolean
Whether the instance is connected
paymentStatus
string
Instance payment status
created
string
Instance creation date
connectedCallbackUrl
string
Connection webhook URL
deliveryCallbackUrl
string
Message delivery webhook URL
disconnectedCallbackUrl
string
Disconnection webhook URL
messageStatusCallbackUrl
string
Message status webhook URL
presenceChatCallbackUrl
string
Chat presence webhook URL
receivedCallbackUrl
string
Message received webhook URL
receiveCallbackSentByMe
boolean
Whether to receive webhooks for messages sent by the instance itself
callRejectAuto
boolean
Whether to automatically reject incoming calls
callRejectMessage
string
Message to send when rejecting a call
autoReadMessage
boolean
Whether to automatically mark received messages as read
initialDataCallbackUrl
string
Initial data webhook URL after connection
{
  "id": "123456",
  "token": "abcdef-ghij-klmn-opqr",
  "name": "My instance",
  "due": 1700000000,
  "connected": true,
  "paymentStatus": "ACTIVE",
  "created": "2024-01-01T00:00:00.000Z",
  "connectedCallbackUrl": "https://mysite.com/webhook/connected",
  "deliveryCallbackUrl": "https://mysite.com/webhook/delivery",
  "disconnectedCallbackUrl": "https://mysite.com/webhook/disconnected",
  "messageStatusCallbackUrl": "https://mysite.com/webhook/message-status",
  "presenceChatCallbackUrl": "https://mysite.com/webhook/presence",
  "receivedCallbackUrl": "https://mysite.com/webhook/received",
  "receiveCallbackSentByMe": false,
  "callRejectAuto": false,
  "callRejectMessage": "",
  "autoReadMessage": false,
  "initialDataCallbackUrl": ""
}

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”.