← All guides

ALACTIC COMMUNICATION 24/7

Developer API reference

The current v1 endpoints, request format, limits and error contract.

Base URL and schema

https://crm-api.alactic.io/api/developer-platform/v1

All application responses use JSON except authenticated media downloads. Successful JSON responses use {"success":true,"data":…,"requestId":…}. Errors use {"success":false,"error":{"code":…,"message":…}}, with a request ID when one was allocated.

Download the OpenAPI 3.0 schema

Endpoints

MethodPathOperationScope
GET/numbersList the number assigned to this key’s projectnumbers:read
GET/contactsList contacts with cursor paginationcontacts:read
POST/contactsCreate or return an existing contactcontacts:write
POST/contacts/{id}/consentRecord existing permission or an opt-outcontacts:write
GET/templatesRead live Meta templates and approval statustemplates:read
POST/messagesSend a service-window reply or approved body-text templatemessages:write
GET/conversationsList the project inboxmessages:read
GET/conversations/{id}/messagesRead a conversation returned by the inboxmessages:read
POST/acid/chatGenerate an ACID business replyacid:write
GET/requests/{id}Inspect an idempotent request without creating another billable calloriginal operation scope
GET/mediaList up to 100 stored media filesmedia:read
POST/mediaStore a PDF or image up to 10 MBmedia:write
GET/media/{id}/contentDownload an owned media filemedia:read
DELETE/media/{id}Delete a media file and release its storage quotamedia:write

Pagination and number formats

Contacts and templates return items and nextCursor. Pass the cursor as after; do not construct cursors yourself. Supported list limits are 1–100, with a default of 25. Inbox lists use an offset. Media listing currently returns the latest 100 files.

Recipient phone numbers must use E.164, including a leading plus and country code, with no spaces. IDs returned by one project must not be reused under another project’s key.

Sending supported messages

{
  "to": "+12025550123",
  "type": "template",
  "template": {
    "name": "order_update",
    "language": "en",
    "parameters": [
      "Alex",
      "ORDER-123"
    ]
  },
  "transactionContext": "Customer requested an update for ORDER-123."
}

Template parameters map to numbered body text variables. The template must be approved on your connected WhatsApp account, and the language must match. Utility templates additionally require a real transaction or customer-request description. The API does not change a promotional message into a utility message.

A text reply uses type: "text" and a text value of at most 4,096 characters. The server requires an inbound message within 24 hours and enforces blocks and withdrawals. Meta continues to make the final delivery decision.

ACID chat

{
  "messages": [
    {
      "role": "system",
      "content": "You assist Example Studio. Opening hours are Monday\u2013Friday, 9am\u20135pm. Refer pricing questions to the team."
    },
    {
      "role": "user",
      "content": "When are you open?"
    }
  ],
  "max_tokens": 256
}

Use one initial system message for business context, then user and assistant messages, ending with a user message. Provide 2–16 messages, with a combined maximum of 24,000 UTF-8 bytes. The maximum output setting is 16–384 tokens; saved provider policy may apply a lower output maximum. Input includes the business context, retained history and platform instructions actually processed by the model.

Replies return model, text, usage.prompt_tokens, usage.completion_tokens and a pricing version. The endpoint generates text only; it does not send WhatsApp messages or execute business actions.

Media storage

Upload one file as multipart form-data under the file field. Supported file types are PDF, JPEG, PNG and WebP, up to 10 MB each. Content signatures are checked. Free has no media allowance; Pro has 10 GB and Scale has 100 GB of pooled account storage, measured in decimal bytes.

Uploads reserve quota atomically. Downloads require media:read on the owning project. Deletion needs media:write and releases the stored file’s logical size. Storing a file does not itself publish it to Meta or attach it to a template.

Errors and safe retry behaviour

HTTPMeaningNext step
400Invalid requestCorrect the field named in the response.
401Invalid or revoked keyCheck server-side credentials.
402Insufficient balance or capFund the selected wallet or adjust its cap.
403Scope or plan restrictionReview scopes and active seats.
409Conflicting or pending operationInspect the request or current state before retrying.
413File or storage limitUse a supported smaller file or free space.
429Rate, monthly or provider capacity limitCheck the error code; wait or change the appropriate allowance.
502 / 503Provider or reconciliation problemKeep the request ID; do not blindly repeat a send.

The account request-rate limit is 120 requests per minute across its API keys. Invalid authentication is rejected before account metering. Accepted authenticated API operations, including operations that later fail validation or provider checks, count as API calls. Replayed idempotent writes and request-status lookups do not consume an additional billable call.