curl --request POST \
--url https://api.salescaptain.com/v1/send-message/{company_id}/{conversation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message_body": "Hi — this is a test message from the api-doc send endpoint."
}
'{
"message": "Message sent successfully!",
"data": {
"conversation_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"author": "Jane Doe",
"body": "Hi — this is a test message from the api-doc send endpoint.",
"date_created": "2025-03-23T18:30:00.000Z",
"is_me": true,
"message_type": "sms_message",
"sent_by_id": "d4e5f6a7-b8c9-0123-def1-234567890123",
"sent_by_username": "Jane Doe",
"message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Send message by ID
Sends an outbound message in the given conversation for the specified company.
company_id and conversation_id are taken from the URL path. message_body is required in the JSON body.
Optional template_id can be provided to send a template message.
account_id is resolved from the authenticated user’s account that matches company_id (same as other company-scoped routes).
The request is forwarded to the chat service as a POST with company_id and conversation_id in the path.
curl --request POST \
--url https://api.salescaptain.com/v1/send-message/{company_id}/{conversation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message_body": "Hi — this is a test message from the api-doc send endpoint."
}
'{
"message": "Message sent successfully!",
"data": {
"conversation_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"author": "Jane Doe",
"body": "Hi — this is a test message from the api-doc send endpoint.",
"date_created": "2025-03-23T18:30:00.000Z",
"is_me": true,
"message_type": "sms_message",
"sent_by_id": "d4e5f6a7-b8c9-0123-def1-234567890123",
"sent_by_username": "Jane Doe",
"message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Authorizations
Authentication token required for accessing protected endpoints. The token should be obtained from the main SalesCaptain authentication service.
Path Parameters
Unique identifier for the company
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Unique identifier for the conversation
"b2c3d4e5-f6a7-8901-bcde-f12345678901"

