Messaging
cURL
curl --request POST \ --url https://api.stackone.com/unified/messaging/messages \ --header 'Authorization: Basic <encoded-value>' \ --header 'Content-Type: application/json' \ --header 'x-account-id: <x-account-id>' \ --data ' { "content": "Hello, world!", "recipient": "c28xyrc55866bvuv", "sender": "+34820398402" } '
{ "statusCode": 201, "message": "Record created successfully.", "timestamp": "2021-01-01T01:01:01.000Z", "data": { "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3", "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3" } }
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Basic <encoded-value>
<encoded-value>
username:password
The account identifier
Content body of the message
"Hello, world!"
Can be a conversation ID, user ID, email or phone number.
"c28xyrc55866bvuv"
The account_id or phone number of the message sender
"+34820398402"
The message was sent successfully.
201
"Record created successfully."
"2021-01-01T01:01:01.000Z"
Show child attributes
Unique identifier
"8187e5da-dc77-475e-9949-af0f1fa4e4e3"
Provider's unique identifier
Was this page helpful?