Messaging Channels
Send messages to your customers using different communication channels.
To support Messaging Channels for Identities you must enable Infobip CDP Extension. Messging Channel for Users are supported by default.
Send SMS
Use v1/apps/message/sms APi call to send SMS message. The Message is sent to the phone number set in the to
field
curl --location --request POST 'https://api.orangepill.cloud/v1/apps/message/sms' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"to":"38598123456",
"content":{
"text": "My text message",
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Send WhatsApp
Use v1/apps/message/whatsapp APi call to send a WhatsApp message. The Message is sent to phone number set in the to
field
curl --location --request POST 'https://api.orangepill.cloud/v1/apps/message/whatsapp' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"to":"38598123456",
"content":{
"templateName": "transaction_successful_v5_es",
"templateData": {
"body": {
"placeholders": [
"DataPlan 100MB Daily (24 Hours)"
]
}
},
"language": "es"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Send Email
Use v1/apps/message/email APi call to send a email message. The Email is sent to the address set in the to
field
curl --location --request POST 'https://api.orangepill.cloud/apps/message/email' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"to":"[email protected]",
"content": {
"subject": "This is a test subject",
"html": "<b>This is test html email message</b>",
"text": "This is test text email message"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "[email protected]"
}
]
}
Send SMS to User
Use /v1/users/{id}/message/sms APi call to send an SMS message. The Message is sent to the phone number set in the channel.sms
field of User object.
curl --location --request POST 'https://api.orangepill.cloud/v1/users/634b56217f6a7b0be52dffbd/message/sms' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": {
"text": "This is test SMS message"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Send WhatsApp to User
Use /v1/users/{id}/message/whatsapp APi call to a WhatsApp message. The Message is sent to the phone number set in channel.whatsapp
field of the User object.
curl --location --request POST 'https://api.orangepill.cloud/v1/users/634b56217f6a7b0be52dffbd/message/whatsapp' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": {
"templateName": "transaction_successful_v5_es",
"templateData": {
"body": {
"placeholders": [
"DataPlan 100MB Daily (24 Hours)"
]
}
},
"language": "es"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Send Email to User
Use /v1/users/{id}/message/email APi call to send an email message. Email is sent to the address set in the channel.email
field of the User object.
curl --location --request POST 'https://api.orangepill.cloud/v1/users/634b56217f6a7b0be52dffbd/message/email' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": {
"subject": "This is a test subject",
"html": "<b>This is test html email message</b>",
"text": "This is test text email message"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Send SMS to Person
Use /v1/identities/{id}/person/message/sms APi call to send an SMS message. The Message is sent to the phone number set in person.contactInformation.phone[0].number
field of Identity object.
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/message/sms' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": {
"text": "This is test SMS message"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Send WhatsApp to Person
Use /v1/identities/{id}/person/message/whatsapp APi call to send a WhatsApp message. The Message is sent to phone number set in person.contactInformation.phone[0].number
field of Identity object.
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/message/whatsapp' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": {
"templateName": "transaction_successful_v5_es",
"templateData": {
"body": {
"placeholders": [
"DataPlan 100MB Daily (24 Hours)"
]
}
},
"language": "es"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Send Email to Person
Use /v1/identities/{id}/person/message/email APi call to send an email message. The email is sent to the address set in person.contactInformation.email[0].address
field of the Identity object.
curl --location --request POST 'https://api.orangepill.cloud/v1/identities/634b56217f6a7b0be52dffbd/person/message/sms' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'idempotency-key: 27373fabc392933deffda' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": {
"subject": "This is a test subject",
"html": "<b>This is test html email message</b>",
"text": "This is test text email message"
}
}'
in response you will get message processing status.
{
"messages": [
{
"messageId": "3919977727444335893722",
"status": {
"groupId": 1,
"groupName": "PENDING",
"id": 26,
"name": "PENDING_ACCEPTED",
"description": "Message sent to next instance"
},
"destination": "38598123456"
}
]
}
Last updated
Was this helpful?