MessageTemplate is a resource that represents a template for a message that can be sent to a candidate. It can be used in the initial message of a FlowRun. Or as a standalone message. MessageTemplates are a proxy of WhatsApp templates.
This means it is a requirement to have a WhatsApp Business Account/number connected to the platform to create these messages. However, the MessageTemplate can be used to send messages to any channel, not just WhatsApp.
Currently it is not possible to update a MessageTemplate after it has been created.
Endpoints
GET /message-templates - Retrieve a list of all MessageTemplates.
GET /message-templates/{id} - Retrieve a specific MessageTemplate by ID.
POST /message-templates - Create a new MessageTemplate.
DELETE /message-templates/{id} - Delete a specific MessageTemplate by ID.
Attributes
Field
Type
Description
name
String
The name of the message template. This is displayed in the message payload.
{
"data": {
"type": "messageTemplates",
"attributes": {
"name": "start_application",
"components": [
{
"text":"Recrubo application!",
"type": "HEADER",
"format": "Text"
},
{
"text": "Hi {{1}}, great to see you want to work with us! Reply to this message to schedule your interview.",
"type": "BODY",
"example": {
"body_text": [
[
"John"
]
]
}
},
{
"text": "Team Recrubo",
"type": "FOOTER"
}
],
"language": "en",
"category": "MARKETING",
"preview": "Hi {{1}}, great to see you want to work with us! Reply to this message to schedule your interview."
}
}
}
{
"errors": [
{
"code": "bad_request",
"status": 400,
"title": "Bad Request",
"detail": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 2388024,
"is_transient": false,
"error_user_title": "Content in this language already exists",
"error_user_msg": "There is already English content for this template. You can create a new template and try again.",
"fbtrace_id": "AeodpEogjjeg5cgl43HljgP"
}
}
]
}
{
"data": {
"id": "e28a0e38-1b2f-4cc2-82e8-b49101ea2df4",
"type": "messageTemplates",
"attributes": {
"createdAt": "2024-08-20T10:45:08+00:00",
"updatedAt": "2024-08-20T10:45:08+00:00",
"name": "contact_request",
"components": [
{
"text": "Hi {{1}}, enige tijd geleden heb je bij Blokker gesolliciteerd. Heb je nog steeds interesse in de vacature? Klik op ja/nee knop hieronder, indien jouw antwoord ja is nemen we contact met je op. Gr. Team Blokker",
"type": "BODY"
}
],
"language": "nl",
"category": "some_category",
"status": "some_status",
"preview": "Hi {{1}}, enige tijd geleden heb je bij Blokker gesolliciteerd. Heb je nog steeds interesse in de vacature? Klik op ja/nee knop hieronder, indien jouw antwoord ja is nemen we contact met je op. Gr. Team Blokker"
},
"relationships": {
"user": {
"links": {
"related": null
}
}
}
},
"meta": {}
}
GET /public/v2/message-templates/{id} HTTP/1.1
Host: {defaultHost}
Authorization: YOUR_API_KEY
Accept: */*
{
"data": {
"id": "1b38de11-5735-487f-9de4-10c500c37e3e",
"type": "messageTemplates",
"attributes": {
"createdAt": "2024-08-20T10:45:08+00:00",
"updatedAt": "2024-08-20T10:45:08+00:00",
"name": "contact_request",
"components": [
{
"text": "Hi {{1}}, enige tijd geleden heb je bij Blokker gesolliciteerd. Heb je nog steeds interesse in de vacature? Klik op ja/nee knop hieronder, indien jouw antwoord ja is nemen we contact met je op. Gr. Team Blokker",
"type": "BODY"
}
],
"language": "nl",
"category": "TRANSACTIONAL",
"status": "approved",
"preview": "Hey! Wat leuk dat je interesse hebt in een baan bij Blokker. π \n \nAntwoord met start om de sollicitatie te starten."
},
"relationships": {
"user": {
"links": {
"related": null
}
}
}
},
"meta": {}
}
GET /public/v2/message-templates HTTP/1.1
Host: {defaultHost}
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "760063d0-f554-4dcd-af0f-bfc763a640d0",
"type": "messageTemplates",
"attributes": {
"createdAt": "2024-08-20T10:45:08+00:00",
"updatedAt": "2024-08-20T10:45:08+00:00",
"name": "contact_request",
"components": [
{
"text": "Hi {{1}}, enige tijd geleden heb je bij Blokker gesolliciteerd. Heb je nog steeds interesse in de vacature? Klik op ja/nee knop hieronder, indien jouw antwoord ja is nemen we contact met je op. Gr. Team Blokker",
"type": "BODY"
}
],
"language": "nl",
"category": "TRANSACTIONAL",
"status": "approved",
"preview": "Hey! Wat leuk dat je interesse hebt in een baan bij Blokker. π \n \nAntwoord met start om de sollicitatie te starten."
},
"relationships": {
"user": {
"links": {
"related": null
}
}
}
},
{
"id": "cb5bb820-6d28-4624-9796-91456a249c4a",
"type": "messageTemplates",
"attributes": {
"createdAt": "2024-08-20T10:45:08+00:00",
"updatedAt": "2024-08-20T10:45:08+00:00",
"name": "contact_request",
"components": [
{
"text": "Hi {{1}}, enige tijd geleden heb je bij Blokker gesolliciteerd. Heb je nog steeds interesse in de vacature? Klik op ja/nee knop hieronder, indien jouw antwoord ja is nemen we contact met je op. Gr. Team Blokker",
"type": "BODY"
}
],
"language": "nl",
"category": "TRANSACTIONAL",
"status": "approved",
"preview": "Hey! Wat leuk dat je interesse hebt in een baan bij Blokker. π \n \nAntwoord met start om de sollicitatie te starten."
},
"relationships": {
"user": {
"links": {
"related": null
}
}
}
},
{
"id": "2fd7c499-0ba2-48ff-a60e-c0ade0f603e4",
"type": "messageTemplates",
"attributes": {
"createdAt": "2024-08-20T10:45:08+00:00",
"updatedAt": "2024-08-20T10:45:08+00:00",
"name": "contact_request",
"components": [
{
"text": "Hi {{1}}, enige tijd geleden heb je bij Blokker gesolliciteerd. Heb je nog steeds interesse in de vacature? Klik op ja/nee knop hieronder, indien jouw antwoord ja is nemen we contact met je op. Gr. Team Blokker",
"type": "BODY"
}
],
"language": "nl",
"category": "TRANSACTIONAL",
"status": "approved",
"preview": "Hey! Wat leuk dat je interesse hebt in een baan bij Blokker. π \n \nAntwoord met start om de sollicitatie te starten."
},
"relationships": {
"user": {
"links": {
"related": null
}
}
}
}
],
"meta": {
"total": 3,
"totalUnfiltered": 3,
"currentSize": 25,
"currentPage": 1,
"maxPage": 1
}
}