For the complete documentation index, see llms.txt. This page is also available as Markdown.

Post an event

Post an event which can be used to trigger flows in Recart.

Three preconditions must hold, each of which fails with its own status code:

  • the event source (source.category and source.name) is registered for the site via POST /event-sources,

  • phoneNumber belongs to an existing subscriber — this endpoint never creates one,

  • that subscriber has an active SMS subscription.

A newly registered event source does not become usable instantly. Allow a short delay after creating one before posting the first event against it, and expect the first events to be able to fail with 417 until it has propagated.

Whether a flow is actually listening for the event is not checked. If no active Integration flow uses the event source as its trigger, the event is still accepted and simply results in no message — so confirm the flow is active in the Recart dashboard when events succeed but nothing is sent.

The event is queued for processing, so 200 confirms that it was accepted, not that a message was sent. The 200 response body is the plain-text string OK, not a JSON:API document — do not parse it as JSON.

post
Authorizations
X-Recart-API-KeystringRequired

It can be obtained in Recart account after contacting Support

Body
Responses
200

The event was accepted and queued for processing. The body is the plain-text string OK.

text/plain
stringOptionalExample: OK
post/events
POST /app-integrations/2023-12/events HTTP/1.1
Host: api.recart.com
X-Recart-API-Key: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 181

{
  "data": {
    "type": "events",
    "attributes": {
      "phoneNumber": "+36301234567",
      "source": {
        "category": "payment",
        "name": "billing attempt failed"
      },
      "properties": {
        "yourVariableName": "your value"
      }
    }
  }
}
OK

Last updated

Was this helpful?