Get a Callback Profile by ID

GET Method

Kaleyra.io offers an API that enables you to get all the information about a given callback profile based on ID.

Base URL

<https://api.kaleyra.io>

To get all the information about a given callback profile, perform the following steps:

API request to get callback profile details

To get callback profile details, use the /callback/profiles/<id> endpoint with the following request method:

Request Format

curl --location --request GET '<url>/v1/<sid>/callback/profiles/<id>' \
--header 'api-key: <api-key>' \
--data-raw ''

The following table describes the parameter used for getting callback profile details:

ParameterData TypeDescriptionExampleMandatory
sidStringAccount SID (Security Identifier).HXXXXXXX071INYes
idStringCallback profile ID.SG_bxxxxxxf-2xx4-4xx9-8xx7-fxxxxxxxxxxaYes
api-keyStringAPI key generated from Kaleyra.io account.Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes

Sample Request

The following is the sample request:

curl --location --request GET 'https://api.kaleyra.io/v1/HXXXXXXX071IN//callback/profiles/SG_bxxxxxxf-2xx4-4xx9-8xx7-fxxxxxxxxxxa' \
--header 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
--data-raw ''

Sample Success Response

The following is the sample success response for callback profile details:

{
    "code": "RBC024",
    "message": "Profile fetched successfully",
    "data": {
        "profile_id": "SG_bxxxxxxf-2xx4-4xx9-8xx7-fxxxxxxxxxxa",
        "title": "some title",
        "url": "https://some-url",
        "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
}

Sample Failure Response

The following is a sample failure response:

{
    "code": "RBC302",
    "message": "No profile exists with this id",
    "data": {},
    "error": [
        {
            "params": "No profile exists with id: SG_cxxxxxxf-2xx4-4xx9-8xx7-fxxxxxxxxxxa"
        }
    ],
    "status": 404
}

For more information about response codes and statuses for getting callback profile details, see Response Codes and Statuses for Getting Callback Profile Details by ID.