Ingest

Ingest

A universal inbound webhook that turns any external event into an AwnCare conversation or ticket — perfect for Zapier, Make, or custom back-ends.

Overview

Ingest is the catch-all inbound connector. Point any tool that can send an HTTP POST at it, and each request becomes a message in the inbox or a support ticket.

Unlike outbound webhooks (which notify you), Ingest receives data from you. It is provided by the Webhook integration in the Integrations center.

Creating the endpoint

In the dashboard, open Integrations, add the Webhook connector, and copy its endpoint URL and secret. Each integration has its own id and secret.

Guard the secret

The secret is passed as a query parameter and authorizes the endpoint. Keep the full URL private and rotate it if leaked.

Endpoint & payload

Send a POST with the integration id in the path and the secret in the query string.

POST/api/webhooks/integrations/{id}?secret=…

Payload

A JSON body describing the sender and the content.

FieldTypeDescription
type"message" | "ticket"message (default) routes to the inbox; ticket opens a support ticket.
bodyRequiredstringThe message or ticket body. Required.
subjectstringOptional subject; for messages it is prepended to the body.
visitor.namestringSender's name.
visitor.emailstringSender's email (used to match or create the contact).
visitor.phonestringSender's phone.
visitor.externalIdstringStable id from your system; the preferred way to match a contact.
metaobjectArbitrary metadata attached to the ingested item.
The sender is resolved by externalId, then email, then phone. With none of these, each request creates a fresh anonymous visitor.

Sending a message

Set type to "message" (the default) to route the body into a conversation in the shared inbox.

bash
curl -X POST \
  "https://awn.care/api/webhooks/integrations/int_abc?secret=YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "message",
    "visitor": {
      "name": "Sara",
      "email": "[email protected]",
      "phone": "+966500000000",
      "externalId": "usr_10294"
    },
    "subject": "Order #1043",
    "body": "أين طلبي؟"
  }'

A 200 response returns the created conversation and message ids.

json
{
  "ok": true,
  "kind": "message",
  "conversationId": "cnv_8f2a",
  "messageId": "msg_10"
}

Creating a ticket

Set type to "ticket" to open a support ticket instead. The subject defaults to the first 80 characters of the body.

bash
curl -X POST \
  "https://awn.care/api/webhooks/integrations/int_abc?secret=YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "ticket",
    "visitor": { "name": "Sara", "email": "[email protected]" },
    "subject": "Cannot log in",
    "body": "500 error on sign-in since this morning."
  }'

A 200 response returns the new ticket id and number.

json
{
  "ok": true,
  "kind": "ticket",
  "ticketId": "tkt_5",
  "ticketNumber": 1043
}

Zapier, Make & custom

Any platform that can send a POST with a JSON body works — add a Webhooks action, paste the endpoint URL (with the secret), and map your fields.

In Zapier or Make, choose a "POST JSON" webhook action and map your trigger fields onto visitor, subject, and body.