Download OpenAPI specification:Download

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 queues so a successful response only indicates that the event has been queued.

Request
Security:
Basic
or
oAuth2
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 comment_reply_event (object)

Event originating from an app

callback_url
string

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

channel_priority_order
Array of strings (Channel Identifier)

Optional. Channel priority order that dictates on which channels the Conversation API should try to send the message on. The order provided here overrides any default.

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

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

queue
string (MessageQueue)

Not yet supported. This field is for future use.

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"
}