WhatsApp Optin API
Use the WhatsApp Optin APIs to create opt-ins, update opt-in or opt-out status, and check whether a phone number has opted in to receive WhatsApp messages.
API overview
Create optin for the WhatsApp Business account.
Create optin/optout for the WhatsApp Business account.
Check if a phone number has opted-in to receive messages from the WhatsApp Business account.
Endpoint summary
| API | Purpose | URL |
|---|---|---|
| Create Optin | Create optin for the WhatsApp Business account. | https://apis.rmlconnect.net/wbo/v2/optin/store |
| Create Optin and Optout | Create optin/optout for the WhatsApp Business account. | https://apis.rmlconnect.net/wbo/v2/optinout/store |
| Check Optin | Check optin if a particular phone number has opted-in to receive messages from the WhatsApp Business account. | https://apis.rmlconnect.net/wbo/v2/optin/check |
Create Optin
Create optin for the WhatsApp Business account.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wbo/v2/optin/store |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
| Request Body schema | application/json |
Request sample
{
"extra": "{extra}",
"msisdn": "{phone number with + and country code}",
"optin_channel": "whatsapp-api/third-party/sms/landing-page/email/voice/missed-call/physical-form"
}Request body parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| msisdn | Yes | string | The phone number with '+' and country code for the user opting in. |
| optin_channel | Yes | string | The channel through which the user opted in. |
| extra | No | string | Any additional information related to the optin process. |
Create Optin responses
201 Created
Response
{
"status": "success",
"message": "api execution successful",
"details": "given 'msisdn' is not opted in for user Demo8"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the message delivery. |
| message | string | The message response. |
| details | string | The details of the message. |
401 Authentication Failure
Response
{
"message": "Unable to process request",
"status": "Failed",
"reason": "Please check the integrity or validity of the token sent."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the product feed update request. |
| status | string | The status of the product feed update. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
422 Unprocessable Entity (WebDAV)
Response
{
"message": "unable to process request",
"status": "failed",
"error": {
"optin_channel": [
"Unknown field."
]
}
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| status | string | The status for the optin. |
| error | object | The error for not processing the optin request. |
500 Internal Server Error
Response
{
"status": "failed",
"message": "unable to process request",
"reason": "reason"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status for creating optin. |
| message | string | The response message. |
| reason | string | The reason for not processing the request. |
Create Optin and Optout
Create optin/optout for the WhatsApp Business account.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wbo/v2/optinout/store |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
| Request Body schema | application/json |
Request sample
{
"extra": "{extra}",
"msisdn": "{phone number with + and country code}",
"optin_channel": "whatsapp-api/third-party/sms/landing-page/email/voice/missed-call/physical-form",
"status": "optin/optout"
}Request body parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| msisdn | Yes | string | The phone number with '+' and country code for the user opting in. |
| optin_channel | Yes | string | The channel through which the user opted in. |
| extra | No | string | Any additional information related to the optin process. |
| status | Yes | string | Status which implies whether user is being opt-in or opt out. |
Create Optin and Optout responses
201 Created
Response
{
"status": "success",
"message": "api execution successful",
"details": "given 'msisdn' is now opted out for user <channel_name>"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the message delivery. |
| message | string | The message response. |
| details | string | The details of the message. |
401 Authentication Failure
Response
{
"message": "Unable to process request",
"status": "Failed",
"reason": "Please check the integrity or validity of the token sent."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the product feed update request. |
| status | string | The status of the product feed update. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
422 Unprocessable Entity (WebDAV)
Response
{
"message": "unable to process request",
"status": "failed",
"error": {
"optin_channel": [
"Unknown field."
]
}
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| status | string | The status for the optin. |
| error | object | The error for not processing the optin request. |
500 Internal Server Error
Response
{
"status": "failed",
"message": "unable to process request",
"reason": "reason"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status for creating optin. |
| message | string | The response message. |
| reason | string | The reason for not processing the request. |
Check Optin
Check optin if a particular phone number has opted-in to receive messages from the WhatsApp Business account.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wbo/v2/optin/check |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| msisdn | Yes | string | The phone number with '+' and country code for the user opting in. |
Check Optin responses
200 Success
Response
{
"status": "success",
"message": "api execution successful",
"details": "Given 'msisdn' is not opted in 'channel' missed-call"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status for check optin. |
| message | string | The response message. |
| details | string | The optin details. |
401 Authentication Failure
Response
{
"message": "Unable to process request",
"status": "Failed",
"reason": "Please check the integrity or validity of the token sent."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the product feed update request. |
| status | string | The status of the product feed update. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
422 Unprocessable Entity (WebDAV)
Response
{
"message": "unable to process request",
"status": "failed",
"error": {
"msisdn": [
"Field may not be null."
]
}
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| status | string | The optin status of msisdn. |
| error | object (inline_response_422_5_error) | The error details. |
500 Internal Server Error
Response
{
"status": "failed",
"message": "unable to process request",
"reason": "reason"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status for check optin. |
| message | string | The response message. |
| reason | string | The reason for not processing the request. |
Updated 4 days ago