Skip to main content

Instances API

Manage your WhatsApp instances: start, restart, stop, and disconnect. Each use case below is explained with concrete examples.

  • All requests are HTTP POST (unless stated otherwise) with Content-Type: application/json and the X-API-KEY header.
  • Responses follow { message: string, success: boolean, ... }.

Start an instance

Endpoint: POST /instances/start

When to use it

  • To initialize a newly created instance or relaunch after a stop.
  • Required before generating a QR if the instance was inactive.

Body

  • instance: string — Your instance identifier.
curl -X POST https://api.communiktor.com/instances/start \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "my-instance-1"
}'

Restart an instance

Endpoint: POST /instances/restart

When to use it

  • After a configuration change.
  • To restore an unstable connection without forcing a new QR.

Body

  • instance: string — The instance identifier.
curl -X POST https://api.communiktor.com/instances/restart \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "my-instance-1"
}'

Stop an instance

Endpoint: POST /instances/stop

When to use it

  • Take the instance offline gracefully.
  • Temporarily suspend sending/receiving messages.

Body

  • instance: string — The instance identifier.
curl -X POST https://api.communiktor.com/instances/stop \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "my-instance-1"
}'

Disconnect the instance (logout)

Endpoint: POST /instances/disconnect

When to use it

  • Invalidate the WhatsApp session and force re-login via QR.
  • Useful if the phone changed or the session is corrupted.

Body

  • instance: string — The instance identifier.
curl -X POST https://api.communiktor.com/instances/disconnect \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "my-instance-1"
}'