Events

Endpoint for sending events.

Send an event

Sends an event to the referenced contact from the referenced app. Note that this operation enqueues the event in a queue so a successful response only indicates that the event has been queued.

SecurityBasic or oAuth2
Request
path Parameters
project_id
required
string

The unique ID of the project. You can find this on the Sinch Dashboard.

Request Body schema: application/json

The event to be sent.

app_id
required
string

The ID of the app sending the event.

required
contact_id (object) or identified_by (object)

The recipient of the event. Requires either contact_id or identified_by. If Dispatch Mode is used, only identified_by is allowed.

required
composing_event (object) or composing_end_event (object) or comment_reply_event (object) or agent_joined_event (object) or agent_left_event (object) or generic_event (object) (AppEvent)
callback_url
string

Overwrites the default callback url for delivery receipts for this message The REST URL should be of the form: http://host[:port]/path

channel_priority_order
Array of strings (Channel Identifier)

Optional. A single element array that dictates on what channel should the Conversation API try to send the event. It overrides any default set on the contact. Providing more than one option has no effect.

Items Enum: "WHATSAPP" "RCS" "SMS" "MESSENGER" "VIBER" "VIBERBM" "MMS" "INSTAGRAM" "TELEGRAM" "KAKAOTALK" "KAKAOTALKCHAT" "LINE" "WECHAT"
event_metadata
string

Optional. Eventual metadata that should be associated to the event.

queue
string (MessageQueue)

Select the priority type for the message

Enum: "NORMAL_PRIORITY" "HIGH_PRIORITY"
Responses
200

A successful response.

Response Schema: application/json
accepted_time
string <date-time>

Accepted timestamp.

event_id
string

Event id.

400

Malformed request

401

Incorrect credentials

403

Correct credentials but you don't have access to the requested resource

500

Correct credentials but you don't have access to the requested resource

501

Something went wrong on our end, try again with exponential back-off

post/v1/projects/{project_id}/events:send
Request samples
application/json
{
  • "app_id": "string",
  • "event": { },
  • "recipient": {
    • "contact_id": "{CONTACT_ID}"
    }
}
Response samples
application/json
{
  • "accepted_time": "2019-08-24T14:15:22Z",
  • "event_id": "string"
}