Send Session Message

Sample Response

Send a message in a session

post

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.

Header parameters
X-USER-TOKENstringRequired

The secret key provided by iSlash for accessing the iSlash API platform.

Body
sessionstringRequired

The session key generated by your admin to control which channel can send messages via the API.

identitystringRequired

The target contact number (e.g., 85256872847).

textstringOptional

The text message to send. At least one of text, file, file_url, or sticker_id must be provided.

filestring · binaryOptional

The file to upload as part of the message. At least one of text, file, file_url, or sticker_id must be provided.

file_urlstringOptional

The URL of a file to send. At least one of text, file, file_url, or sticker_id must be provided.

sticker_idstringOptional

The ID of a sticker to send. At least one of text, file, file_url, or sticker_id must be provided.

quoted_message_idintegerOptional

The ID of the message to quote/reply to.

Responses
chevron-right
200

Success

application/json
post
/send-session-message
200

Success

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