pingx.aiAPI docs Markdown

WhatsApp reference

Every WhatsApp endpoint with parameters, request and response fields, required scope and a curl example.

Every WhatsApp endpoint. Base URL https://api.pingx.ai; send Authorization: Bearer <API key>. Read endpoints need whatsapp:read (or :write), write endpoints need whatsapp:write; the bare whatsapp scope grants both. See Authentication and conventions. Machine-readable: openapi.json.

71 endpoints

MethodPathOperationScope
GET/whatsapp/v1/auto-responsesListAutoResponsesread
POST/whatsapp/v1/auto-responsesCreateAutoResponsewrite
DELETE/whatsapp/v1/auto-responses/{autoResponseId}DeleteAutoResponsewrite
PUT/whatsapp/v1/auto-responses/{autoResponseId}UpdateAutoResponsewrite
GET/whatsapp/v1/blocked-numbersListBlockedNumbersread
POST/whatsapp/v1/blocked-numbersBlockNumberwrite
DELETE/whatsapp/v1/blocked-numbers/{mobileNumber}UnblockNumberwrite
GET/whatsapp/v1/campaignsListCampaignsread
POST/whatsapp/v1/campaignsCreateCampaignwrite
GET/whatsapp/v1/campaigns/{campaignId}GetCampaignread
POST/whatsapp/v1/campaigns/{campaignId}:cancelCancelCampaignwrite
POST/whatsapp/v1/campaigns/{campaignId}:startStartCampaignwrite
POST/whatsapp/v1/campaigns/{campaignId}/recipients:addAddCampaignRecipientswrite
GET/whatsapp/v1/chatsListChatsread
POST/whatsapp/v1/chats/{contact}:assignAssignChatwrite
POST/whatsapp/v1/chats/{contact}:markReadMarkChatReadwrite
GET/whatsapp/v1/chats/{contact}/messagesListChatMessagesread
POST/whatsapp/v1/chats/{contact}/messagesSendChatMessagewrite
POST/whatsapp/v1/commerce/catalogsCreateCatalogwrite
POST/whatsapp/v1/commerce/catalogs:connectConnectCatalogwrite
GET/whatsapp/v1/commerce/product-batchesListProductBatchesread
POST/whatsapp/v1/commerce/product-batchesCreateProductBatchwrite
DELETE/whatsapp/v1/commerce/product-batches/{productBatchId}DeleteProductBatchwrite
GET/whatsapp/v1/commerce/product-batches/{productBatchId}GetProductBatchread
POST/whatsapp/v1/commerce/product-batches/{productBatchId}:setLiveSetProductBatchLivewrite
GET/whatsapp/v1/commerce/settingsGetCommerceSettingsread
PUT/whatsapp/v1/commerce/settingsSetCommerceSettingswrite
GET/whatsapp/v1/contact-attributesListContactAttributesread
POST/whatsapp/v1/contact-attributesCreateContactAttributewrite
DELETE/whatsapp/v1/contact-attributes/{name}DeleteContactAttributewrite
GET/whatsapp/v1/contact-attributes/{name}/contactsListContactsForAttributeread
GET/whatsapp/v1/contact-groupsListGroupsread
POST/whatsapp/v1/contact-groupsCreateGroupwrite
DELETE/whatsapp/v1/contact-groups/{groupId}DeleteGroupwrite
PATCH/whatsapp/v1/contact-groups/{groupId}UpdateGroupwrite
GET/whatsapp/v1/contact-groups/{groupId}/membersListGroupContactsread
PUT/whatsapp/v1/contact-groups/{groupId}/membersSetGroupMemberswrite
POST/whatsapp/v1/contact-groups/{groupId}/members:addAddGroupContactswrite
GET/whatsapp/v1/contactsListContactsread
POST/whatsapp/v1/contactsCreateContactwrite
POST/whatsapp/v1/contacts:bulkImportBulkImportContactswrite
GET/whatsapp/v1/contacts:byPhoneGetContactByPhoneread
POST/whatsapp/v1/contacts:setTagsSetContactTagswrite
DELETE/whatsapp/v1/contacts/{contactId}DeleteContactwrite
PATCH/whatsapp/v1/contacts/{contactId}UpdateContactwrite
GET/whatsapp/v1/flowsListFlowsread
POST/whatsapp/v1/flowsCreateFlowwrite
DELETE/whatsapp/v1/flows/{flowId}DeleteFlowwrite
GET/whatsapp/v1/flows/{flowId}GetFlowread
PUT/whatsapp/v1/flows/{flowId}UpdateFlowwrite
POST/whatsapp/v1/flows/{flowId}:duplicateDuplicateFlowwrite
POST/whatsapp/v1/flows/{flowId}:setActiveSetFlowActivewrite
GET/whatsapp/v1/inbound-messagesListInboundMessagesread
GET/whatsapp/v1/mediaListMediaread
POST/whatsapp/v1/mediaUploadMediawrite
DELETE/whatsapp/v1/media/{mediaId}DeleteMediawrite
GET/whatsapp/v1/message-reportsListMessageReportsread
GET/whatsapp/v1/message-statsGetMessageStatsread
GET/whatsapp/v1/messagesListMessagesread
POST/whatsapp/v1/messagesSendMessagewrite
GET/whatsapp/v1/numbersListNumbersread
POST/whatsapp/v1/numbers:connectConnectNumberwrite
POST/whatsapp/v1/numbers/{phoneNumberId}:disconnectDisconnectNumberwrite
GET/whatsapp/v1/opt-out-configGetOptOutConfigread
PUT/whatsapp/v1/opt-out-configSetOptOutConfigwrite
GET/whatsapp/v1/templatesListTemplatesread
POST/whatsapp/v1/templatesCreateTemplatewrite
DELETE/whatsapp/v1/templates/{templateName}DeleteTemplatewrite
GET/whatsapp/v1/templates/{templateName}GetTemplateread
PATCH/whatsapp/v1/templates/{templateName}:archiveArchiveTemplatewrite
PUT/whatsapp/v1/webhookSetWebhookConfigwrite

#GET /whatsapp/v1/auto-responses

ListAutoResponses · needs whatsapp:read (or write)

#=================================================================== Auto-responses - keyword -> canned text reply

Lists the auto-responses of a number (the complete list, unpaginated).

Query parameters

NameTypeDescription
phoneNumberIdstring

Response ListAutoResponsesResponse

FieldTypeDescription
autoResponsesAutoResponse[]
autoResponses[].idstring (int64)
autoResponses[].titlestring
autoResponses[].matchTypestring"exact" or "contains".
autoResponses[].keywordsstring[]
autoResponses[].responseTypestring
autoResponses[].responseTextstring
autoResponses[].activeboolean
autoResponses[].createdAtstring
curl "https://api.pingx.ai/whatsapp/v1/auto-responses" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/auto-responses

CreateAutoResponse · needs whatsapp:write

Creates an auto-response and returns its id. Not idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
titlestringInternal label.
matchTypestring"exact" or "contains".
keywordsstring[]Incoming-message keywords that trigger the reply.
responseTextstringThe reply text.
activeboolean

Response AutoResponseResult

FieldTypeDescription
successboolean
messagestring
idstring (int64)Id of the created auto-response (set by create).
curl -X POST "https://api.pingx.ai/whatsapp/v1/auto-responses" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","title":"…","matchType":"…","keywords":[],"responseText":"…","active":false}'

#DELETE /whatsapp/v1/auto-responses/{autoResponseId}

DeleteAutoResponse · needs whatsapp:write

Deletes an auto-response. Idempotent.

Path parameters

NameTypeDescription
autoResponseIdstring (int64)

Query parameters

NameTypeDescription
phoneNumberIdstringQuery parameter in REST.

Response AutoResponseResult

FieldTypeDescription
successboolean
messagestring
idstring (int64)Id of the created auto-response (set by create).
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/auto-responses/AUTORESPONSEID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PUT /whatsapp/v1/auto-responses/{autoResponseId}

UpdateAutoResponse · needs whatsapp:write

Replaces an auto-response's settings (send every field). Idempotent.

Path parameters

NameTypeDescription
autoResponseIdstring (int64)

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
titlestring
matchTypestring
keywordsstring[]
responseTextstring
activeboolean

Response AutoResponseResult

FieldTypeDescription
successboolean
messagestring
idstring (int64)Id of the created auto-response (set by create).
curl -X PUT "https://api.pingx.ai/whatsapp/v1/auto-responses/AUTORESPONSEID" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","title":"…","matchType":"…","keywords":[],"responseText":"…","active":false}'

#GET /whatsapp/v1/blocked-numbers

ListBlockedNumbers · needs whatsapp:read (or write)

Lists blocked (opted-out) numbers: no template or campaign message is sent to them. Paginated.

Query parameters

NameTypeDescription
phoneNumberIdstring
pageSizeinteger0 = 100; maximum 1000.
pageTokenstring

Response ListBlockedNumbersResponse

FieldTypeDescription
numbersBlockedNumber[]
numbers[].mobileNumberstring
numbers[].createdAtstring
nextPageTokenstring
curl "https://api.pingx.ai/whatsapp/v1/blocked-numbers" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/blocked-numbers

BlockNumber · needs whatsapp:write

Blocks a number, as if the customer had opted out. Idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
mobileNumberstringE.164 digits ("+" optional).

Response BlockNumberResponse

FieldTypeDescription
successboolean
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/blocked-numbers" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","mobileNumber":"…"}'

#DELETE /whatsapp/v1/blocked-numbers/{mobileNumber}

UnblockNumber · needs whatsapp:write

Unblocks a number so it can receive messages again. Idempotent.

Path parameters

NameTypeDescription
mobileNumberstringE.164 digits; in REST put it URL-encoded in the path ("%2B1555...").

Query parameters

NameTypeDescription
phoneNumberIdstringQuery parameter in REST.

Response UnblockNumberResponse

FieldTypeDescription
successboolean
messagestring
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/blocked-numbers/MOBILENUMBER" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/campaigns

ListCampaigns · needs whatsapp:read (or write)

Lists the organization's campaigns, newest first (at most the 200 most recent are reachable), without the delivery breakdown (use GetCampaign for that).

Query parameters

NameTypeDescription
pageSizeinteger0 = 50; maximum 200.
pageTokenstring

Response ListCampaignsResponse

FieldTypeDescription
campaignsCampaignSummary[]
campaigns[].idstring
campaigns[].namestring
campaigns[].templateNamestring
campaigns[].statusstring
campaigns[].totalintegerRecipient counters; total = pending + sending + sent + failed + skipped.
campaigns[].pendinginteger
campaigns[].sendinginteger
campaigns[].sentintegerAccepted by Meta (this does not yet mean delivered to the phone).
campaigns[].failedinteger
campaigns[].skippedintegerNot attempted (opted out, cancelled, out of credits).
campaigns[].errorstringCampaign-level error, when status is failed.
campaigns[].createdAtstring
campaigns[].startedAtstring
campaigns[].finishedAtstring
campaigns[].ratePerSecintegerThe configured send-rate cap, messages per second.
campaigns[].avgRatePerSecnumberObserved throughput since start (0 before it starts) and estimated seconds to finish (-1 when unknown).
campaigns[].etaSecondsstring (int64)
campaigns[].scheduledAtstring
campaigns[].deliveredintegerDelivery results from Meta's webhooks. Filled by GetCampaign only; list and start responses leave them 0. delivered or read
campaigns[].readinteger
campaigns[].deliveryFailedinteger
nextPageTokenstring
curl "https://api.pingx.ai/whatsapp/v1/campaigns" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/campaigns

CreateCampaign · needs whatsapp:write

Creates a campaign in draft status. Validates the template (must be APPROVED), media and carousel settings once for all recipients. Not idempotent: every call creates a new campaign, so after a timeout call ListCampaigns before retrying. Errors: INVALID_ARGUMENT (missing templateName, bad media), NOT_FOUND (unknown template or number), FAILED_PRECONDITION (template not approved), RESOURCE_EXHAUSTED (too many campaigns already running).

Request body (JSON)

FieldTypeDescription
phoneNumberIdstringNumber to send from; see the shared conventions above.
namestringHuman-readable campaign name (shown in reports; also usable as the campaignName filter of ListMessageReports).
templateNamestringName of an APPROVED template (see ListTemplates). Required.
languagestringTemplate language code, e.g. "en_US". Needed when the template exists in several languages.
categorystringTemplate category recorded for reports (MARKETING, UTILITY, AUTHENTICATION); also drives billing.
mediaTypestringFor a template with a media header: image, video or document. Then give exactly one of mediaId (from UploadMedia/ListMedia) or mediaUrl.
mediaIdstring
mediaUrlstring
cardMediaCarouselCardMedia[]Per-card media for a carousel template, one entry per card in order. Leave empty for non-carousel templates.
cardMedia[].mediaTypestring
cardMedia[].mediaIdstring
cardMedia[].mediaUrlstring
cardMedia[].buttonVarsobject
ratePerSecintegerMaximum send rate in messages per second. 0 = server default; values above the server maximum are clamped (the response tells the real rate).
scheduledAtstringRFC 3339. Empty = send as soon as StartCampaign is called; otherwise the campaign waits in the queue until this time.

Response CreateCampaignResponse

FieldTypeDescription
campaignIdstringId to use in all later campaign calls.
ratePerSecintegerThe rate (messages per second) the campaign will actually run at.
curl -X POST "https://api.pingx.ai/whatsapp/v1/campaigns" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d @body.json

#GET /whatsapp/v1/campaigns/{campaignId}

GetCampaign · needs whatsapp:read (or write)

Reads one campaign with live progress counters, delivery results from Meta's webhooks (delivered/read/deliveryFailed) and the first 100 per-recipient send failures. NOT_FOUND for a campaign that belongs to another organization.

Path parameters

NameTypeDescription
campaignIdstring

Response GetCampaignResponse

FieldTypeDescription
campaignCampaignSummary
campaign.idstring
campaign.namestring
campaign.templateNamestring
campaign.statusstring
campaign.totalintegerRecipient counters; total = pending + sending + sent + failed + skipped.
campaign.pendinginteger
campaign.sendinginteger
campaign.sentintegerAccepted by Meta (this does not yet mean delivered to the phone).
campaign.failedinteger
campaign.skippedintegerNot attempted (opted out, cancelled, out of credits).
campaign.errorstringCampaign-level error, when status is failed.
campaign.createdAtstring
campaign.startedAtstring
campaign.finishedAtstring
campaign.ratePerSecintegerThe configured send-rate cap, messages per second.
campaign.avgRatePerSecnumberObserved throughput since start (0 before it starts) and estimated seconds to finish (-1 when unknown).
campaign.etaSecondsstring (int64)
campaign.scheduledAtstring
campaign.deliveredintegerDelivery results from Meta's webhooks. Filled by GetCampaign only; list and start responses leave them 0. delivered or read
campaign.readinteger
campaign.deliveryFailedinteger
failuresCampaignFailure[]The first 100 recipients that failed, with the reason.
failures[].mobilestring
failures[].errorstring
curl "https://api.pingx.ai/whatsapp/v1/campaigns/CAMPAIGNID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/campaigns/{campaignId}:cancel

CancelCampaign · needs whatsapp:write

Cancels a campaign: messages not yet sent will not be sent. Messages already sent cannot be recalled. Idempotent; cancelled is false if the campaign had already finished.

Path parameters

NameTypeDescription
campaignIdstring

Response CancelCampaignResponse

FieldTypeDescription
cancelledbooleanfalse if the campaign had already finished.
curl -X POST "https://api.pingx.ai/whatsapp/v1/campaigns/CAMPAIGNID:cancel" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/campaigns/{campaignId}:start

StartCampaign · needs whatsapp:write

Starts a draft campaign (or queues it until its scheduledAt). A campaign that is not a startable draft (already started, or unknown to your organization) returns an error; see the Connect/gRPC code.

Path parameters

NameTypeDescription
campaignIdstring

Response StartCampaignResponse

FieldTypeDescription
campaignCampaignSummary
campaign.idstring
campaign.namestring
campaign.templateNamestring
campaign.statusstring
campaign.totalintegerRecipient counters; total = pending + sending + sent + failed + skipped.
campaign.pendinginteger
campaign.sendinginteger
campaign.sentintegerAccepted by Meta (this does not yet mean delivered to the phone).
campaign.failedinteger
campaign.skippedintegerNot attempted (opted out, cancelled, out of credits).
campaign.errorstringCampaign-level error, when status is failed.
campaign.createdAtstring
campaign.startedAtstring
campaign.finishedAtstring
campaign.ratePerSecintegerThe configured send-rate cap, messages per second.
campaign.avgRatePerSecnumberObserved throughput since start (0 before it starts) and estimated seconds to finish (-1 when unknown).
campaign.etaSecondsstring (int64)
campaign.scheduledAtstring
campaign.deliveredintegerDelivery results from Meta's webhooks. Filled by GetCampaign only; list and start responses leave them 0. delivered or read
campaign.readinteger
campaign.deliveryFailedinteger
curl -X POST "https://api.pingx.ai/whatsapp/v1/campaigns/CAMPAIGNID:start" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/campaigns/{campaignId}/recipients:add

AddCampaignRecipients · needs whatsapp:write

Adds recipients to a draft campaign (up to 5000 per call; call repeatedly for larger audiences). Numbers already on the campaign are counted as duplicates and opted-out numbers are skipped, so retrying a chunk is safe.

Path parameters

NameTypeDescription
campaignIdstringCampaign id from CreateCampaign. Must still be in draft status.

Request body (JSON)

FieldTypeDescription
recipientsCampaignRecipient[]Up to 5000 recipients per call.
recipients[].mobilestringRecipient WhatsApp number in E.164 digits ("+" optional).
recipients[].bodyParamsstring[]Values for the template body variables {{1}}, {{2}}... in order.
recipients[].buttonUrlParamsobjectDynamic URL button values, keyed by the button's 0-based index in the template's button list. For a carousel they apply to every card's button.

Response AddCampaignRecipientsResponse

FieldTypeDescription
acceptedintegerRecipients newly added by this call.
duplicatesintegerRecipients already on the campaign (ignored).
skippedOptedOutintegerRecipients not added because they are blocked / opted out.
totalintegerRecipients now on the campaign in total.
curl -X POST "https://api.pingx.ai/whatsapp/v1/campaigns/CAMPAIGNID/recipients:add" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"recipients":[]}'

#GET /whatsapp/v1/chats

ListChats · needs whatsapp:read (or write)

#=================================================================== Team Inbox chats - human conversations with customers

Lists conversations (one per customer number) with the last message, unread count and assignee, most recently active first.

Query parameters

NameTypeDescription
phoneNumberIdstring
pageSizeinteger0 = 100; maximum 500.
pageTokenstring
assigneeFilterstringEmpty = all chats, "unassigned", or the user id of one member. "mine" is not available to API keys (they have no user).

Response ListChatsResponse

FieldTypeDescription
chatsChatSummary[]
chats[].contactstringCustomer number, E.164 digits. Use it as contact in the chat calls.
chats[].lastMessagestring
chats[].lastDirectionstring
chats[].lastAtstring
chats[].unreadCountinteger
chats[].namestringWhatsApp profile name; empty if never seen.
chats[].assigneeIdstringUser id of the assignee; empty = unassigned.
nextPageTokenstring
curl "https://api.pingx.ai/whatsapp/v1/chats" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/chats/{contact}:assign

AssignChat · needs whatsapp:write

Assigns a conversation to one organization member or clears the assignment. Idempotent.

Path parameters

NameTypeDescription
contactstring

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
assigneeIdstringUser id of an organization member; empty = unassign. API keys have no user, so "me" is not available to them.

Response AssignChatResponse

FieldTypeDescription
successboolean
curl -X POST "https://api.pingx.ai/whatsapp/v1/chats/CONTACT:assign" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","assigneeId":"…"}'

#POST /whatsapp/v1/chats/{contact}:markRead

MarkChatRead · needs whatsapp:write

Clears the unread badge of one conversation. Idempotent.

Path parameters

NameTypeDescription
contactstring

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring

Response MarkChatReadResponse

FieldTypeDescription
successboolean
curl -X POST "https://api.pingx.ai/whatsapp/v1/chats/CONTACT:markRead" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…"}'

#GET /whatsapp/v1/chats/{contact}/messages

ListChatMessages · needs whatsapp:read (or write)

Reads one conversation's messages (inbound and outbound). The first page holds the newest messages; nextPageToken leads to older ones. Within a page messages are ordered oldest to newest.

Path parameters

NameTypeDescription
contactstringCustomer number (E.164 digits). Required.

Query parameters

NameTypeDescription
phoneNumberIdstring
pageSizeinteger0 = 200; maximum 500.
pageTokenstring

Response ListChatMessagesResponse

FieldTypeDescription
messagesChatMessage[]
messages[].directionstring
messages[].bodystring
messages[].msgTypestring
messages[].statusstringDelivery status of outbound messages; empty for inbound.
messages[].createdAtstring
outsideServiceWindowbooleanTrue when the customer's last inbound message is more than 24 hours old: free-text replies are then refused by WhatsApp and only an approved template (SendMessage) can restart the conversation.
nextPageTokenstringToken for the next OLDER page.
curl "https://api.pingx.ai/whatsapp/v1/chats/CONTACT/messages" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/chats/{contact}/messages

SendChatMessage · needs whatsapp:write

Sends a free-text reply to a customer. Only allowed inside the 24-hour customer-service window (see ListChatMessages.outsideServiceWindow); outside it the call returns success=false and you must send an approved template with SendMessage instead. Billed like SendMessage. Not idempotent: retrying after a timeout can deliver the reply twice.

Path parameters

NameTypeDescription
contactstringCustomer number (E.164 digits). Required.

Request body (JSON)

FieldTypeDescription
bodystringText of the reply. Required.
phoneNumberIdstring

Response pingxWhatsappV1SendChatMessageResponse

FieldTypeDescription
successbooleanfalse (with message explaining) when outside the 24-hour window or Meta/billing refused the send.
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/chats/CONTACT/messages" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"…","phoneNumberId":"…"}'

#POST /whatsapp/v1/commerce/catalogs

CreateCatalog · needs whatsapp:write

Creates a new Meta catalog on the organization's business and connects it. Not idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
namestring

Response CreateCatalogResponse

FieldTypeDescription
successboolean
messagestring
catalogIdstring
curl -X POST "https://api.pingx.ai/whatsapp/v1/commerce/catalogs" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","name":"…"}'

#POST /whatsapp/v1/commerce/catalogs:connect

ConnectCatalog · needs whatsapp:write

Connects an existing Meta catalog to a number. Idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
catalogIdstringOne of GetCommerceSettings.availableCatalogs.
catalogNamestring

Response CommerceResult

FieldTypeDescription
successboolean
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/commerce/catalogs:connect" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","catalogId":"…","catalogName":"…"}'

#GET /whatsapp/v1/commerce/product-batches

ListProductBatches · needs whatsapp:read (or write)

Lists product batches (the complete list).

Query parameters

NameTypeDescription
phoneNumberIdstring

Response ListProductBatchesResponse

FieldTypeDescription
batchesProductBatch[]
batches[].idstring
batches[].namestring
batches[].catalogIdstring
batches[].wabaIdstring
batches[].productCountinteger
batches[].livebooleanWhether the products are available in the catalog.
batches[].createdAtstring
batches[].updatedAtstring
curl "https://api.pingx.ai/whatsapp/v1/commerce/product-batches" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/commerce/product-batches

CreateProductBatch · needs whatsapp:write

Creates a batch of products: every item is pushed to the connected Meta catalog in one call and the batch is recorded only if that succeeds (Meta errors, e.g. a missing catalog permission, are returned as-is). Not idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
namestring
itemsProductBatchItem[]
items[].retailerIdstringYour own unique product id (SKU).
items[].namestring
items[].descriptionstring
items[].pricestringPrice as a decimal string, e.g. "19.99".
items[].currencystringISO 4217 code, e.g. "USD".
items[].imageUrlstringPublic HTTPS image URL.
items[].categorystring
items[].brandstring

Response CreateProductBatchResponse

FieldTypeDescription
successboolean
messagestring
productBatchIdstring
curl -X POST "https://api.pingx.ai/whatsapp/v1/commerce/product-batches" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","name":"…","items":[]}'

#DELETE /whatsapp/v1/commerce/product-batches/{productBatchId}

DeleteProductBatch · needs whatsapp:write

Deletes a product batch. Idempotent.

Path parameters

NameTypeDescription
productBatchIdstring

Query parameters

NameTypeDescription
phoneNumberIdstringQuery parameter in REST.

Response CommerceResult

FieldTypeDescription
successboolean
messagestring
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/commerce/product-batches/PRODUCTBATCHID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/commerce/product-batches/{productBatchId}

GetProductBatch · needs whatsapp:read (or write)

Reads one product batch with its products.

Path parameters

NameTypeDescription
productBatchIdstring

Query parameters

NameTypeDescription
phoneNumberIdstringQuery parameter in REST.

Response GetProductBatchResponse

FieldTypeDescription
batchProductBatch
batch.idstring
batch.namestring
batch.catalogIdstring
batch.wabaIdstring
batch.productCountinteger
batch.livebooleanWhether the products are available in the catalog.
batch.createdAtstring
batch.updatedAtstring
itemsProductBatchItem[]
items[].retailerIdstringYour own unique product id (SKU).
items[].namestring
items[].descriptionstring
items[].pricestringPrice as a decimal string, e.g. "19.99".
items[].currencystringISO 4217 code, e.g. "USD".
items[].imageUrlstringPublic HTTPS image URL.
items[].categorystring
items[].brandstring
curl "https://api.pingx.ai/whatsapp/v1/commerce/product-batches/PRODUCTBATCHID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/commerce/product-batches/{productBatchId}:setLive

SetProductBatchLive · needs whatsapp:write

Publishes (live=true) or withdraws (live=false) a batch's products in the catalog. Idempotent.

Path parameters

NameTypeDescription
productBatchIdstring

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
liveboolean

Response CommerceResult

FieldTypeDescription
successboolean
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/commerce/product-batches/PRODUCTBATCHID:setLive" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","live":false}'

#GET /whatsapp/v1/commerce/settings

GetCommerceSettings · needs whatsapp:read (or write)

#=================================================================== Commerce - catalog, commerce settings and product batches

Reads the connected catalog and commerce settings of a number, plus the catalogs available to connect.

Query parameters

NameTypeDescription
phoneNumberIdstring

Response GetCommerceSettingsResponse

FieldTypeDescription
catalogIdstringConnected catalog; empty if none.
catalogNamestring
catalogVisibleboolean
cartEnabledboolean
availableCatalogsCommerceCatalogRef[]Catalogs on the business that can be connected.
availableCatalogs[].idstring
availableCatalogs[].namestring
curl "https://api.pingx.ai/whatsapp/v1/commerce/settings" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PUT /whatsapp/v1/commerce/settings

SetCommerceSettings · needs whatsapp:write

Updates catalog visibility and cart settings of a number. Both fields are always applied: read first if you only want to change one. Idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
catalogVisiblebooleanShow the catalog icon in the chat.
cartEnabledbooleanEnable the shopping cart.

Response CommerceResult

FieldTypeDescription
successboolean
messagestring
curl -X PUT "https://api.pingx.ai/whatsapp/v1/commerce/settings" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","catalogVisible":false,"cartEnabled":false}'

#GET /whatsapp/v1/contact-attributes

ListContactAttributes · needs whatsapp:read (or write)

Contact attribute registry: a per-org catalog of customFields keys in use — advisory, not a schema (contacts.customFields stays free-form). Backs Manage Contacts > Manage Attributes and the Flow Builder's attribute pickers.

Response ListContactAttributesResponse

FieldTypeDescription
attributesContactAttribute[]
attributes[].namestring
attributes[].contactCountstring (int64)
attributes[].createdAtstring
attributes[].updatedAtstring
curl "https://api.pingx.ai/whatsapp/v1/contact-attributes" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/contact-attributes

CreateContactAttribute · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
namestring

Response CreateContactAttributeResponse

FieldTypeDescription
successboolean
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/contact-attributes" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'

#DELETE /whatsapp/v1/contact-attributes/{name}

DeleteContactAttribute · needs whatsapp:write

Path parameters

NameTypeDescription
namestring

Response DeleteContactAttributeResponse

FieldTypeDescription
successboolean
messagestring
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/contact-attributes/NAME" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/contact-attributes/{name}/contacts

ListContactsForAttribute · needs whatsapp:read (or write)

Contacts that have a value set for one registered attribute — "view contacts" from Manage Attributes.

Path parameters

NameTypeDescription
namestring

Response ListContactsForAttributeResponse

FieldTypeDescription
contactsContact[]
contacts[].idstring
contacts[].namestring
contacts[].phonestring
contacts[].customFieldsobject
contacts[].createdAtstring
curl "https://api.pingx.ai/whatsapp/v1/contact-attributes/NAME/contacts" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/contact-groups

ListGroups · needs whatsapp:read (or write)

Response ListGroupsResponse

FieldTypeDescription
groupsGroup[]
groups[].idstring
groups[].namestring
groups[].contactCountinteger
groups[].createdAtstring
curl "https://api.pingx.ai/whatsapp/v1/contact-groups" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/contact-groups

CreateGroup · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
namestring

Response CreateGroupResponse

FieldTypeDescription
successboolean
messagestring
groupGroup
group.idstring
group.namestring
group.contactCountinteger
group.createdAtstring
curl -X POST "https://api.pingx.ai/whatsapp/v1/contact-groups" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'

#DELETE /whatsapp/v1/contact-groups/{groupId}

DeleteGroup · needs whatsapp:write

Path parameters

NameTypeDescription
groupIdstring

Response DeleteGroupResponse

FieldTypeDescription
successboolean
messagestring
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/contact-groups/GROUPID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PATCH /whatsapp/v1/contact-groups/{groupId}

UpdateGroup · needs whatsapp:write

Path parameters

NameTypeDescription
groupIdstring

Request body (JSON)

FieldTypeDescription
namestring

Response UpdateGroupResponse

FieldTypeDescription
successboolean
messagestring
curl -X PATCH "https://api.pingx.ai/whatsapp/v1/contact-groups/GROUPID" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'

#GET /whatsapp/v1/contact-groups/{groupId}/members

ListGroupContacts · needs whatsapp:read (or write)

Path parameters

NameTypeDescription
groupIdstring

Response ListGroupContactsResponse

FieldTypeDescription
contactsContact[]
contacts[].idstring
contacts[].namestring
contacts[].phonestring
contacts[].customFieldsobject
contacts[].createdAtstring
curl "https://api.pingx.ai/whatsapp/v1/contact-groups/GROUPID/members" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PUT /whatsapp/v1/contact-groups/{groupId}/members

SetGroupMembers · needs whatsapp:write

Path parameters

NameTypeDescription
groupIdstring

Request body (JSON)

FieldTypeDescription
contactIdsstring[]

Response SetGroupMembersResponse

FieldTypeDescription
successboolean
messagestring
curl -X PUT "https://api.pingx.ai/whatsapp/v1/contact-groups/GROUPID/members" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contactIds":[]}'

#POST /whatsapp/v1/contact-groups/{groupId}/members:add

AddGroupContacts · needs whatsapp:write

AddGroupContacts additively inserts contactIds into a group's membership (existing members untouched) — unlike SetGroupMembers, which replaces the whole list. Atomic server-side, so it's safe to call concurrently from two clients without a lost-update race.

Path parameters

NameTypeDescription
groupIdstring

Request body (JSON)

FieldTypeDescription
contactIdsstring[]

Response AddGroupContactsResponse

FieldTypeDescription
successboolean
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/contact-groups/GROUPID/members:add" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contactIds":[]}'

#GET /whatsapp/v1/contacts

ListContacts · needs whatsapp:read (or write)

Query parameters

NameTypeDescription
searchstring
limitinteger

Response ListContactsResponse

FieldTypeDescription
contactsContact[]
contacts[].idstring
contacts[].namestring
contacts[].phonestring
contacts[].customFieldsobject
contacts[].createdAtstring
curl "https://api.pingx.ai/whatsapp/v1/contacts" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/contacts

CreateContact · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
namestring
phonestring
customFieldsobject

Response CreateContactResponse

FieldTypeDescription
successboolean
messagestring
contactContact
contact.idstring
contact.namestring
contact.phonestring
contact.customFieldsobject
contact.createdAtstring
curl -X POST "https://api.pingx.ai/whatsapp/v1/contacts" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…","phone":"…","customFields":{}}'

#POST /whatsapp/v1/contacts:bulkImport

BulkImportContacts · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
contactsContact[]
contacts[].idstring
contacts[].namestring
contacts[].phonestring
contacts[].customFieldsobject
contacts[].createdAtstring

Response BulkImportContactsResponse

FieldTypeDescription
successboolean
messagestring
importedCountinteger
curl -X POST "https://api.pingx.ai/whatsapp/v1/contacts:bulkImport" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contacts":[]}'

#GET /whatsapp/v1/contacts:byPhone

GetContactByPhone · needs whatsapp:read (or write)

Reads one contact by WhatsApp number (any format; matched on its digits) with its labels, and every label the organization uses (for pickers).

Query parameters

NameTypeDescription
phonestringdigits, with or without "+" / spaces

Response GetContactByPhoneResponse

FieldTypeDescription
foundboolean
contactContact
contact.idstring
contact.namestring
contact.phonestring
contact.customFieldsobject
contact.createdAtstring
tagsstring[]
knownTagsstring[]
curl "https://api.pingx.ai/whatsapp/v1/contacts:byPhone" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/contacts:setTags

SetContactTags · needs whatsapp:write

Adds and/or removes plain labels ("tags") on the contact for a WhatsApp number, creating the contact when the number is new. Adding a label the contact already has, or removing one it does not have, is a no-op, so it is safe to call repeatedly and concurrently. This is the call to label customers from your own systems.

Request body (JSON)

FieldTypeDescription
phonestring
addstring[]
removestring[]
namestring

Response SetContactTagsResponse

FieldTypeDescription
successboolean
messagestring
contactContact
contact.idstring
contact.namestring
contact.phonestring
contact.customFieldsobject
contact.createdAtstring
tagsstring[]
createdboolean
curl -X POST "https://api.pingx.ai/whatsapp/v1/contacts:setTags" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone":"…","add":[],"remove":[],"name":"…"}'

#DELETE /whatsapp/v1/contacts/{contactId}

DeleteContact · needs whatsapp:write

Path parameters

NameTypeDescription
contactIdstring

Response DeleteContactResponse

FieldTypeDescription
successboolean
messagestring
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/contacts/CONTACTID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PATCH /whatsapp/v1/contacts/{contactId}

UpdateContact · needs whatsapp:write

Path parameters

NameTypeDescription
contactIdstring

Request body (JSON)

FieldTypeDescription
namestring
phonestring
customFieldsobject

Response UpdateContactResponse

FieldTypeDescription
successboolean
messagestring
curl -X PATCH "https://api.pingx.ai/whatsapp/v1/contacts/CONTACTID" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…","phone":"…","customFields":{}}'

#GET /whatsapp/v1/flows

ListFlows · needs whatsapp:read (or write)

Lists flows (summaries without the graph; the complete list).

Query parameters

NameTypeDescription
phoneNumberIdstring

Response ListFlowsResponse

FieldTypeDescription
flowsFlowSummary[]
flows[].idstring
flows[].namestring
flows[].channelstring"whatsapp".
flows[].matchTypestringThe Start node's trigger: "exact" or "contains".
flows[].keywordsstring[]
flows[].activebooleanOnly active flows respond to customers.
flows[].createdAtstring
flows[].updatedAtstring
curl "https://api.pingx.ai/whatsapp/v1/flows" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/flows

CreateFlow · needs whatsapp:write

Creates an empty, inactive flow and returns its id. Not idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
namestringRequired.
channelstringDefaults to "whatsapp".

Response FlowResult

FieldTypeDescription
successboolean
messagestring
idstringId of the created flow (set by create).
curl -X POST "https://api.pingx.ai/whatsapp/v1/flows" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","name":"…","channel":"…"}'

#DELETE /whatsapp/v1/flows/{flowId}

DeleteFlow · needs whatsapp:write

Deletes a flow. Idempotent.

Path parameters

NameTypeDescription
flowIdstring

Query parameters

NameTypeDescription
phoneNumberIdstringQuery parameter in REST.

Response FlowResult

FieldTypeDescription
successboolean
messagestring
idstringId of the created flow (set by create).
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/flows/FLOWID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/flows/{flowId}

GetFlow · needs whatsapp:read (or write)

Reads one flow including its full graph.

Path parameters

NameTypeDescription
flowIdstring

Query parameters

NameTypeDescription
phoneNumberIdstringQuery parameter in REST.

Response GetFlowResponse

FieldTypeDescription
flowFlowFlow is the full persisted flow including its graph. graph format (the Flow Builder's React Flow JSON, stored verbatim): {"nodes": [{"id": "n1", "type": "", "position": {"x":0,"y":0}, "data": {...}}], "edges": [{"id": "e1", "source": "n1", "target": "n2", "sourceHandle": null, "targetHandle": null}]} "position" is only used by the visual editor. Exactly one "start" node is required and must have keywords. "sourceHandle" selects the branch of multi-output nodes: "true"/"false" for condition, the button/row "id" for buttons and list, "giveUp" for question after maxAttempts invalid replies. Node types and their "data" fields: start matchType (exact|contains), keywords[] sendMessage text question question, captureAttribute, attributeFormat (text|number|email|phone), validationError, maxAttempts input prompt, captureAttribute buttons text, buttons[{id,label}] list text, buttonLabel, sections[{title, rows[{id,title,description}]}] dynamicList text, buttonLabel, sectionTitle, sourceContextKey, idField, titleField, descriptionField, captureAttribute media mediaType (image|video|audio|document), mediaId | mediaUrl, caption multiMedia items[{mediaType, mediaId, mediaUrl, caption}] askMedia prompt, captureAttribute, allowedTypes[], validationError askLocation prompt, captureLocationAttribute, captureAddressAttribute askAddress prompt, captureAttribute, validationError template templateName, language, bodyVars[] condition variable, operator (exists|notExists|equals|notEquals| contains|notContains|greaterThan|lessThan|timeIn|dateIn), value, valueEnd setAttribute attribute, value addTag groupId (a contact group id; see ListGroups) delay amount, unit (seconds|minutes|hours|days) apiRequest method, url, headers{}, body, saveResponseTo connectFlow targetFlowId catalogMessage text, footer, thumbnailProductRetailerId product productRetailerId, bodyText, footerText multiProducts headerText, bodyText, footerText, sections[{title, productRetailerIds[]}] orderDetails prompt, captureAttribute Text fields may reference captured attributes with {{attribute}} variables. The safest way to author a graph is to GetFlow an existing flow built in the dashboard and copy its shapes.
flow.idstring
flow.namestring
flow.channelstring
flow.matchTypestring
flow.keywordsstring[]
flow.graphobjectSee the format above.
flow.activeboolean
flow.createdAtstring
flow.updatedAtstring
curl "https://api.pingx.ai/whatsapp/v1/flows/FLOWID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PUT /whatsapp/v1/flows/{flowId}

UpdateFlow · needs whatsapp:write

Saves a flow's name, trigger and graph, replacing what was stored. The graph is fully validated (INVALID_ARGUMENT lists the problems). Idempotent.

Path parameters

NameTypeDescription
flowIdstring

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
namestring
matchTypestring"exact" or "contains" (the Start node's trigger).
keywordsstring[]
graphobjectFull replacement graph; see Flow.

Response FlowResult

FieldTypeDescription
successboolean
messagestring
idstringId of the created flow (set by create).
curl -X PUT "https://api.pingx.ai/whatsapp/v1/flows/FLOWID" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","name":"…","matchType":"…","keywords":[],"graph":{}}'

#POST /whatsapp/v1/flows/{flowId}:duplicate

DuplicateFlow · needs whatsapp:write

Copies a flow (inactive, named " Copy"). Not idempotent.

Path parameters

NameTypeDescription
flowIdstring

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring

Response DuplicateFlowResponse

FieldTypeDescription
successboolean
messagestring
flowIdstringId of the new flow.
namestring" Copy".
curl -X POST "https://api.pingx.ai/whatsapp/v1/flows/FLOWID:duplicate" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…"}'

#POST /whatsapp/v1/flows/{flowId}:setActive

SetFlowActive · needs whatsapp:write

Switches a flow on or off. Activation re-validates the flow and can fail with INVALID_ARGUMENT (graph problems are listed) or NOT_FOUND. Idempotent.

Path parameters

NameTypeDescription
flowIdstring

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
activeboolean

Response FlowResult

FieldTypeDescription
successboolean
messagestring
idstringId of the created flow (set by create).
curl -X POST "https://api.pingx.ai/whatsapp/v1/flows/FLOWID:setActive" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumberId":"…","active":false}'

#GET /whatsapp/v1/inbound-messages

ListInboundMessages · needs whatsapp:read (or write)

Customer messages/replies received on the connected number(s), newest first (the dashboard's Inbound Messages report). Paginated.

Query parameters

NameTypeDescription
phoneNumberIdstring
pageSizeinteger0 = 50; clamped to [1, 200].
pageTokenstring
querystringFree-text match on sender or message text.
fromstringRFC 3339 range on received time; empty = open-ended.
tostring
includeTotalboolean

Response ListInboundMessagesResponse

FieldTypeDescription
rowsInboundMessageRow[]
rows[].messageIdstring
rows[].senderstringSender number, E.164 digits.
rows[].receivedAtstring
rows[].msgTypestringtext | button | interactive | image | ...
rows[].previewstringBest-effort text preview of the content.
nextPageTokenstring
totalMatchingstring (int64)
curl "https://api.pingx.ai/whatsapp/v1/inbound-messages" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/media

ListMedia · needs whatsapp:read (or write)

Query parameters

NameTypeDescription
phoneNumberIdstring

Response ListMediaResponse

FieldTypeDescription
mediaMediaItem[]
media[].mediaIdstring
media[].mediaTypestring
media[].identifierstring
media[].descriptionstring
curl "https://api.pingx.ai/whatsapp/v1/media" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/media

UploadMedia · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
mediaTypestring
identifierstring
descriptionstring
fileNamestring
filestring (base64)
phoneNumberIdstring

Response UploadMediaResponse

FieldTypeDescription
successboolean
messagestring
mediaMediaItem
media.mediaIdstring
media.mediaTypestring
media.identifierstring
media.descriptionstring
curl -X POST "https://api.pingx.ai/whatsapp/v1/media" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mediaType":"…","identifier":"…","description":"…","fileName":"…","file":"…","phoneNumberId":"…"}'

#DELETE /whatsapp/v1/media/{mediaId}

DeleteMedia · needs whatsapp:write

Path parameters

NameTypeDescription
mediaIdstring

Query parameters

NameTypeDescription
phoneNumberIdstring

Response DeleteMediaResponse

FieldTypeDescription
successboolean
messagestring
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/media/MEDIAID" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/message-reports

ListMessageReports · needs whatsapp:read (or write)

#=================================================================== Message reports and inbound messages

Per-message delivery log (the dashboard's Report page) with filters. This is the API equivalent of the dashboard's CSV export, which is browser-session only: walk nextPageToken until it is empty to export everything in a time range. Use ListMessages for a simple "latest N sends" view.

Query parameters

NameTypeDescription
phoneNumberIdstringNumber filter; empty = all connected numbers.
pageSizeinteger0 = 50; clamped to [1, 200].
pageTokenstring
querystringFree-text match on campaign name, template name or recipient.
categorystringMARKETING | UTILITY | AUTHENTICATION; empty = any.
statusstringsent | delivered | read | failed; "pending" = no delivery webhook yet; empty = any.
campaignNamestringSubstring filter on the campaign name (independent of query).
fromstringRFC 3339 range on sent time; empty = open-ended.
tostring
includeTotalbooleanIf true, totalMatching is filled (extra cost on large ranges).

Response ListMessageReportsResponse

FieldTypeDescription
rowsMessageReportRow[]
rows[].providerMessageIdstringWhatsApp message id ("wamid...").
rows[].campaignNamestringEmpty for one-off sends.
rows[].templateNamestring
rows[].categorystring
rows[].languagestring
rows[].recipientstringRecipient number, E.164 digits.
rows[].sentAtstring
rows[].statusstringsent | delivered | read | failed; empty = no delivery webhook yet.
rows[].errorReasonstring
rows[].bodyPreviewstringThe rendered message text.
nextPageTokenstring
totalMatchingstring (int64)Only when includeTotal was set.
curl "https://api.pingx.ai/whatsapp/v1/message-reports" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/message-stats

GetMessageStats · needs whatsapp:read (or write)

Aggregate delivery funnel (initiated/sent/delivered/read/failed/replies) for a time range plus a 7-day daily breakdown.

Query parameters

NameTypeDescription
phoneNumberIdstringEmpty = across every connected number.
categorystringempty = any
statusstringempty = any
campaignNamestringsubstring filter
fromstringRFC 3339 range. Both required.
tostring

Response GetMessageStatsResponse

FieldTypeDescription
initiatedstring (int64)
sentstring (int64)
deliveredstring (int64)
readstring (int64)
failedstring (int64)
repliesstring (int64)
dailyCountsDailyCount[]Messages per day for the last 7 calendar days.
dailyCounts[].daystring
dailyCounts[].countstring (int64)
curl "https://api.pingx.ai/whatsapp/v1/message-stats" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/messages

ListMessages · needs whatsapp:read (or write)

Query parameters

NameTypeDescription
phoneNumberIdstring
limitinteger

Response ListMessagesResponse

FieldTypeDescription
messagesMessageRow[]
messages[].providerMessageIdstring
messages[].templateNamestring
messages[].recipientstring
messages[].sentAtstring
messages[].statusstring
messages[].errorReasonstring
curl "https://api.pingx.ai/whatsapp/v1/messages" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/messages

SendMessage · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
phoneNumberIdstringRequired once the org has more than one connected number.
tostring
textText
text.bodystring
text.headerstring
text.footerstring
text.previewUrlboolean
buttonsReplyButtons
buttons.bodystring
buttons.headerstring
buttons.footerstring
buttons.buttonsButton[]
listListMessage
list.headerstring
list.bodystring
list.footerstring
list.buttonLabelstring
list.sectionsListSection[]
locationchannelV1Location
location.latitudenumber
location.longitudenumber
location.namestring
location.addressstring
mediaMedia
media.mediaUrlstring
media.mediaIdstring
media.mediaTypestring
media.captionstring
media.documentNamestring
templatechannelV1Template
template.templateNamestring
template.bodyVarsstring[]
template.headerstring
template.buttonVarsobject
template.buttonUrlPathstring
template.mediaTypestring
template.mediaUrlstring
template.mediaIdstring
template.languagestringMeta requires the template's language code to match how the template was registered (e.g. "en_US"). Empty defaults to en_US, which is wrong for any template created in another language — callers should set it.
template.cardschannelV1CarouselCard[]

Response SendMessageResponse

FieldTypeDescription
successboolean
messagestring
providerMessageIdstring
curl -X POST "https://api.pingx.ai/whatsapp/v1/messages" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d @body.json

#GET /whatsapp/v1/numbers

ListNumbers · needs whatsapp:read (or write)

Response pingxWhatsappV1ListNumbersResponse

FieldTypeDescription
numbersNumber[]
numbers[].phoneNumberIdstring
numbers[].wabaIdstring
numbers[].displayNumberstring
numbers[].verifiedNamestring
numbers[].isDefaultboolean
numbers[].qualityRatingstring
numbers[].messagingLimitTierstring
curl "https://api.pingx.ai/whatsapp/v1/numbers" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/numbers:connect

ConnectNumber · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
embeddedSignupCodestringEmbedded Signup mode: set embeddedSignupCode (+ wabaId/phoneNumberId from the same signup event). Manual mode: set accessToken instead of embeddedSignupCode, with the same wabaId/phoneNumberId.
wabaIdstring
phoneNumberIdstring
businessIdstring
accessTokenstring

Response ConnectNumberResponse

FieldTypeDescription
successboolean
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/numbers:connect" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"embeddedSignupCode":"…","wabaId":"…","phoneNumberId":"…","businessId":"…","accessToken":"…"}'

#POST /whatsapp/v1/numbers/{phoneNumberId}:disconnect

DisconnectNumber · needs whatsapp:write

Path parameters

NameTypeDescription
phoneNumberIdstring

Response DisconnectNumberResponse

FieldTypeDescription
successboolean
messagestring
curl -X POST "https://api.pingx.ai/whatsapp/v1/numbers/PHONENUMBERID:disconnect" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/opt-out-config

GetOptOutConfig · needs whatsapp:read (or write)

#=================================================================== Opt-out / opt-in handling and blocked numbers

Reads the keyword configuration that makes customers opt out of (e.g. "STOP") or back into (e.g. "START") your messages.

Query parameters

NameTypeDescription
phoneNumberIdstring

Response GetOptOutConfigResponse

FieldTypeDescription
matchTypestring"exact" (the whole message equals a keyword) or "contains".
optoutKeywordsstring[]
optoutResponsestringReply sent when a customer opts out.
optoutActiveboolean
optinKeywordsstring[]
optinResponsestringReply sent when a customer opts back in.
optinActiveboolean
curl "https://api.pingx.ai/whatsapp/v1/opt-out-config" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PUT /whatsapp/v1/opt-out-config

SetOptOutConfig · needs whatsapp:write

Replaces the whole opt-out/opt-in configuration of a number (read-modify-write: send every field). Idempotent.

Request body (JSON)

FieldTypeDescription
phoneNumberIdstring
matchTypestring"exact" or "contains"; empty = "exact".
optoutKeywordsstring[]
optoutResponsestring
optoutActiveboolean
optinKeywordsstring[]
optinResponsestring
optinActiveboolean

Response SetOptOutConfigResponse

FieldTypeDescription
successboolean
messagestring
curl -X PUT "https://api.pingx.ai/whatsapp/v1/opt-out-config" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d @body.json

#GET /whatsapp/v1/templates

ListTemplates · needs whatsapp:read (or write)

Query parameters

NameTypeDescription
phoneNumberIdstring

Response ListTemplatesResponse

FieldTypeDescription
templatespingxWhatsappV1Template[]
templates[].namestring
templates[].languagestring
templates[].categorystring
templates[].statusstring
templates[].bodystring
templates[].headerstring
templates[].footerstring
templates[].msgTypestring
templates[].buttonsTemplateButton[]
templates[].archivedboolean
templates[].mediaTypestring
templates[].rejectedReasonstringSet only when status is REJECTED — Meta's reason for rejecting it.
templates[].qualityScorestring
templates[].idstringMeta's template ID, assigned when the template is created. Empty for templates Meta has not issued an ID for. It identifies one language variant within one WABA and changes if the template is deleted and recreated, so treat it as an opaque display/lookup value, not a stable primary key; templates are still addressed by name (see DeleteTemplate).
templates[].createdAtstringRFC 3339 time the template was submitted from the dashboard. Empty for templates created outside the dashboard, since Meta does not return one.
templates[].carouselCardCountstring (int64)
templates[].carouselCardTextsstring[]Each card's body text, in card order; empty for a card with no text.
curl "https://api.pingx.ai/whatsapp/v1/templates" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#POST /whatsapp/v1/templates

CreateTemplate · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
namestring
languagestring
categorystring
msgTypestring
headerstring
headerSamplestring
bodystring
footerstring
mediaTypestring
buttonsTemplateButton[]
buttons[].typestring
buttons[].textstring
buttons[].urlstring
buttons[].samplestring
buttons[].phoneNumberstring
headerSampleFileDatastring (base64)
headerSampleFileNamestring
phoneNumberIdstring
addSecurityRecommendationbooleanAUTHENTICATION category only — the only two pieces of an AUTHENTICATION template Meta lets the caller configure; everything else about that category (header/body/footer text, OTP button) is fixed by Meta.
codeExpirationMinutesintegerMinutes before the OTP expires, shown in the message footer. 0 = unset (Meta omits the expiration line). Meta accepts 1-90.
bodyExamplestring[]One sample value per {{n}} placeholder detected in body, in order.
cardspingxWhatsappV1CarouselCard[]
cards[].headerFormatstring
cards[].headerSampleFileDatastring (base64)
cards[].headerSampleFileNamestring
cards[].textstring

Response CreateTemplateResponse

FieldTypeDescription
successboolean
messagestring
templatepingxWhatsappV1Template
template.namestring
template.languagestring
template.categorystring
template.statusstring
template.bodystring
template.headerstring
template.footerstring
template.msgTypestring
template.buttonsTemplateButton[]
template.archivedboolean
template.mediaTypestring
template.rejectedReasonstringSet only when status is REJECTED — Meta's reason for rejecting it.
template.qualityScorestring
template.idstringMeta's template ID, assigned when the template is created. Empty for templates Meta has not issued an ID for. It identifies one language variant within one WABA and changes if the template is deleted and recreated, so treat it as an opaque display/lookup value, not a stable primary key; templates are still addressed by name (see DeleteTemplate).
template.createdAtstringRFC 3339 time the template was submitted from the dashboard. Empty for templates created outside the dashboard, since Meta does not return one.
template.carouselCardCountstring (int64)
template.carouselCardTextsstring[]Each card's body text, in card order; empty for a card with no text.
curl -X POST "https://api.pingx.ai/whatsapp/v1/templates" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d @body.json

#DELETE /whatsapp/v1/templates/{templateName}

DeleteTemplate · needs whatsapp:write

Path parameters

NameTypeDescription
templateNamestring

Query parameters

NameTypeDescription
languagestring
phoneNumberIdstring

Response DeleteTemplateResponse

FieldTypeDescription
successboolean
messagestring
curl -X DELETE "https://api.pingx.ai/whatsapp/v1/templates/TEMPLATENAME" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#GET /whatsapp/v1/templates/{templateName}

GetTemplate · needs whatsapp:read (or write)

Path parameters

NameTypeDescription
templateNamestring

Query parameters

NameTypeDescription
phoneNumberIdstring

Response GetTemplateResponse

FieldTypeDescription
templatepingxWhatsappV1Template
template.namestring
template.languagestring
template.categorystring
template.statusstring
template.bodystring
template.headerstring
template.footerstring
template.msgTypestring
template.buttonsTemplateButton[]
template.archivedboolean
template.mediaTypestring
template.rejectedReasonstringSet only when status is REJECTED — Meta's reason for rejecting it.
template.qualityScorestring
template.idstringMeta's template ID, assigned when the template is created. Empty for templates Meta has not issued an ID for. It identifies one language variant within one WABA and changes if the template is deleted and recreated, so treat it as an opaque display/lookup value, not a stable primary key; templates are still addressed by name (see DeleteTemplate).
template.createdAtstringRFC 3339 time the template was submitted from the dashboard. Empty for templates created outside the dashboard, since Meta does not return one.
template.carouselCardCountstring (int64)
template.carouselCardTextsstring[]Each card's body text, in card order; empty for a card with no text.
curl "https://api.pingx.ai/whatsapp/v1/templates/TEMPLATENAME" \
  -H "Authorization: Bearer $PINGX_API_KEY"

#PATCH /whatsapp/v1/templates/{templateName}:archive

ArchiveTemplate · needs whatsapp:write

Path parameters

NameTypeDescription
templateNamestring

Request body (JSON)

FieldTypeDescription
languagestring
archivedboolean
phoneNumberIdstringWhich WABA's template to archive. Empty uses the org's default number.

Response ArchiveTemplateResponse

FieldTypeDescription
successboolean
messagestring
curl -X PATCH "https://api.pingx.ai/whatsapp/v1/templates/TEMPLATENAME:archive" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language":"…","archived":false,"phoneNumberId":"…"}'

#PUT /whatsapp/v1/webhook

SetWebhookConfig · needs whatsapp:write

Request body (JSON)

FieldTypeDescription
urlstring

Response SetWebhookConfigResponse

FieldTypeDescription
successboolean
messagestring
signingSecretstring
curl -X PUT "https://api.pingx.ai/whatsapp/v1/webhook" \
  -H "Authorization: Bearer $PINGX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"…"}'