Skip to main content

Sending Messages

To send a message through the API channel, make a POST request to the /api-channel endpoint.

Request Example

curl -X POST 'https://dingg.periscopechat.com/api-channel' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your-api-key>' \
-d '{
"channel_id": "<channel-id>",
"user": {
"identity": "<user-id>",
"name": "<user-name>"
},
"message": "Hello world!",
"metadata": {
"business_id": "<business-id>",
"customer_id": "<customer-id>"
}
}'

Request Parameters

ParameterTypeRequiredDescription
channel_idstringYesThe identifier for your API channel
userobjectYesObject containing user information
user.identitystringYesUnique identifier for the user
user.namestringYesDisplay name of the user
messagestringYesThe message text to be processed by the AI
metadataobjectNoAdditional data to include with the request (returned unchanged in webhook response)

Authentication

Include your API key in the Authorization header using the Bearer token format. For more information about obtaining and managing API keys, see API Keys.

Response

Upon successful submission, the API returns a 200 status code with the following JSON response:

{
"status": "queued",
"message": "Message received and will be processed"
}
FieldTypeDescription
statusstringCurrent status of the message ("queued")
messagestringA human-readable description of the request status

Note: This is an asynchronous API. A successful response indicates that the message was received and queued for processing, not that it has been fully processed.