Sending messages
Last updated
Last updated
In this guide, we will show you how to send messages to your candidates using the Recrubo API.
We currently only support sending text messages to candidates. Support for images, videos, and other media types will soon be added.
If you are using WhatsApp, you will need to be sure that the 24-hour window has not expired since the last message was sent by the candidate. If the 24-hour window has expired, you will need to use a MessageTemplate to send a message.
Webhooks on messages to receive the message status.
To send a message to a candidate, you will need to make a POST request to the public/v2/messages
endpoint. The body of the request should include the following fields:
You are also allowed to include the messageThreadId
in the attributes of the message to avoid the need to include the relationship.
You will receive a response with the message details, including the message ID, the message text, and the message status.
Message status will always be accepted
if the message was accepted by the external provider. If the message was not accepted, you will receive an error message in the errorMessages
field.
accepted
does not mean sent. In the case of WhatsApp, if you send a valid message outside the 24 hour window, the message will be accepted but when WhatsApp tries to send it, it will fail. If subscribed to the deliveryStatus
field on the Message resource through Webhooks we will notify you by sending a WebhookPayload.
You can fetch messages using the message
resource. You can filter messages by messageThreadId
.
Alternatively, you can fetch messages by message thread using the messageThread
resource