Wapiworld API 1.0.0

Public REST API for Wapiworld — WhatsApp API as a service. Authenticate with an API key created in the Wapiworld dashboard: send the base64-encoded key secret with HTTP Basic auth. Each key is scoped to a single project and carries per-resource scopes like instances:read or instances:write.

Base URL https://api.wapiworld.com
  • apiKey — HTTP Basic auth carrying only the API key secret: Authorization: Basic base64(<key secret>).
  • accessToken — Operator session token issued by the Wapiworld dashboard: Authorization: Token <access token>.

Download the OpenAPI specification

Instances

GET/api/instances

List WhatsApp instances

Lists the WhatsApp instances of your organization. An API key is scoped to a single project and only sees that project's instances. Requires the instances:read scope.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
projectId query string
fields query string Comma-separated projection of fields to return
limit query integer Optional page size, capped at 500
skip query integer Optional zero-based page offset

Responses

StatusMeaning
200Array of instances
401Missing or invalid credentials
403API key is missing the instances:read scope
429API key rate limit exceeded

POST/api/instances

Create a WhatsApp instance

Creates a new WhatsApp instance in your project. A caller-supplied _id, whether in the body or instanceId query, requires a stable Idempotency-Key; retrying the same create (including the same write-only webhook signing secret) returns the same resource, while reusing either identity for a different intent returns 409. The first accepted command pins its runtime backend, so an exact retry resumes the same command even if a deployment gate changed meanwhile. Keyed creates reserve the resource in stopped state and must be started with the reconnect action after the caller durably stores the returned id. Unkeyed legacy creates retain their historical auto-start behavior. Requires the instances:write scope and emits instance.created.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
Idempotency-Key header string Stable 16-128 character key. Required when the request body supplies _id or the query supplies instanceId; recommended for every automated create.
Wapiworld-Required-Create-Backend-Protocol header string durable-generation-v1 | legacy-direct-v1 Fail before reservation unless the selected create backend exactly matches this protocol
instanceId query string Optional caller-supplied 24-character lowercase hex resource id

Responses

StatusMeaning
200The created or exactly replayed instance
401Missing or invalid credentials
403API key is missing the instances:write scope
409The identity/key conflicts, a legacy effect lease is retryably busy, or runtime capacity is full
429API key rate limit exceeded
503The explicitly required create backend is not currently selected

GET/api/instances/{instanceId}

Get a WhatsApp instance

Returns a single instance by id. Requires the instances:read scope. Answers 404 when the instance belongs to another organization or project.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
instanceId required path string

Responses

StatusMeaning
200The instance
401Missing or invalid credentials
403API key is missing the instances:read scope
404Instance not found
429API key rate limit exceeded

PUT/api/instances/{instanceId}

Update a WhatsApp instance

Updates an existing instance. A body containing webhookSigningSecret is always an atomic durable configuration command and requires a stable Idempotency-Key. Its exact public patch and write-only secret may be replayed until the returned configurationOperation reaches completed; changing that intent for the same key returns 409. Requires the instances:write scope. May emit instance.connected / instance.disconnected on a status transition.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
instanceId required path string
Idempotency-Key header string Required for a body containing webhookSigningSecret; stable 16-128 character operation key

Responses

StatusMeaning
200The updated instance and completed configuration operation, or an ordinary synchronous update
202The atomic configuration command is accepted and awaiting exact runtime acknowledgement
403API key is missing the instances:write scope
409The idempotency key conflicts or the operation was superseded
429API key rate limit exceeded

DELETE/api/instances/{instanceId}

Delete a WhatsApp instance

Durably requests logout, provider-state purge, and deletion. Repeat the same DELETE to poll the intrinsic delete:{instanceId} operation; 202 is pending and 200 includes the immutable completion event. Requires the instances:write scope and emits instance.deleted exactly once. Answers 404 for an instance in another organization or project.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
instanceId required path string

Responses

StatusMeaning
200Deletion completed; response includes the stable operation and event
202Deletion was durably accepted and is still pending
403API key is missing the instances:write scope
404Instance not found
409A transitional create external effect is still in flight; retry without changing intent
429API key rate limit exceeded

POST/api/instances/{instanceId}/action/send-message-idempotent

Send a WhatsApp message with a durable idempotency key

Requires one stable Idempotency-Key and the instances:write scope. Reuse the key only for the exact same instance, normalized chat, and content. An exact retry reuses one deterministic WhatsApp message id; changed intent returns 409. The unversioned send-message action is legacy and rejects every Idempotency-Key.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
instanceId required path string
Idempotency-Key required header string Required exactly once; retries of one command must reuse the exact value

Responses

StatusMeaning
200The action result from the instance
400The Idempotency-Key is present but invalid
403API key is missing the instances:write scope
404Instance not found
409The key conflicts or the WhatsApp account is not currently connected
422WhatsApp could not address the recipient; no provider message was attempted
429API key rate limit exceeded
503The keyed-send protocol, recipient lookup, or durable outcome is unavailable; retry the exact command and key
504The send timed out with an ambiguous outcome; retry the exact command and key

POST/api/instances/{instanceId}/action/{action}

Perform a legacy or non-send action on a WhatsApp instance

Drives actions such as logout, reconnect, and the legacy unkeyed send-message. Every Idempotency-Key is rejected on this route. Use the exact send-message-idempotent path for durable keyed sends.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
instanceId required path string
action required path string

Responses

StatusMeaning
200The action result from the instance
202A reconnect was durably accepted for background reconciliation
400An Idempotency-Key was supplied to a legacy or non-send action
403API key is missing the instances:write scope
404Instance not found
409Reconnect capacity is unavailable or the WhatsApp account is not currently connected
422A legacy send could not address the recipient; no provider message was attempted
429API key rate limit exceeded
502The instance action could not be completed
503A retryable recipient lookup is unavailable before a legacy provider message attempt

Messages

GET/api/messages

List recorded WhatsApp messages

Reads the recorded messages of one instance, optionally filtered by chat. Message recording is opt-in per instance and TTL-expired. Requires the messages:read scope.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
instanceId required query string
chatId query string
startTime query string
endTime query string
limit query integer default 100
skip query integer default 0

Responses

StatusMeaning
200Array of recorded messages
401Missing or invalid credentials
403API key is missing the messages:read scope
429API key rate limit exceeded

Projects

GET/api/projects

List projects

Lists your organization's projects. An API key is scoped to a single project and returns only that one. Requires the projects:read scope.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
fields query string Optional comma-separated top-level fields to return

Responses

StatusMeaning
200Array of projects
401Missing or invalid credentials
403API key is missing the projects:read scope
429API key rate limit exceeded

GET/api/projects/{projectId}

Get a project

Returns a single project by id. Requires the projects:read scope. Answers 404 for a project in another organization, or for a project-scoped key asking for a different project.

Authentication apiKey accessToken

Parameters

NameInTypeDescription
projectId required path string

Responses

StatusMeaning
200The project
403API key is missing the projects:read scope
404Project not found
429API key rate limit exceeded

Webhook subscriptions

GET/api/webhooksubscriptions

List webhook subscriptions

Webhook subscriptions deliver instance.created, instance.connected, instance.disconnected and instance.deleted events to your server as signed POST requests (X-Wapiworld-Signature: t=<timestamp>,v1=<hex HMAC-SHA256 of "timestamp.body">). An endpoint failing 20 times in a row is disabled automatically. Subscriptions are managed with an operator access token. Responses contain only the reviewed public subscription fields; the secret is returned once, on create.

Authentication accessToken

Responses

StatusMeaning
200Array of webhook subscriptions (without secrets)

POST/api/webhooksubscriptions

Create a webhook subscription

The response includes the signing secret exactly once — store it; it cannot be retrieved again.

Authentication accessToken

Request body application/json

FieldTypeDescription
projectId required string
url required string
events array Empty array subscribes to all events
deliveryVersion integer 1 | 2 Version 1 is the legacy envelope; version 2 is the canonical CloudEvent

Responses

StatusMeaning
200The created subscription, including its secret

PUT/api/webhooksubscriptions/{webhookSubscriptionId}

Update a webhook subscription

url, events, deliveryVersion and active are editable; the secret and project are immutable. Re-enabling an auto-disabled endpoint is done by setting active back to true.

Authentication accessToken

Parameters

NameInTypeDescription
webhookSubscriptionId required path string

Responses

StatusMeaning
200The updated subscription (without secret)

DELETE/api/webhooksubscriptions/{webhookSubscriptionId}

Delete a webhook subscription

Authentication accessToken

Parameters

NameInTypeDescription
webhookSubscriptionId required path string

Responses

StatusMeaning
200Deleted