### Get a single configuration request Source: https://www.infobip.com/docs/api/channels/mobile-app-messaging/get-a-single-configuration Example request using cURL to retrieve configuration details. ```bash curl -L -g 'https://{baseUrl}/push/1/applications/my_app_code/configurations/config_key' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### Get Entities Request Example Source: https://www.infobip.com/docs/api/platform/application-entity/get-entities A cURL request example for retrieving entities from the provisioning service. ```bash curl -L -g 'https://{baseUrl}/provisioning/1/entities' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### Configure API client libraries with API keys Source: https://www.infobip.com/docs/essentials/api-authentication Examples of initializing API client configurations using an API key. ```java ApiClient apiClient = ApiClient.forApiKey(ApiKey.from(API_KEY)) .withBaseUrl(BaseUrl.from(BASE_URL)) .build(); ``` ```csharp var configuration = new Configuration() { BasePath = "BASE_URL", ApiKeyPrefix = "App", ApiKey = "API_KEY" }; ``` -------------------------------- ### Basic Authentication HTTP Client Examples Source: https://www.infobip.com/docs/essentials/api-authentication Examples of implementing Basic authentication using cURL, Java with OkHttp, and C# HttpClient. ```curl curl -L -g -X GET 'https://{baseUrl}/sms/2/text/advanced' \ -H 'Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' ``` ```java String auth = username + ":" + password; String encoded = Base64.getEncoder().encodeToString(auth.getBytes("UTF-8")); String messageText = "This is test message sent using OkHttpClient and Basic auth"; String jsonBody = String.format( "{\"messages\":[{\"from\":\"%s\",\"destinations\":[{\"to\":\"%s\"}],\"text\":\"%s\"}]}", SENDER, PHONE_NUMBER, messageText); RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), jsonBody); Request request = new Request.Builder() .url(BASE_URL + "/sms/2/text/advanced") .addHeader("Authorization", "Basic " + encoded) .addHeader("Content-Type", "application/json") .addHeader("Accept", "application/json") .post(requestBody) .build(); OkHttpClient httpClient = new OkHttpClient().newBuilder().build(); Response response = httpClient.newCall(request).execute(); System.out.println(response.body().string()); ``` ```csharp string username = "USERNAME"; string password = "PASSWORD"; string concatenated = $"{username}:{password}"; string encoded = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(concatenated)); HttpClient client = new HttpClient(); client.BaseAddress = new Uri("BASE_URL"); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", encoded); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); ``` -------------------------------- ### Received typing started event Source: https://www.infobip.com/docs/api/platform/messages-api/inbound-messages/receive-messages-api-incoming-messages.md Example payload for an Apple Messages for Business typing started event. ```json { "results": [ { "channel": "APPLE_MB", "sender": "urn:mbid:AQAAY6xHR8jJXQr78AG+hTy/xz8H/slwhA06+fLuhMyGKnWAB2DNFenG1r8hAFckmalbZiBRorHQXNcnCg7OK94H+tEF/CI4wDdedyL0E+mDYIwDG+Xcd05xQc0i7GNgRGs1QZmn4Yr5foi6H6ebjivoHbo3cl0=", "destination": "e1c86198-d9bf-43ee-a635-7fe9cbcf45ad", "receivedAt": "2020-02-06T14:18:29.797+0000", "messageId": "ABEGVUGWh3gEAgo-sLTvmQCS5kwjhsy", "platform": { "entityId": "my-entity-id", "applicationId": "my-application-id" }, "event": "TYPING_STARTED" } ] } ``` -------------------------------- ### Markup language configuration response examples Source: https://www.infobip.com/docs/api/channels/voice/calls-markup-language/calls-markup-language-configuration/delete-markup-language-config.md Examples of successful JSON responses for different markup language configuration setups. ```json { "id": 123, "name": "UniqueMarkupConfiguration", "markupUrl": "https://example.com/cml/markup", "httpMethod": "POST", "createTime": "2024-01-15T10:30:00", "updateTime": "2024-01-15T10:30:00" } ``` ```json { "id": 123, "name": "UniqueMarkupConfiguration", "markupUrl": "https://example.com/cml/markup", "notifyUrl": "https://example.com/cml/notify", "errorUrl": "https://example.com/cml/error", "httpMethod": "POST", "createTime": "2024-01-15T10:30:00", "updateTime": "2024-06-20T14:00:00" } ``` ```json { "id": 123, "name": "UniqueMarkupConfiguration", "markupUrl": "https://example.com/cml/markup", "httpMethod": "GET", "createTime": "2024-01-15T10:30:00", "updateTime": "2024-01-15T10:30:00" } ``` -------------------------------- ### Working Theme Configuration Example Source: https://www.infobip.com/docs/live-chat/advanced-customization A practical example demonstrating how to override specific CSS variables and configure custom fonts for default and dark themes. ```json { "default": { "styles": { "lc-header-container-background-color": "#4169E1", "lc-chat-message-user-bubble-background-color": "#4169E1", "lc-chat-message-user-bubble-text-color": "#FFFFFF" }, "fonts": { "fontFaceUrl": "https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap", "fontFamily": "Inter" } }, "dark": { "styles": { "lc-chat-background-color": "#181A20", "lc-header-container-background-color": "#3552B3" } } } ``` -------------------------------- ### Voice IVR Scenario Response Examples Source: https://www.infobip.com/docs/api/channels/voice/interactive-voice-response/manage-ivr-scenarios/get-a-voice-ivr-scenario.md Examples of successful and error response bodies for the Get Voice IVR Scenario request. ```json { "id": "E83E787CF2613450157ADA3476171E3F", "name": "My Scenario", "description": "Scenario to send a message", "createTime": "2023-09-14T15:13:36.735+0000", "updateTime": "2023-09-14T16:20:32.432+0000", "lastUsageDate": "2023-09-14", "script": [ { "sendSms": { "text": "Hello", "to": "${to}" } } ] } ``` ```json { "requestError": { "serviceException": { "messageId": "UNAUTHORIZED", "text": "Unauthorized" } } } ``` ```json { "requestError": { "serviceException": { "messageId": "FORBIDDEN", "text": "Forbidden" } } } ``` ```json { "requestError": { "serviceException": { "messageId": "NOT_FOUND", "text": "Not found" } } } ``` ```json { "requestError": { "serviceException": { "messageId": "GENERAL_ERROR", "text": "Something went wrong. Please contact support." } } } ``` -------------------------------- ### 200 OK Response Example Source: https://www.infobip.com/docs/api/platform/numbers/my-numbers/number-configuration/list-configurations-for-number.md Successful response containing a list of configurations and the total count. ```json { "configurations": [ { "key": "6336C2CCF10E74B705340E70D8E06BD6", "keyword": "KEYWORD1", "action": { "type": "HTTP_FORWARD", "url": "http://something.com" }, "otherActionsDetails": [ { "message": "Auto response message text.", "editable": true, "type": "AUTORESPONSE" } ], "otherActions": [ "AUTORESPONSE" ] }, { "key": "8F0792F86035A9F4290821F1EE6BC06A", "keyword": "KEYWORD2", "action": { "type": "MAIL_FORWARD", "mail": "someone@something.com" }, "otherActionsDetails": [ { "blockType": "FROM_SENDER", "editable": true, "type": "BLOCK" } ], "otherActions": [ "BLOCK" ] } ], "totalCount": 2 } ``` -------------------------------- ### init() Source: https://www.infobip.com/docs/live-chat/people-tracking-sdk-in-live-chat Initializes the SDK. This function is required before any user activity can be tracked. ```APIDOC ## sdk.init(apiKey: string) ### Description Initializes the SDK. Required before any user activity can be tracked. ### Parameters - **apiKey** (string) - Required - API key created with the required scope `web:tracking:sdk`. ### Example ```javascript sdk.init('725f7...55b9'); ``` ``` -------------------------------- ### Agent API Response Examples Source: https://www.infobip.com/docs/api/customer-engagement/conversations/conversation-agents/get-agent.md Examples of JSON responses returned by the Get Agent endpoint, including successful retrieval and various error states. ```json { "id": "97457D13B1FC79AF3C1A1096AE7E77AB", "displayName": "Angus Young", "status": "INVISIBLE", "role": "AGENT", "enabled": true, "createdAt": "2019-05-10T09:53:58.463+0000", "updatedAt": "2019-05-10T09:53:58.463+0000", "email": "angus.toung@example.com" } ``` ```json { "requestError": { "serviceException": { "messageId": "NOT_FOUND", "text": "Invalid agent id given '1234567890ABCDEFGHIJKLMNOPRSTUVZ'" } } } ``` ```json { "requestError": { "serviceException": { "messageId": "UNAUTHORIZED", "text": "Unauthorized" } } } ``` ```json { "requestError": { "serviceException": { "messageId": "FORBIDDEN", "text": "Forbidden" } } } ``` ```json { "requestError": { "serviceException": { "messageId": "NOT_FOUND", "text": "Not found" } } } ``` ```json { "requestError": { "serviceException": { "messageId": "GENERAL_ERROR", "text": "Something went wrong. Please contact support." } } } ``` -------------------------------- ### Get Catalog Request Source: https://www.infobip.com/docs/api/platform/catalogs-api/get-catalog Example request to retrieve a catalog using cURL. ```bash curl -L -g 'https://{baseUrl}/catalogs/1/catalogs/{id}' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### POST /bots/1/testing/start Source: https://www.infobip.com/docs/api/customer-engagement/answers/answers-testing-start-test/start-test.md Starts the bot simulation to begin a test scenario. ```APIDOC ## POST /bots/1/testing/start ### Description Start the bot simulation to begin test scenario. ### Method POST ### Endpoint /bots/1/testing/start ### Request Body - **botId** (integer) - Required - Chatbot Id. - **sender** (string) - Optional - Chatbot sender, if omitted will default to WEB_SIMULATION. - **webhookUrl** (string) - Required - Url to send bot test events. ### Response #### Success Response (200) - **testId** (integer) - Test Id. - **sender** (string) - Sender used in test. ``` -------------------------------- ### Successful Response Example Source: https://www.infobip.com/docs/api/customer-engagement/conversations/away-audio-messages/get-conversations-away-audio-message.md The 200 OK response returns the audio configuration details, including TTS settings or file descriptors and any associated collectable actions. ```json { "id": "id", "workingHoursConfigId": "123", "audioSource": { "enabled": false, "audioSourceType": "TTS", "ttsAudioSource": { "text": "Random message", "language": "en", "voice": { "name": "Joanna", "gender": "female" }, "speechRate": 1.1 }, "fileAudioSource": { "fileDescriptor": "file-descriptor-id-example" } }, "collectables": [ { "code": "1", "action": "CALLBACK", "value": "62a73f05502423205b2630cc" } ], "collectDuration": { "unit": "SECONDS", "value": 15 } } ``` -------------------------------- ### Get Applications Response Source: https://www.infobip.com/docs/api/platform/application-entity/applications/get-applications Example JSON response structure for a successful request. ```json { "results": [ { "applicationName": "Test name", "applicationId": "test-application" } ], "paging": { "page": 0, "size": 1, "totalPages": 0, "totalResults": 0 } } ``` -------------------------------- ### Initialize SDK with API Key Source: https://www.infobip.com/docs/live-chat/people-tracking-sdk-in-live-chat Required before tracking any user activity. Ensure the API key has the web:tracking:sdk scope. ```javascript sdk.init('725f7...55b9'); ``` -------------------------------- ### Get tags request Source: https://www.infobip.com/docs/api/customer-engagement/conversations/get-tags Example request to retrieve tags using cURL. ```bash curl -L -g 'https://{baseUrl}/ccaas/1/tags' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### Import SaaS Resource Request Example Source: https://www.infobip.com/docs/api/customer-engagement/common-assets/saas-resource-import/import-saas-resource.md Example of a multipart/form-data request body for importing a SaaS resource. ```json "----bndr\nContent-Disposition: form-data; name=\"file\"; filename=\"bot-1234-982382131.export\"\nContent-Type: application/octet-stream\n\n74AEE8084910ED9207FD67107DE275B43AC04AEEA6 \n----bndr-- " ``` -------------------------------- ### Get agents request Source: https://www.infobip.com/docs/api/customer-engagement/conversations/get-agents Example of a cURL request to retrieve the list of agents. ```bash curl -L -g 'https://{baseUrl}/ccaas/1/agents' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### Subscription Creation Response Example Source: https://www.infobip.com/docs/api/platform/subscriptions-api/create-subscription JSON structure returned upon successful subscription creation. ```json { "subscriptionId": "string", "profile": { "profileId": "string", "security": { "authId": "string" } } } ``` -------------------------------- ### Get routing request Source: https://www.infobip.com/docs/api/customer-engagement/conversations/get-routing Example of a cURL request to retrieve routing rules. ```bash curl -L -g 'https://{baseUrl}/ccaas/1/routing' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### StartRecording Source: https://www.infobip.com/docs/api/channels/voice/calls-markup-language/markup-language-instructions/markup-language-dial-callback.md Initiates a recording during a voice call with optional callback configuration. ```APIDOC ## StartRecording ### Description Starts recording the current voice call. You can specify a callback URL to receive status updates. ### Parameters - **action** (string) - Required - Must be 'startRecording'. - **recordingStatusCallbackUrl** (object) - Optional - Configuration for the status callback. - **url** (string) - Required - The callback URL. - **method** (string) - Optional - HTTP method (POST or GET). - **recordingStatusCallbackEvents** (array) - Optional - Events that trigger the callback. - **playBeep** (boolean) - Optional - Whether to play a beep when recording starts. ``` -------------------------------- ### Get Item Response Source: https://www.infobip.com/docs/api/platform/catalogs-api/get-item-by-id Example JSON response structure for a successful item retrieval. ```json { "id": 10000, "values": [ { "fieldName": "Text field", "fieldId": "caad56e4-2a1c-4ae8-9717-ebb40d05533d", "value": "Some text value" }, { "fieldName": "Numeric field", "fieldId": "1ab3e732-8986-4d70-bdec-f89c3cbf042d", "value": "2" }, { "fieldName": "Decimal field", "fieldId": "87897d8f-07ae-4b51-80a8-84db793144fb", "value": "2,0005" }, { "fieldName": "Boolean field", "fieldId": "87897d8f-07ae-4b51-80a8-ebb40d05533d", "value": "false" }, { "fieldName": "Date field", "fieldId": "caad56e4-07ae-4ae8-9717-ebb40d05533d", "value": "2022-01-12" }, { "fieldName": "Time field", "fieldId": "87897d8f-8986-4d70-bdec-f89c3cbf042d", "value": "10:10:10" }, { "fieldName": "Date time field", "fieldId": "87897d8f-07ae-8986-80a8-ebb40d05533d", "value": "2022-01-12 10:10:10" } ] } ``` -------------------------------- ### Get Applications Request Source: https://www.infobip.com/docs/api/platform/application-entity/applications/get-applications Example request to retrieve a list of applications using cURL. ```bash curl -L -g 'https://{baseUrl}/provisioning/1/applications' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### Click-to-call request example Source: https://www.infobip.com/docs/api/channels/voice/click-to-call/send-click-to-call-message.md A comprehensive example showing all available fields for a click-to-call request. ```json { "bulkId": "BULK-ID-123-xyz", "messages": [ { "from": "41793026700", "fromB": "41793026701", "destinationA": "41793026727", "destinationB": "41793026731", "messageId": "MESSAGE-ID-123-xyz", "text": "Test Voice message.", "language": "en", "voice": { "gender": "female", "name": "Joanna" }, "anonymization": false, "notifyUrl": "https://www.example.com/voice/notify", "notifyContentType": "application/json", "maxDuration": 60, "warningTime": 5, "retry": { "minPeriod": 1, "maxPeriod": 5, "maxCount": 5 }, "machineDetection": "hangup", "deliveryTimeWindow": { "days": [ "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" ], "from": { "hour": 6, "minute": 0 }, "to": { "hour": 15, "minute": 30 } } } ] } ``` -------------------------------- ### Initialize SDK Instance Source: https://www.infobip.com/docs/live-chat/people-tracking-sdk-in-live-chat Create the SDK object required to access all tracking functions. ```javascript const sdk = new PeopleTrackingSDK(); ``` -------------------------------- ### Get form request Source: https://www.infobip.com/docs/api/customer-engagement/moments/get-form Example cURL request to retrieve a form by its unique identifier. ```bash curl -L -g 'https://{baseUrl}/forms/1/forms/f7cf1606-e155-40eb-9721-78183d268d24' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### SIP Trunk Response Examples Source: https://www.infobip.com/docs/api/channels/voice/calls/sip-trunks/delete-sip-trunk.md Examples of JSON objects representing static and registered SIP trunk configurations. ```json { "id": "62eb6ff07b18cc6cdf5cf001", "type": "STATIC", "name": "Static SIP Trunk", "location": "NEW_YORK", "tls": false, "codecs": [ "PCMU", "PCMA" ], "dtmf": "INBAND", "fax": "T38", "numberFormat": "US_NATIONAL", "internationalCallsAllowed": false, "channelLimit": 10, "anonymization": "REMOTE_PARTY_ID", "billingPackage": { "packageType": "UNLIMITED", "countryCode": "USA", "addressId": "562949953421333" }, "sbcHosts": { "primary": [ "111.111.111.111:5060" ], "backup": [ "222.222.222.222:5060" ], "subnets": [ "11.22.33.44/24" ] }, "sipOptions": { "enabled": false }, "sourceHosts": [ "10.10.10.10" ], "destinationHosts": [ "100.100.100.100:5060", "my.destination.com", "my.destination.com:5060" ], "strategy": "ROUND_ROBIN" } ``` ```json { "id": "62eb6ff07b18cc6cdf5cf001", "type": "REGISTERED", "name": "Registered SIP Trunk", "location": "SAO_PAULO", "tls": true, "codecs": [ "G729" ], "dtmf": "RFC2833", "fax": "NONE", "numberFormat": "E164", "internationalCallsAllowed": true, "channelLimit": 999, "anonymization": "PREFERRED_IDENTITY", "billingPackage": { "packageType": "METERED" }, "sbcHosts": { "primary": [ "111.111.111.111:5061" ], "backup": [ "222.222.222.222:5061" ], "subnets": [ "11.22.33.44/24" ] }, "username": "426c8402-691c-11ee-8c99-0242ac120002", "inviteAuthentication": true } ``` -------------------------------- ### Get tags response Source: https://www.infobip.com/docs/api/customer-engagement/conversations/get-tags Example JSON response structure for a successful tags retrieval. ```json { "tags": [ { "name": "Tag 1", "createdAt": "2024-01-01T00:00:00.000+00:00", "updatedAt": "2024-01-01T00:00:00.000+00:00" }, { "name": "Tag 2", "createdAt": "2024-01-01T00:00:00.000+00:00", "updatedAt": "2024-01-01T00:00:00.000+00:00" } ], "pagination": { "totalItems": 2, "page": 0, "limit": 10, "orderBy": "id:ASC" } } ``` -------------------------------- ### Get All Domains Request Source: https://www.infobip.com/docs/api/channels/email/get-all-domains Example request using cURL to retrieve the list of domains. ```bash curl -L -g 'https://{baseUrl}/email/1/domains' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### Configure Subscription Event Formats Source: https://www.infobip.com/docs/subscriptions/manage/event-formats Examples showing the JSON structure for events without a specified format versus those with a custom format. ```json "events": [ "DELIVERY" ] ``` ```json "events": [ { "event": "DELIVERY", "format": "delivery.sms.v3.json" } ] ``` -------------------------------- ### Update call link configuration with initial options Source: https://www.infobip.com/docs/api/channels/webrtc-calls/call-link/call-link-configs/patch-config.md Example request body for updating a configuration with initial audio and video settings. ```json { "name": "Company name", "initialOptions": { "audio": true, "video": false, "muted": false, "cameraFacingMode": "FRONT" } } ``` -------------------------------- ### GET /numbers/2/numbers/{numberKey}/voice Source: https://www.infobip.com/docs/api/platform/numbers/my-numbers/voice-configuration/get-voice-setup-on-number.md Fetches the voice setup configuration for a specific number. ```APIDOC ## GET /numbers/2/numbers/{numberKey}/voice ### Description This method fetches the voice setup on a number. ### Method GET ### Endpoint /numbers/2/numbers/{numberKey}/voice ### Parameters #### Path Parameters - **numberKey** (string) - Required - Unique ID of a number. ### Response #### Success Response (200) - **action** (object) - The voice configuration action object, which may contain different fields based on the type (e.g., voiceNumberMaskingConfigKey, scenarioKey, routeId, pstnNumber, callsConfigurationId, or markupLanguageConfigId). #### Response Example { "action": { "type": "VOICE_NUMBER_MASKING", "voiceNumberMaskingConfigKey": "C6A5995CBF4D2DF2ADE29963B3BB00E6" } } ``` -------------------------------- ### Get catalog fields request Source: https://www.infobip.com/docs/api/platform/catalogs-api/get-catalog-fields Example request using cURL to retrieve catalog fields. ```bash curl -L -g 'https://{baseUrl}/catalogs/1/catalogs/{catalogId}/fields' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ``` -------------------------------- ### SaaS request status response example Source: https://www.infobip.com/docs/api/customer-engagement/common-assets/saas-request-status Example of a successful 200 OK JSON response containing the request status and details. ```json { "requestId": "786ac8d6-40e5-4dfb-a450-4f71cbb3fc6c", "status": "IN_PROGRESS", "details": { "account": "7CB64E2791F1A14E5BFEBED41A70F08D", "status": "IN_PROGRESS" } } ``` -------------------------------- ### Get Catalog Field Request Source: https://www.infobip.com/docs/api/platform/catalogs-api/get-catalog-field Example request for retrieving a catalog field using cURL. ```cURL curl -L -g 'https://{baseUrl}/catalogs/1/catalogs/{catalogId}/fields/8b00a8c6-5302-4fd0-a0cc-bb090b28ac34' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json' ```