Send Session Message
Sample Response
Sends a message to a specified contact number within a session. You can send a file along with text, but ensure that the message contains at least one of the following: text, file, file URL, or sticker.
The session key generated by your admin to control which channel can send messages via the API.
The target contact number (e.g., 85256872847).
The text message to send. At least one of text, file, file_url, or sticker_id must be provided.
The file to send. At least one of text, file, file_url, or sticker_id must be provided. If you want to use this field with File please use the "multipart/form-data" content type and file format (binary file).
The URL of a file to send. At least one of text, file, file_url, or sticker_id must be provided.
The ID of a sticker to send. At least one of text, file, file_url, or sticker_id must be provided.
The secret key provided by iSlash for accessing the iSlash API platform.
The file to upload as part of the message.
Success
POST /api/public/send-session-message HTTP/1.1
Host: {islash_api_endpoint}
X-USER-TOKEN: text
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17
{
"file": "binary"
}
Success
{
"meta": {
"code": "text",
"message": "text"
},
"data": {
"message": {
"id": 1,
"conversation_id": 1,
"status": "pending",
"body": "text",
"color": "text",
"media_type": "text",
"media_url": "text",
"sid": "text",
"direction": "text",
"is_auto_message": true,
"is_forwarded": true,
"is_template_message": true,
"is_sticker": true,
"is_cloned": true,
"quote_message": "text",
"media_thumbnail": "text",
"media_filename": "text",
"media_status": "text",
"media_resolution_x": 1,
"media_resolution_y": 1,
"sent_at": 1,
"delivered_at": "text",
"received_at": "text",
"read_at": "text",
"read_by": "text",
"read_by_user": "text",
"revoked_at": "text"
}
}
}
{
"meta": {
"code": "RESP_OKAY",
"message": "Success"
},
"data": {
"message": {
"id": 9126,
"conversation_id": 246,
"user": null,
"user_id": null,
"contact": null,
"status": "sent",
"body": "Hello Testing",
"media_type": null,
"media_url": null,
"sid": "gBGGhSlIRoQvAgn-vsCRNiIMutE",
"direction": "outbound",
"is_auto_message": true,
"is_forwarded": false,
"is_template_message": false,
"is_sticker": false,
"is_cloned": false,
"quoted_message": null,
"media_thumbnail": null,
"media_filename": null,
"media_status": null,
"media_resolution_x": null,
"media_resolution_y": null,
"message_at": 1649755452,
"sent_at": 1649755452,
"delivered_at": null,
"received_at": null,
"read_at": null,
"read_by": null,
"read_by_user": null,
"revoked_at": null
}
}
}
Last updated