Get Masters
GET Method
The Get Masters API retrieves all the master or reference data needed for RCS agent operations.
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 get Masters
To get all the masters, use the https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/masters endpoint with the following request method:
The following is the request format to get all the masters:
curl --location --request GET 'https://<api_domain>/v1/<sid>/rcs/masters'\
--header 'api-key: <api-key>' \
--header 'Content-Type: <content-type>'The following is the sample request format to get all the masters:
curl --location --request GET 'https://rcs.api.na.kaleyra.io/v1/xxxxx6913850xxxx/rcs/masters'\
--header 'api-key: xxxxx3b8497f58a94e84b671aca43xxxx' \
--header 'Content-Type: application/json'URL Parameters and Headers
The following is the list of parameters and headers to send the outgoing message 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 |
Sample Success Response
The following is a sample success response:
"code": "RCS902",
"message": "Master values fetched successfully - RCS Masters",
"data": [
[
"HostingRegion",
"AgentUseCase",
"VerificationState",
"BillingCategory",
"LaunchState",
"TemplateType"
]
],
"error": {}
}Parameters and Descriptions for Success Response
The following are the parameters and descriptions for success response:
| Parameter | Data Type | Description |
|---|---|---|
HostingRegion | String | Specifies the geographical region where the agent is hosted and operates. |
AgentUseCase | String | Indicates the primary business purpose of the agent. For example, transactional, promotional, or OTP. |
VerificationState | String | Represents the current verification status of the agent. For example, pending, verified, or rejected. |
BillingCategory | String | Defines the billing model applicable to the agent (conversational or non-conversational). |
LaunchState | String | Indicates the deployment status of the agent. For example, draft, launched, or suspended. |
TemplateType | String | Defines the template classification used by the agent for message creation or interaction flow. |
Sample Failure Response
The following are the sample failure responses:
Masters Not Found
{
"code": "RCS904",
"message": "Unable to fetch Master values data - RCS Masters",
"data": [],
"error": {
"error_code": "PROV_ERROR",
"error_message": "{\"status\":\"FAILED\",\"message\":\"Masters not found\"}"
}
}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"
}
}Updated about 5 hours ago
