Get Callback Profiles Detail

GET Method

Kaleyra.io offers an API that enables you to get details of all the callback profiles associated with a SID based on the callback profile title.

Base URL

<https://api.kaleyra.io>

To get all the callback profiles detail associated with a SID based on the callback profile title, perform the following steps:

API request to get all the callback profiles based on the callback profile title

To get all the callback profiles detail associated with a SID based on the callback profile title, use the /callback/profiles endpoint with query parameters as ?limit=<limit>&offset=0&title=<title> and the following request method:

Request Format

Request format to get all the callback profiles details when you are not providing the title in the query:

curl --location --request GET '<url>/v1/<sid>/callback/profiles?limit=<limit>&offset=0' \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--data-raw ''

Request format to get all the callback profiles details when you are not providing the title in the query:

curl --location --request GET '<url>/v1/<sid>/callback/profiles?limit=<limit>&offset=0&title=<title>' \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--data-raw ''

The following table describes the parameter used for getting all the callback profiles based on SID:

ParameterData TypeDescriptionExampleMandatory
sidStringAccount SID (Security Identifier).HXXXXXXX071INYes
content-typeStringThe format in which the data is sent.application/jsonYes
api-keyStringAPI key generated from Kaleyra.io account.Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes
limitNumberThe number of Callback profiles that you want to display on a callback API.

The default limit for callback profiles is 25, in case no limit is set then 25 callback profiles will be displayed.
10No
titleOnly alphabet, numbers, spaces, hyphens, and underscores are allowedThe title that you want to search for is the callback profile.
Note: Minimum of three characters are required to filter callback profiles based on the title.

If you do not provide the title in the request method then by default all the callback profiles will be displayed in the response.
Callback_Profile_Test1No

Sample Request

The following is the sample request to get all the callback profiles without the title in the query parameter:

curl --location --request GET 'https://api.kaleyra.io/v1/HXXXXXXX071IN/callback/profiles?limit=10&offset=0' \
--header 'Content-Type: application/json' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
--data-raw ''

The following is the sample request to get all the callback profiles with the title in the query:

curl --location --request GET 'https://api.kaleyra.io/v1/HXXXXXXX071IN/callback/profiles?limit=10&offset=0&title=Callback_Profile_Test1' \
--header 'Content-Type: application/json' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
--data-raw ''

Sample Success Response

The following is the sample success response for getting all the callback profiles for a SID without any title in the query:

{
    "status": "Success",
    "code": "RBC024",
    "message": "Profiles fetched successfully",
    "data": [
        {
            "profile_id": "sxxx01239e",
            "company_id": "Z9xxxxxP",
            "title": "a..s",
            "url": "https://llrxx.qxx9-39xxxxxxxxf5",
            "http_method": "GET",
            "headers": "{}",
            "body_type": null,
            "body": null,
            "status": 1,
            "created_at": "2023-05-18T11:26:59.000Z",
            "modified_at": null,
            "created_by": "54xxx30",
            "modified_by": "54xxx30",
            "enc": null,
            "response_message": null,
            "channel": null,
            "events": "[\"\"]",
            "dynamic_variables": null,
            "replacers": null,
            "source": "RBAC"
        },
        {
            "profile_id": "st...43ca7f",
            "company_id": "Z9...85",
            "title": "test...",
            "url": "https://..-0405f20743dc",
            "http_method": "GET",
            "headers": "{}",
            "body_type": null,
            "body": null,
            "status": 1,
            "created_at": "2023-04-21T10:03:38.000Z",
            "modified_at": null,
            "created_by": "54xxx30",
            "modified_by": "54xxx30",
            "enc": null,
            "response_message": null,
            "channel": "EMAIL",
            "events": "[\"status\"]",
            "dynamic_variables": null,
            "replacers": null,
            "source": "RBAC"
        }
    ],
    "meta": {
        "total": 2,
        "limit": 25,
        "offset": 0
    }
}

The following is the sample success response for getting all the callback profiles for a SID with the title in the query:


    "code": "RBC024",
    "message": "Profiles fetched successfully",
    "data": [
        {
            "profile_id": "SG_bxxxxxxf-2xx4-4xx9-8xx7-fxxxxxxxxxxa",
            "title": "Callback_Profile_Test1",
            "url": "https://webhook.site/dxxxxxx9-bxx8-4xx2-9xx5-4xxxxxxxxxx8",
            "http_method": "POST",
            "headers": "{}",
            "body_type": null, 
            "body": "{\"A\":\"D\"}",
            "status": 1, //1 - active; 2 - Auto-Disabled ; 3 - Disabled;
            "created_at": "2023-04-04T05:42:59.000Z",
            "modified_at": null, 
            "enc": {
            "algo": "AES-128-CFB",
            "key": "K1xxxxxxxxxxxx2P", //16-bit key
            "IV": "POxxxxxxxxxxxxLY" //16-bit key
            },
            "response_message": "string",
            "channel": "string",
            "events": "[\"\"]", // "[\"event1\",\"event2\"]"
            "dynamic_variables": null,
            "replacers": { key: value},
        }
    ],
    "error": {},
    "status": 200
    "meta": {
        "total": 1,
        "limit": 10,
        "offset": 0
    }
}

Sample Failure Response

For the Title, there is only one condition, the title request should contain at least three characters. Sample error response when the request contains less than three characters as title:

{
"code": "RBC302",
"message": "querystring/title must NOT have fewer than 3 characters",
"data": {},
"error": [
{
"querystring": "querystring/title must NOT have fewer than 3 characters"
}
],
"status": 400
}

For more information about response codes and statuses for getting all callback profiles detail, see Response Codes and Statuses for Getting All Callback Profiles Detail.