### Example cURL Request to View SMS Campaign Source: https://text.lk/docs/view-sms-campaign A command-line example using cURL to demonstrate how to send an authenticated GET request to the Text.lk API to view a specific SMS campaign by its unique ID. ```HTTP curl -X GET https://app.text.lk/api/v3/campaign/{uid}/view \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Example cURL Request to View SMS Source: https://text.lk/docs/view-sms An example cURL command demonstrating how to make a GET request to the Text.lk View SMS API. It includes necessary headers for authorization (Bearer token) using an API key and specifies content type and accept headers for JSON responses. ```HTTP curl -X GET https://app.text.lk/api/v3/sms/{uid}\ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Example cURL Request to View All SMS Source: https://text.lk/docs/view-all-sms A cURL command demonstrating how to make a GET request to the Text.lk SMS API to fetch all SMS records. It requires an API key for authorization. ```HTTP curl -X GET https://app.text.lk/api/v3/sms \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### cURL Example for View SMS Contacts Group API Source: https://text.lk/docs/view-sms-contacts-group An example cURL command demonstrating how to make an authenticated POST request to retrieve information for a specific SMS contacts group. ```HTTP curl -X POST https://app.text.lk/api/v3/contacts/{group_id}/show \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Example cURL Request to Create SMS Contact Group Source: https://text.lk/docs/create-sms-contacts-group An example cURL command demonstrating how to make a POST request to the Text.lk API to create a new SMS contact group. It includes setting the Authorization header with an API key, Content-Type, Accept headers, and the JSON payload for the group name. ```HTTP curl -X POST https://app.text.lk/api/v3/contacts \n-H 'Authorization: Bearer API_KEY' \n-H 'Content-Type: application/json' \n-H 'Accept: application/json' \n-d '{"name":"SenderID"}' ``` -------------------------------- ### Retrieve All SMS Contacts Groups: Request and Responses Source: https://text.lk/docs/view-all-sms-contacts-groups This snippet demonstrates how to fetch all SMS contact groups from the Text.lk API using a GET request. It includes the cURL command for the request, along with examples of both successful and error JSON responses that the API may return. ```HTTP curl -X GET https://app.text.lk/api/v3/contacts \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` ```JSON { "status": "success", "data": "group data with pagination" } ``` ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Successful SMS Campaign API Response Source: https://text.lk/docs/send-sms-campaign Example of a successful JSON response returned by the Text.lk SMS campaign API, indicating the campaign was processed successfully. ```HTTP { "status": "success", "data": "campaign reports with all details" } ``` -------------------------------- ### View SMS Campaign API Endpoint and Parameters Source: https://text.lk/docs/view-sms-campaign Details the HTTP GET endpoint for retrieving SMS campaign information and describes the required unique identifier (uid) parameter. ```APIDOC API Endpoint: https://app.text.lk/api/v3/campaign/{uid} Parameters: - Parameter: uid Required: Yes Type: string Description: A unique random uid is created on the Text.lk – SMS Gateway Sri Lanka platform and is returned upon object creation. ``` -------------------------------- ### Text.lk API Responses for Viewing All SMS Source: https://text.lk/docs/view-all-sms JSON examples illustrating both successful and error responses from the Text.lk SMS API when attempting to retrieve all SMS messages. The success response includes pagination data, while the error response provides a human-readable message. ```JSON { "status": "success", "data": "sms reports with pagination" } ``` ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Error SMS Campaign API Response Source: https://text.lk/docs/send-sms-campaign Example of an error JSON response returned by the Text.lk SMS campaign API, providing a status and a human-readable error message. ```HTTP { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Example cURL Request to Delete SMS Contact Source: https://text.lk/docs/delete-sms-contact A practical cURL command demonstrating how to send a DELETE request to the Text.lk API to remove an SMS contact. This example includes placeholders for the group ID, contact UID, and API key, along with necessary HTTP headers for authorization and content type. ```HTTP curl -X DELETE https://app.text.lk/api/v3/contacts/{group_id}/delete/{uid}\n-H 'Authorization: Bearer API_KEY' \n-H 'Content-Type: application/json' \n-H 'Accept: application/json' ``` -------------------------------- ### cURL Example: View All SMS Contacts in Group Source: https://text.lk/docs/view-all-sms-contacts-in-group This cURL command demonstrates how to make a POST request to the Text.lk API to retrieve all contacts within a specified group. It includes necessary headers for authorization (Bearer token), content type, and accept type. ```HTTP curl -X POST https://app.text.lk/api/v3/contacts/{group_id}/all \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### cURL Example to Update SMS Contact Source: https://text.lk/docs/update-sms-contact This cURL command demonstrates how to send a PATCH request to the Text.lk API to update an SMS contact. It includes setting the Authorization header with a Bearer token (API_KEY) and sending a JSON payload with the new phone number, first name, and last name. ```cURL curl -X PATCH https://app.text.lk/api/v3/contacts/{group_id}/update/{uid} \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "PHONE":"8801721970168", "FIRST_NAME":"Jhon", "LAST_NAME":"Doe", }' ``` -------------------------------- ### Delete SMS Contacts Group API Reference Source: https://text.lk/docs/delete-sms-contacts-group Comprehensive documentation for deleting an SMS contact group via the Text.lk API, including the endpoint, required parameters, and an example cURL request. ```APIDOC API Endpoint: https://app.text.lk/api/v3/contacts/{group_id} Parameters: | Parameter | Required | Type | Description | | --- | --- | --- | --- | | group_id | Yes | string | Contact Groups `uid` | ``` ```HTTP curl -X DELETE https://app.text.lk/api/v3/contacts/{group_id}\\ -H 'Authorization: Bearer API_KEY' \\ -H 'Content-Type: application/json' \\ -H 'Accept: application/json' \\ ``` -------------------------------- ### Text.lk SMS API: View All Contacts in Group Endpoint Definition Source: https://text.lk/docs/view-all-sms-contacts-in-group This section outlines the API endpoint and its required parameters for fetching all SMS contacts associated with a specific group ID from the Text.lk platform. The method is inferred from the example request. ```APIDOC API Endpoint: URL: https://app.text.lk/api/v3/contacts/{group_id}/all Method: POST (inferred from example request) Parameters: group_id: Required: Yes Type: string Description: Contact Groups `uid` ``` -------------------------------- ### Example cURL Request to Update SMS Contacts Group Source: https://text.lk/docs/update-sms-contacts-group This cURL command demonstrates how to send a PATCH request to the Text.lk API to update an SMS contact group. It includes setting the Authorization header with a Bearer token (API_KEY), specifying content and accept types as JSON, and providing the new group name in the request body. ```cURL curl -X PATCH https://app.text.lk/api/v3/contacts/{group_id} -H 'Authorization: Bearer API_KEY' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"name":"SenderID Update"}' ``` -------------------------------- ### Error SMS Contact Retrieval Response Source: https://text.lk/docs/view-sms-contact Example of an error JSON response returned when the request to retrieve an SMS contact fails. The 'status' field indicates an error, and the 'message' field provides a human-readable description of the issue. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Text.lk SMS Gateway View SMS API Endpoint Source: https://text.lk/docs/view-sms This is the HTTP GET endpoint for retrieving details of an existing SMS message on the Text.lk platform. It requires a unique message ID (uid) as a path parameter to identify the specific message. ```HTTP https://app.text.lk/api/v3/sms/{uid} ``` -------------------------------- ### Successful SMS Contact Retrieval Response Source: https://text.lk/docs/view-sms-contact Example of a successful JSON response returned when an SMS contact's information is successfully retrieved. The 'status' field indicates success, and the 'data' field contains the contact's details. ```JSON { "status": "success", "data": "contacts data with all details" } ``` -------------------------------- ### Text.lk SMS Contacts API Overview and Endpoint Source: https://text.lk/docs/sms-contacts-initialize This section describes the Text.lk SMS Contacts API, its core functionality for managing contacts, its architectural style (RESTful with HTTP verbs), authorization mechanism (access key), and data exchange format (JSON with UTF-8). It also provides the base API endpoint for contact operations. ```APIDOC Text.lk SMS Contacts API: Purpose: Manage contacts identified by a unique random ID (create, view, update, delete). Functionality: - Collection of customer-specific contacts. - Allows grouping contacts. - Assign custom values for SMS template messages. API Style: - Uses HTTP verbs. - RESTful endpoint structure. Authorization: - Requires an access key (API Authorization). Data Format: - Request and response payloads: JSON. - Encoding: UTF-8. - Values: URL encoded. API Endpoint: Base URL: https://app.text.lk/api/v3/contacts Protocol: HTTP ``` -------------------------------- ### Required API Parameters for SMS Contacts Initialization Source: https://text.lk/docs/sms-contacts-initialize This section specifies the mandatory parameters for making API calls to initialize SMS contacts. It includes details on the 'Authorization' header for API token authentication and the 'Accept' header for content type negotiation. ```APIDOC Parameter: Authorization Required: Yes Description: When calling our API, send your api token with the authentication type set as Bearer. Example: Authorization: Bearer {api_token} Parameter: Accept Required: Yes Description: application/json ``` -------------------------------- ### Initialize SMS Contacts Groups API Endpoint and Parameters Source: https://text.lk/docs/sms-contacts-groups-initialize Documents the API endpoint and required headers for initializing SMS contact groups using the Text.lk API. This API allows management of contact groups identified by a unique random ID. ```APIDOC API Endpoint: URL: https://app.text.lk/api/v3/contacts Method: HTTP Parameters: - Name: Authorization Required: Yes Description: When calling our API, send your api token with the authentication type set as `Bearer` Example: `Authorization: Bearer {api_token}` - Name: Accept Required: Yes Description: Set to `application/json` ``` -------------------------------- ### API Parameters for Send SMS Campaign Source: https://text.lk/docs/send-sms-campaign Defines the required and optional parameters for sending an SMS campaign via the Text.lk API, including their types and descriptions. ```APIDOC SendCampaignParameters: contact_list_id: string (Required) Description: Contact list to send message. Use comma (,) to send multiple contact lists. Eg: 6415907d0d7a6,6415907d0d37a sender_id: string (Required) Description: The sender of the message. Can be a telephone number (including country code) or an alphanumeric string (max 11 chars). type: string (Required) Description: The type of the message. For text message, insert 'plain' as sms type. message: string (Required) Description: The body of the SMS message. schedule_time: datetime (Optional) Description: The scheduled date and time of the message in RFC3339 format (Y-m-d H:i). dlt_template_id: string (Optional) Description: The ID of your registered DLT (Distributed Ledger Technology) content template. ``` -------------------------------- ### Create SMS Contact API Endpoint and Parameters Source: https://text.lk/docs/create-sms-contact Documents the API endpoint and parameters required to create a new SMS contact within a specified group. The API returns the created contact object upon successful request. ```APIDOC API Endpoint: URL: https://app.text.lk/api/v3/contacts/{group_id}/store Method: POST (implied by context for creation) Parameters: group_id: Required: Yes Type: string Description: Contact Groups uid PHONE: Required: Yes Type: number Description: The phone number of the contact. OTHER_FIELDS: Required: No Type: string Description: All Contact’s other fields: FIRST_NAME (?), LAST_NAME (?),… (depending on the contact group fields configuration) ``` -------------------------------- ### Text.lk SMS API Endpoint Reference Source: https://text.lk/docs/-category/sms This section provides an overview of the Text.lk SMS API, detailing endpoints for managing SMS messages, individual contacts, and contact groups. It allows for sending, viewing, and managing SMS campaigns, as well as full CRUD operations for contacts and groups. ```APIDOC SMS API Endpoints: SMS: - Send SMS - View SMS - View all SMS - Send SMS Campaign Using Contact list - View SMS Campaign SMS Contacts: - SMS Contacts Initialize - Create SMS Contact - View SMS Contact - Update SMS contact - Delete SMS Contact - View all SMS Contacts in Group SMS Contacts Groups: - SMS Contacts Groups Initialize - Create SMS Contacts Group - View SMS Contacts Group - Update SMS Contacts Group - Delete SMS Contacts Group - View all SMS Contacts Groups ``` -------------------------------- ### Text.lk SMS API Endpoint Reference Source: https://text.lk/docs/-category/sms-api This section provides an overview of the available API endpoints for managing SMS messages, SMS contacts, and SMS contact groups within the Text.lk platform. It details operations for sending, viewing, creating, updating, and deleting various SMS-related entities. ```APIDOC SMS API Endpoints: SMS: - Send SMS: Endpoint to send individual SMS messages. - View SMS: Endpoint to retrieve details of a specific sent SMS. - View all SMS: Endpoint to retrieve details of all sent SMS messages. - Send SMS Campaign Using Contact list: Endpoint to initiate an SMS campaign using a predefined contact list. - View SMS Campaign: Endpoint to retrieve details of a specific SMS campaign. SMS Contacts: - SMS Contacts Initialize: Endpoint to initialize SMS contact management. - Create SMS Contact: Endpoint to add a new SMS contact. - View SMS Contact: Endpoint to retrieve details of a specific SMS contact. - Update SMS contact: Endpoint to modify an existing SMS contact's details. - Delete SMS Contact: Endpoint to remove an SMS contact. - View all SMS Contacts in Group: Endpoint to retrieve all SMS contacts belonging to a specific group. SMS Contacts Groups: - SMS Contacts Groups Initialize: Endpoint to initialize SMS contact group management. - Create SMS Contacts Group: Endpoint to create a new group for SMS contacts. - View SMS Contacts Group: Endpoint to retrieve details of a specific SMS contact group. - Update SMS Contacts Group: Endpoint to modify an existing SMS contact group's details. - Delete SMS Contacts Group: Endpoint to remove an SMS contact group. - View all SMS Contacts Groups: Endpoint to retrieve details of all SMS contact groups. ``` -------------------------------- ### View SMS Contacts Group API Parameters Source: https://text.lk/docs/view-sms-contacts-group Defines the required parameters for the 'View SMS Contacts Group' API call, including their type and description. ```APIDOC Parameter: group_id Required: Yes Type: string Description: Contact Groups uid ``` -------------------------------- ### Send SMS Campaign API Endpoint Source: https://text.lk/docs/send-sms-campaign This is the primary API endpoint for initiating SMS campaigns programmatically through Text.lk's SMS Gateway. Developers can send a message object to this URL to create and dispatch new campaigns. ```HTTP https://app.text.lk/api/v3/sms/campaign ``` -------------------------------- ### Text.lk SMS API Endpoint for Viewing All SMS Source: https://text.lk/docs/view-all-sms The base URL for accessing the Text.lk SMS API to retrieve a list of all SMS messages. ```APIDOC https://app.text.lk/api/v3/sms/ ``` -------------------------------- ### Parameters for Create SMS Contact Group API Source: https://text.lk/docs/create-sms-contacts-group Defines the required parameters for the API call to create an SMS contact group. The 'name' parameter is mandatory for specifying the group's identifier. ```APIDOC Parameter: name Required: Yes Type: string Description: The name of the group ``` -------------------------------- ### Text.lk SMS API Endpoints Overview Source: https://text.lk/docs/-category/sms-contacts-groups This section outlines the available API endpoints for interacting with the Text.lk SMS Gateway, categorized by functionality: SMS operations, SMS contact management, and SMS contact group management. Each entry represents a specific API call. ```APIDOC SMS API Documentation: SMS: - Send SMS - View SMS - View all SMS - Send SMS Campaign Using Contact list - View SMS Campaign SMS Contacts: - SMS Contacts Initialize - Create SMS Contact - View SMS Contact - Update SMS contact - Delete SMS Contact - View all SMS Contacts in Group SMS Contacts Groups: - SMS Contacts Groups Initialize - Create SMS Contacts Group - View SMS Contacts Group - Update SMS Contacts Group - Delete SMS Contacts Group - View all SMS Contacts Groups ``` -------------------------------- ### API Endpoint Reference for SMS Contacts Groups Source: https://text.lk/docs/view-all-sms-contacts-groups Defines the base URL for interacting with the SMS Contacts Groups API resource on the Text.lk platform. This is the target endpoint for retrieving all contact groups. ```APIDOC https://app.text.lk/api/v3/contacts/ ``` -------------------------------- ### API Endpoint for Creating SMS Contact Group Source: https://text.lk/docs/create-sms-contacts-group This is the HTTP endpoint used to create a new SMS contact group. It accepts POST requests to add a new group object. ```HTTP https://app.text.lk/api/v3/contacts ``` -------------------------------- ### API Documentation for Updating SMS Contacts Group Source: https://text.lk/docs/update-sms-contacts-group This section outlines the API endpoint and required parameters for updating an existing SMS contact group. It specifies the HTTP method (PATCH), the URL structure with a path variable, and the necessary request body parameters. ```APIDOC API Endpoint: PATCH https://app.text.lk/api/v3/contacts/{group_id} Parameters: group_id: Required: Yes Type: string Description: Contact Groups `uid` name: Required: Yes Type: string Description: New group name ``` -------------------------------- ### API Response Schema: Successful Contact Object Source: https://text.lk/docs/create-sms-contacts-group Defines the JSON schema for a successful API response when retrieving or creating a contact object. It includes a 'status' field set to 'success' and a 'data' field containing detailed group information. ```json { "status": "success", "data": "group data with all details" } ``` -------------------------------- ### Text.lk SMS Gateway View SMS API Parameters Source: https://text.lk/docs/view-sms Details the required parameters for the View SMS API endpoint. The 'uid' parameter is mandatory and represents the unique identifier of the SMS message, which is returned upon message creation or reception. ```APIDOC Parameter | Required | Type | Description --- | --- | --- | --- uid | Yes | string | A unique random uid which is created on the Text.lk – SMS Gateway Sri Lanka platform and is returned upon object creation. ``` -------------------------------- ### Send SMS Campaign to Multiple Contact Lists using cURL Source: https://text.lk/docs/send-sms-campaign Illustrates sending an SMS campaign to multiple contact lists with a cURL POST request. Shows how to specify multiple recipient IDs and an optional schedule time. ```curl curl -X POST https://app.text.lk/api/v3/sms/campaign \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "recipient":"6415907d0d37a,6415907d0d7a6", "sender_id":"YourName", "type":"plain", "message":"This is a test message", "schedule_time=2021-12-20 07:00" }' ``` -------------------------------- ### API Response Schema: Error Object Source: https://text.lk/docs/create-sms-contacts-group Defines the JSON schema for an API response indicating an error. It includes an 'status' field set to 'error' and a 'message' field providing a human-readable explanation of the encountered issue. ```json { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Text.lk Send SMS API Parameters Source: https://text.lk/docs/send-sms Defines the required and optional parameters for sending SMS messages via the Text.lk API, including recipient, sender ID, message type, and content. ```APIDOC recipient: Required: Yes Type: string Description: Number to send a message. Use comma (,) to send multiple numbers. Eg: 9476000000,94710000000 sender_id: Required: Yes Type: string Description: The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. type: Required: Yes Type: string Description: The type of the message. For text message you have to insert plain as sms type. message: Required: Yes Type: string Description: The body of the SMS message. schedule_time: Required: No Type: datetime Description: The scheduled date and time of the message in RFC3339 format (Y-m-d H:i) dlt_template_id: Required: No Type: string Description: The ID of your registered DLT (Distributed Ledger Technology) content template. ``` -------------------------------- ### JSON Success Response Structure Source: https://text.lk/docs/view-sms-contacts-group This JSON snippet illustrates the structure of a successful API response, containing a 'status' of 'success' and a 'data' field with relevant details. ```JSON { "status": "success", "data": "group data with all details" } ``` -------------------------------- ### Send Multiple SMS via Text.lk API using cURL Source: https://text.lk/docs/send-sms Illustrates how to send SMS messages to multiple recipients using the Text.lk API with a cURL POST request, by providing a comma-separated list of numbers. ```HTTP curl -X POST https://app.text.lk/api/v3/sms/send \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "recipient":"94710000000,94770000000", "sender_id":"TextLKDemo", "type":"plain", "message":"This is a test message", "schedule_time=2025-12-20 07:00" }' ``` -------------------------------- ### API Error Response Format Source: https://text.lk/docs/update-sms-contacts-group This JSON object illustrates the standard format for an API error response. It includes a 'status' of 'error' and a 'message' field providing a human-readable description of the issue. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Error API Response Structure Source: https://text.lk/docs/update-sms-contact This JSON snippet demonstrates the structure of an API response when a request fails. It includes an 'status' indicating an error and a 'message' field providing a human-readable description of the issue. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Text.lk Send SMS API Endpoint Source: https://text.lk/docs/send-sms This snippet provides the HTTP endpoint for Text.lk's programmable SMS API, enabling web applications to send SMS messages programmatically. ```HTTP https://app.text.lk/api/v3/sms/send ``` -------------------------------- ### Send SMS Campaign to Single Contact List using cURL Source: https://text.lk/docs/send-sms-campaign Demonstrates how to send an SMS campaign to a single contact list using a cURL POST request to the Text.lk API endpoint. Requires an API key and a JSON payload. ```curl curl -X POST https://app.text.lk/api/v3/sms/campaign \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "recipient":"6415907d0d7a6", "sender_id":"YourName", "type":"plain", "message":"This is a test message" }' ``` -------------------------------- ### Send Single SMS via Text.lk API using cURL Source: https://text.lk/docs/send-sms Demonstrates how to send a single SMS message using the Text.lk API with a cURL POST request, specifying recipient, sender ID, message type, and content. ```HTTP curl -X POST https://app.text.lk/api/v3/sms/send \ -H 'Authorization: Bearer API_KEY' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "recipient":"94710000000", "sender_id":"TextLKDemo", "type":"plain", "message":"This is a test message", "schedule_time=2025-12-20 07:00" }' ``` -------------------------------- ### View SMS Contacts Group API Endpoint Source: https://text.lk/docs/view-sms-contacts-group The HTTP endpoint for retrieving details of an existing SMS contacts group using its unique identifier. ```HTTP https://app.text.lk/api/v3/contacts/{group_id}/show/ ``` -------------------------------- ### Successful API Response for Contact Object Source: https://text.lk/docs/update-sms-contact This JSON snippet illustrates the structure of a successful API response when retrieving or updating a contact. It includes a 'status' indicating success and a 'data' field containing the contact's details. ```JSON { "status": "success", "data": "contacts data with all details" } ``` -------------------------------- ### JSON Error Response Structure Source: https://text.lk/docs/view-sms-contacts-group This JSON snippet illustrates the structure of an API error response, containing a 'status' of 'error' and a 'message' field with a human-readable description of the issue. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Text.lk API Error Response Structure Source: https://text.lk/docs/create-sms-contact This JSON structure is returned when an API request encounters an error. It provides a 'status' field indicating an error and a 'message' field with a human-readable description of what went wrong, aiding in debugging and user feedback. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Standard API Error Response JSON Structure Source: https://text.lk/docs/view-sms This snippet illustrates the JSON structure for an API error response. It includes a 'status' field, which is set to 'error', and a 'message' field, providing a human-readable explanation of the error. This format is returned when an API request encounters an issue. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Successful API Response for Campaign Data Source: https://text.lk/docs/view-sms-campaign This JSON object represents a successful API response, typically returned when an API request for campaign data is processed without issues. It includes a 'status' field indicating success and a 'data' field containing the detailed campaign information. ```JSON { "status": "success", "data": "campaign data with all details", } ``` -------------------------------- ### Text.lk API Success Response for Contact Data Source: https://text.lk/docs/create-sms-contact This JSON structure represents a successful API response, typically returned when a request, such as retrieving contact information, completes without errors. It includes a 'status' field indicating success and a 'data' field containing the requested contact details. ```JSON { "status": "success", "data": "contacts data with all details" } ``` -------------------------------- ### Successful API Response for Contact Object Source: https://text.lk/docs/update-sms-contacts-group This JSON object represents a successful API response, typically returning a contact object with detailed data. It includes a 'status' of 'success' and a 'data' field containing the relevant information. ```JSON { "status": "success", "data": "groups data with all details", } ``` -------------------------------- ### Retrieve SMS Contact API Endpoint Source: https://text.lk/docs/view-sms-contact This API endpoint is used to retrieve the information of an existing SMS contact. It requires the unique group ID and contact UID, which are passed as path parameters. ```HTTP https://app.text.lk/api/v3/contacts/{group_id}/search/{uid} ``` -------------------------------- ### Error API Response Source: https://text.lk/docs/view-sms-campaign This JSON object represents an API response indicating that an error occurred during the processing of a request. It includes a 'status' field set to 'error' and a 'message' field providing a human-readable description of the specific issue encountered. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Text.lk Send SMS API Success Response Source: https://text.lk/docs/send-sms Shows the JSON structure returned by the Text.lk API upon a successful SMS sending request, indicating a 'success' status. ```HTTP { "status": "success", "data": "sms reports with all details" } ``` -------------------------------- ### Successful API Response for Contact Data Source: https://text.lk/docs/view-all-sms-contacts-in-group This JSON object represents a successful API response, typically for a contact retrieval operation. It includes a 'status' of 'success' and 'data' containing contact information, possibly with pagination details. ```JSON { "status": "success", "data": "contacts data with pagination" } ``` -------------------------------- ### Text.lk Send SMS API Error Response Source: https://text.lk/docs/send-sms Presents the JSON structure returned by the Text.lk API when an SMS sending request fails, including an 'error' status and a human-readable message. ```HTTP { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Parameters for Delete SMS Contact API Source: https://text.lk/docs/delete-sms-contact Defines the mandatory parameters required for the 'Delete SMS Contact' API endpoint. Both 'group_id' and 'uid' are string types and must be provided to identify the contact to be deleted. ```APIDOC Parameters: group_id: Required: Yes Type: string Description: Contact Group uid uid: Required: Yes Type: string Description: Contact uid ``` -------------------------------- ### API Response Formats for SMS Contacts Group Source: https://text.lk/docs/delete-sms-contacts-group Illustrates the JSON structure for successful and error responses from the SMS contacts group API. The success response indicates a successful operation, while the error response provides a human-readable message describing the issue. ```JSON { "status": "success", "data": "null" } ``` ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Error API Response Structure Source: https://text.lk/docs/delete-sms-contact This JSON object illustrates the structure of an API error response. It contains a 'status' field set to 'error' and a 'message' field providing a human-readable description of the issue. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### Error API Response Source: https://text.lk/docs/view-all-sms-contacts-in-group This JSON object represents an error API response. It includes a 'status' of 'error' and a 'message' providing a human-readable description of the error that occurred during the request. ```JSON { "status": "error", "message" : "A human-readable description of the error." } ``` -------------------------------- ### API Endpoint for Updating SMS Contact Source: https://text.lk/docs/update-sms-contact This is the HTTP PATCH endpoint used to update an existing SMS contact. It requires the unique identifier of the contact group (group_id) and the contact's unique identifier (uid) as path parameters. ```HTTP https://app.text.lk/api/v3/contacts/{group_id}/update/{uid} ``` -------------------------------- ### Successful API Response for Contact Data Source: https://text.lk/docs/delete-sms-contact This JSON object represents a successful API response, typically containing contact data. It includes a 'status' field indicating success and a 'data' field with the contact details. ```JSON { "status": "success", "data": "contacts data with all details", } ``` -------------------------------- ### API Endpoint for Deleting SMS Contact Source: https://text.lk/docs/delete-sms-contact This is the base API endpoint URL for initiating the deletion of an existing SMS contact. It requires the unique identifiers for both the contact group and the specific contact. ```APIDOC https://app.text.lk/api/v3/contacts/{group_id}/delete/{uid} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.