---
updatedAt: 2026-03-16T06:40:44.000Z
agentTools:
  projectIndex: https://developers.kaleyra.io/llms.txt
---

# Get Agent by Agent Number

GET Method

The **Get Agent by Agent Number** API allows you to fetch the agent details based on the agent number.

## Prerequisites

* After you sign up, your account will be on the trial version. You must [complete the KYC](https://developers.kaleyra.io/docs/document-submission-and-approval#/) to access all the features in kaleyra.io.
* Before you get started, [Create an API Key](https://developers.kaleyra.io/docs/generating-an-api-key#/). To view the API Key and the SID, see [View API Key and SID](https://developers.kaleyra.io/docs/view-api-key-and-sid#/).
* To send any RCS messages, 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

`https://rcs-api.<pod>.kaleyra.io/v1/<sid>`

## 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

To get agent by agent number, use the `https://rcs-api.<pod>.kaleyra.io/v1/<sid>/rcs/agent/{agent_number}` endpoint with the following request method:

## Request Format

The following is the request format to get agent by agent number:

```curl
curl --location --request GET 'https://<api_domain>/v1/<sid>/rcs/agent/<agent_number>'\
--header 'api-key: <api-key>' \ 
--header 'Content-Type: <content_type>' \
```

## Sample Request Format

The following is the sample request format to get agent by agent number:

```curl
curl --location --request GET 'https://rcs-api.na.kaleyra.io/v1/XXXXX6913850XXXX/rcs/agent/48400'\
--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        |

The following is the list of parameters to be used in the payload to get agent 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

The following is the sample success response:

```json
{
    "code": "RCS902",
    "message": "RCS Agent details fetched successfully",
    "data": {
        "id": "xxxxxf5b-eb31-44aa-8fab-124c396exxxx",
        "agent_type": "1",
        "logo_url": "https://rcs-s3.smsinfini.com/1769590576110-Test_TC_Logo.jpg",
        "hero_url": "https://rcs-s3.smsinfini.com/1769590579596-1752750253172-TC_Banner_Image.jpg",
        "agent_number": "71732",
        "provider_agent_id": "brands/a6b74cca-d0c4-4f2d-8c56-3dcdd78875dd/agents/agent_test_2938_p0pxjjkr_agent",
        "service_code": "AGENTMEG",
        "description": "About RCS basket",
        "phones": [
            {
                "is_toll_free": false,
                "number": "+91736XXXXXXX",
                "label_text": "Phone Number"
            }
        ],
        "emails": [],
        "privacy": {
            "website": "https://www.airindia.com/in/en/privacy-notice.html",
            "label_text": "Privacy Policy"
        },
        "terms_conditions": {
            "website": "https://www.tatacommunications.com/tnc",
            "label_text": "Terms of Service"
        },
        "color": "#8a1e1e",
        "billing_category": "SINGLE_MESSAGE",
        "agent_use_case": "TRANSACTIONAL",
        "hosting_region": "NORTH_AMERICA",
        "status": "DELETED",
        "rcs_provider_id": 1,
        "integration_status": false,
        "website": [],
        "brand_details": {
            "brand_no": "48400",
            "provider_brand_no": "Telco_brand_001",
            "brand_name": "Bigbasket Grocery"
        },
        "display_name": "Agent T2938"
    },
    "error": {}
}
```

The following is the list of parameters shown in the success response:

<Table align={["left","left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Data Type
      </th>

      <th>
        Description
      </th>

      <th>
        Example
      </th>

      <th>
        Mandatory?
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `id`
      </td>

      <td>
        String
      </td>

      <td>
        The agent identification number.
      </td>

      <td>
        xxxxxf5b-eb31-44aa-8fab-124c396exxxx
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        `agent_type`
      </td>

      <td>
        String
      </td>

      <td>
        Business messaging agent (BMA) or RCS Business Messaging (RCBM). The allowed values are "1", "2".
      </td>

      <td>
        1
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `logo_url`
      </td>

      <td>
        String
      </td>

      <td>
        URL of the logo.
        Must be a valid image URL - should end with - png, jpg, and jpeg.
      </td>

      <td>
        `https://i.pinimg.com/36xxxx3c.jpg`
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `hero_url`
      </td>

      <td>
        String
      </td>

      <td>
        Publicly available URL of the hero image for the agent.
        Must be a valid image URL - should end with .png,.jpeg, and .jpg.  
        Note: After the agent is verified, it cannot be modified.
      </td>

      <td>
        `https://i.pinimg.com/8axxxxa1.jpg`
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `agent_number`
      </td>

      <td>
        String
      </td>

      <td>
        The ID generated by google at the time of create agent request.
      </td>

      <td>
        71732
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        `provider_agent_id`
      </td>

      <td>
        String
      </td>

      <td>
        The ID generated by google at the time of create agent request.
      </td>

      <td>
        brands/a1c890fa-189a-XXXX-b5c9-be639d5126ec/agents/bigbasket_agent_1_48900_uqu4piva_agent
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        `service_code`
      </td>

      <td>
        String
      </td>

      <td>
        A unique identifier used when sending a message.
        Allowed value: Any non-empty string must be unique.
      </td>

      <td>
        `AGENTMEG`
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `description`
      </td>

      <td>
        String
      </td>

      <td>
        Short description of the agent explaining the agent’s purpose and functionality.
        Allowed value: Any non-empty string must be unique.
      </td>

      <td>
        About RCS basket.
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `phones`
      </td>

      <td>
        Array of objects
      </td>

      <td>
        Phone contact details associated with the agent.
      </td>

      <td>
        See the specific table for details.
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `emails`
      </td>

      <td>
        Array
      </td>

      <td>
        Emails contact details associated with the agent.
      </td>

      <td>
        [ ]
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        `privacy`
      </td>

      <td>
        object
      </td>

      <td>
        Privacy policy information associated with the agent. Must include valid URL if provided.
      </td>

      <td>
        See the specific table for details.
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `terms_conditions`
      </td>

      <td>
        object
      </td>

      <td>
        Terms and Conditions related to agent usage.
        Must include valid URL if provided.
      </td>

      <td>
        See the specific table for details.
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `color`
      </td>

      <td>
        String
      </td>

      <td>
        Primary brand color used for User Interface representation.
        Note: The Hex color (must be from allowed list).
      </td>

      <td>
        #8a1e1e
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `billing_category`
      </td>

      <td>
        String
      </td>

      <td>
        Billing configuration for the agent. The following are the available options:
        "CONVERSATIONAL", NON-CONVERSATIONAL.
      </td>

      <td>
        `SINGLE_MESSAGE`
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `agent_use_case`
      </td>

      <td>
        String
      </td>

      <td>
        Business use case category of the agent. 
        The options are: `AGENT_USE_CASE_UNSPECIFIED`,
        `TRANSACTIONAL` ,
        `PROMOTIONAL`,
        `OTP`,
        `MULTI USE`
      </td>

      <td>
        TRANSACTIONAL
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `hosting_region`
      </td>

      <td>
        String
      </td>

      <td>
        Hosting region for an agent.
        The following are the available options: `HOSTING_REGION_UNSPECIFIED`,
        `NORTH_AMERICA`,
        `EUROPE`,
        `ASIA_PACIFIC`
      </td>

      <td>
        `NORTH_AMERICA`
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `status`
      </td>

      <td>
        Integer
      </td>

      <td>
        The status of the Agent.
      </td>

      <td>
        DELETED
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        `rcs_provider_id`
      </td>

      <td>
        String
      </td>

      <td>
        Identifier of the RCS provider. Default it is set to 1.
      </td>

      <td>
        The only allowed value is 1.
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `integration_status`
      </td>

      <td>
        Boolean
      </td>

      <td>
        Integration status
      </td>

      <td>
        false
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        `website`
      </td>

      <td>
        Array
      </td>

      <td>
        Official websites URLs associated with the agent or brand. An agent may have a maximum of 3 websites.
      </td>

      <td>
        [ ]
      </td>

      <td>
        No
      </td>
    </tr>

    <tr>
      <td>
        `brand_details`
      </td>

      <td>
        Object
      </td>

      <td>
        Brand information mapped to the agent.
      </td>

      <td>
        See the specific table for details.
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `display_name`
      </td>

      <td>
        String
      </td>

      <td>
        The display name of the agent. Any non-empty string.
      </td>

      <td>
        Agent T2938
      </td>

      <td>
        Yes
      </td>
    </tr>
  </tbody>
</Table>

The following table describes the different parameters used for the `phones` JSON object:

| Parameter      | Data Type | Description                                                                       | Example       | Mandatory?                     |
| :------------- | :-------- | :-------------------------------------------------------------------------------- | :------------ | :----------------------------- |
| `is_toll_free` | Boolean   | Set if the agent number is toll free.                                             | false         | Yes (if phone number provided) |
| `number`       | String    | Number through which agent can be contacted.                                      | +91736XXXXXXX | Yes                            |
| `label_text`   | String    | Text with visible on phone number. Note: The field label is set to 25 characters. | Phone Number  | Yes                            |

The following table describes the different parameters used for the `privacy` JSON object:

<Table align={["left","left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Data Type
      </th>

      <th>
        Description
      </th>

      <th>
        Example
      </th>

      <th>
        Mandatory?
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `website`
      </td>

      <td>
        String
      </td>

      <td>
        The web page where you have the privacy policy. Note: Must be a valid URL.
      </td>

      <td>
        `https://www.google.com/privacy`
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `label_text`
      </td>

      <td>
        String
      </td>

      <td>
        Text to visible for `privacy`.  
        Note: The field label is set to 25 characters.
      </td>

      <td>
        Privacy
      </td>

      <td>
        Yes
      </td>
    </tr>
  </tbody>
</Table>

The following table describes the different parameters used for the `terms_conditions` JSON object:

<Table align={["left","left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Data Type
      </th>

      <th>
        Description
      </th>

      <th>
        Example
      </th>

      <th>
        Mandatory?
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `website`
      </td>

      <td>
        String
      </td>

      <td>
        The web page where you have the terms and conditions listed.  
        Note: Must be a valid URL.
      </td>

      <td>
        `https://www.google.com/tnc`
      </td>

      <td>
        Yes
      </td>
    </tr>

    <tr>
      <td>
        `label_text`
      </td>

      <td>
        String
      </td>

      <td>
        Text to visible for `terms_conditions`.  
        Note: The field label is set to 25 characters.
      </td>

      <td>
        Terms of Service
      </td>

      <td>
        Yes
      </td>
    </tr>
  </tbody>
</Table>

The following table describes the different parameters used for the `brand_details` JSON object:

| Parameter           | Data Type | Description                                                                   | Example           | Mandatory? |
| :------------------ | :-------- | :---------------------------------------------------------------------------- | :---------------- | :--------- |
| `brand_no`          | String    | Brand number associated with agent. This is a required field.                 | 48400             | Yes        |
| `provider_brand_no` | String    | Provider's brand number associated with the agent. This is an optional field. | Telco\_brand\_001 | No         |
| `brand_name`        | String    | Name of the brand associated with agent. This is an optional field.           | Bigbasket Grocery | No         |

## Sample Failure Response

The following is the sample failure response:

```json
{
  "code": "RCS904",
  "message": "Unable to fetch RCS Agent details",
  "data": { ... },
  "error": {
          error_code:"PROV_ERROR"
          error_message:"Agent not found"
  }
}
```

<br />