Submit an Agent Verification
POST Method
The Submit an Agent Verification API allows you to manage and submit RCS business verification requests through code, ensuring your messaging agent is approved and recognized as a trusted sender before launching campaigns.
Prerequisites
- After you sign up, your account will be on the trial version. You must complete the KYC to access all the features in kaleyra.io.
- Before you get started, Create an API Key. To view the API Key and the SID, see View API Key and SID.
- Before sending the RCS, you must configure the RCS channel in the Kaleyra platform. To configure the RCS channel in your account, please contact your local Kaleyra representative.
Base URL
| URL | Region |
|---|---|
https://rcs-api.<pod>.kaleyra.io | For North America (NA). |
https://rcs-api.<pod>.kaleyra.io | For the rest of the world. |
API Domain and Value
| api_domain | Value |
|---|---|
| IN pod | https://rcs-api.in.kaleyra.io |
| NA pod | https://rcs-api.na.kaleyra.io |
API request to Submit an Agent Verification
To submit an agent verification, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/agentstatus/verifyagent endpoint with the following request method:
The following is the request format to submit an agent verification.
curl --location --request PUT 'https://<api-domain>/v1/<sid>/rcs/agent/agentstatus/verifyagent' \
--header 'api-key: <api-key>' \
--header 'Content-Type: <content-type>' \
--data-urlencode 'agent_number: <agent_number>'Error scenarios table
The following is the sample request format to submit an agent verification:
curl --location --request PUT 'https://rcs-api.in.kaleyra.io/v1/XXXXX6913850XXXX/rcs/agentstatus/verifyagent' \
--header 'api-key: XXXXX3b8497f58a94e84b671aca43XXXX' \
--header 'Content-Type: application/json' \
--data-urlencode 'agent_number: 7075'Error scenarios table URL Parameters and Headers
The following is the list of parameters and headers to send the API request:
| Parameter/Headers | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
sid | String | Account SID (Security Identifier). | XXXXX6913850XXXX | Yes |
Content-Type | String | Indicates the format of the content the API will be processing. | The only allowed value is application/JSON | Yes |
api-key | String | API key generated from kaleyra.io account. | XXXXX3b8497f58a94e84b671aca43XXXX | Yes |
The following is the list of parameters to be used in the payload to submit an agent verification by agent number:
| Parameter | Data Type | Description | Example | Mandatory? |
|---|---|---|---|---|
agent_number | string | Auto generated number by the server at the time of create agent request. | 48400 | Yes |
Sample Success Response (true)
The following is the sample success response:
{
"code": "RCS912",
"message": "Agent verification submitted successfully",
"data": "true",
"error": {}
}Sample Success Response (false)
The following is the failure sample response:
{
"code": "RCS913",
"message": "Agent verification submission failed.",
"data": "false",
"error": {}
}Sample Failure Response
The following are the sample failure responses:
Missing Agent Number
{
"code": "RCS904",
"message": "Agent verification submission failed
"
"data": [],
"error": {
"error_code": "MISSING_REQUIRED_PARAMS
",
"error_message": "agent_number missing"
}
}RCS Not Enabled
{
"code": "RCS601",
"message": "RCS Channel is not enabled for this User"
"data": [],
"error": {
"error_code": "RCS_CHANNEL_DISABLED",
"error_message": "RCS Channel is not enabled for this User"
}
}Method Not Allowed
{
"code": "RCS405",
"message": "Method not allowed"
"data": [],
"error": {
"error_code": "METHOD_NOT_ALLOWED
",
"error_message": "Method not allowed"
}
}Gateway Error
{
"code": "RCS502",
"message": "Internal Gateway Error"
"data": [],
"error": {
"error_code": "RCS_CHANNEL_INTERNAL_ERROR",
"error_message": "Internal Gateway Error"
}
}Internal Server Error
{
"code": "RCS500",
"message": "Internal Server Error"
"data": [],
"error": {
"error_code": "RCS_CHANNEL_INTERNAL_ERROR",
"error_message": "Internal Server Error"
}
}Updated about 9 hours ago
