Skip to main content
POST
Send WhatsApp conversion event

Request contract

  • Method and path: POST /apis/v1/social/messaging/whatsapp/conversions
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/social/messaging/whatsapp/conversions
  • connectionId: query; required
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

No additional charge for this operation.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

connectionId
string
required

Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.

Pattern: ^msc_[0-9A-Za-z]+$

Body

application/json

In addition to the required list, at least one of conversationId or phoneE164 must be supplied (used to resolve the originating CTWA conversation). The route enforces this at the Zod boundary; OpenAPI's required cannot express OR-required cleanly.

eventId
string
required

Stable dedup key. Reuse to suppress duplicate events (Meta dedupes against pixel events with the same id).

Minimum string length: 1
eventName
enum<string>
required

Event names accepted by Meta's CAPI for Business Messaging. Other standard pixel events including Lead, CompleteRegistration, Subscribe, Schedule, Contact, StartTrial, AddPaymentInfo, Search, and SubmitApplication are rejected with subcode 2804066 ("Messaging Event Invalid Event Type") on action_source = business_messaging events. Custom event names are also rejected.

Use LeadSubmitted (NOT Lead) when a lead comes in and QualifiedLead once your team qualifies it.

Available options:
LeadSubmitted,
QualifiedLead,
Purchase,
AddToCart,
InitiateCheckout,
ViewContent,
OrderCreated,
OrderCanceled,
OrderReturned
connectionId
string

The connection, when not sent as the connectionId query parameter.

Pattern: ^msc_[0-9A-Za-z]+$
contentIds
string[]

Optional product / content identifiers.

currency
string

ISO 4217 currency code (e.g. USD).

Required string length: 3
email
string<email>

User email. Normalized + SHA-256 hashed before sending to Meta.

eventTime
number

Unix seconds. Defaults to the time of the request when omitted. Meta's attribution window is 7 days from click; events older than that lose attribution.

externalId
string

Stable customer identifier. Lowercased + SHA-256 hashed before sending to Meta.

phoneE164
string

Contact phone number, digits only with no '+'. When used in lieu of conversationId, the handler resolves to the most recent CTWA-attributed conversation for this phone on the supplied account.

Minimum string length: 1
testCode
string

Meta test_event_code passthrough, sent at the request root (a root-level test_event_code is accepted as an alias). The event shows in Events Manager's Test Events tab for the dataset whose current test code matches. Meta still processes it like any other event, so remove it in production.

value
number

Conversion value (e.g. order total).

Response

Success

eventsFailed
integer

Events rejected by Meta (see failures).

eventsReceived
integer

Events accepted by Meta.

failures
object[]

Per-event failure detail. Empty when all events were accepted.

platform
enum<string>
Available options:
metaads
testCode
string | null

The test code sent to Meta, or null when the request carried none.

traceId
string

Meta fbtrace_id for debugging. Surface in support tickets.