### 200 OK Response for Get Access Tokens Source: https://soft10.io/api-docs/partner/get-access-tokens-of-app Example response body when the request succeeds. Contains an array of token objects with id, token, and createdAt. ```json { "success": true, "statusCode": 200, "message": "Embed signup link generated successfully", "data": [ { "id": 1, "token": "er8rte9r0tejkrtjkht", "createdAt": "2026-02-10 09:36:59" } ] } ``` -------------------------------- ### POST Source: https://soft10.io/api-docs/webhooks/incoming-message Documentation for the incoming message webhook endpoint, including headers, request body structure, and an example payload. ```APIDOC ## POST ### Description This webhook endpoint receives incoming messages from the Soft10 platform. It is triggered when a message is received and delivers the message data along with a signature for verification. ### Method POST ### Endpoint ### Headers - **x-signature-256** (string) - Required - SHA256 hash of the request body JSON string concatenated with your webhook token. - **Content-Type** (string) - Required - Must be set to `application/json`. ### Request Body - **provider** (string) - Required - The provider identifier, e.g., `soft10`. - **version** (string) - Required - The API version, e.g., `v1`. - **merchant_id** (string) - Required - The merchant identifier. - **event** (string) - Required - The event type, e.g., `message_received`. - **phone_number** (object) - Required - Contains the phone number details. - **id** (string) - Required - The phone number ID. - **display** (string) - Required - The display phone number. - **data** (array) - Required - An array of data objects. - **value** (object) - Required - The message payload. - **messaging_product** (string) - Required - The messaging product, e.g., `whatsapp`. - **contacts** (array) - Required - List of contacts. - **profile** (object) - Required - Contact profile information. - **name** (string) - Required - The contact's name. - **username** (string) - Optional - The contact's username, only if activated. - **wa_id** (string) - Required - The WhatsApp ID. - **user_id** (string) - Required - The user ID. - **messages** (array) - Required - List of messages. - **from** (string) - Required - The sender's phone number. - **from_user_id** (string) - Required - The sender's user ID. - **id** (string) - Required - The message ID. - **timestamp** (string) - Required - The message timestamp. - **text** (object) - Required - The text content. - **body** (string) - Required - The message body. - **type** (string) - Required - The message type, e.g., `text`. - **field** (string) - Required - The field name, e.g., `messages`. ### Request Example ```json { "provider": "soft10", "version": "v1", "merchant_id": "ec247b28-83d8-44bd-bec2-70709e71b513", "event": "message_received", "phone_number": { "id": "75553384164447", "display": "+994 50 123 45 67" }, "data": [ { "value": { "messaging_product": "whatsapp", "contacts": [ { "profile": { "name": "John doe", "username": "" }, "wa_id": "99450715....", "user_id": "AZ.9450056915...." } ], "messages": [ { "from": "994........", "from_user_id": "AZ.94500....", "id": "wamid.HBgMOTA1MDYwOTM0ODU2FQIAEhgWM0VCMDY4QUMxNhdkjUcyMDk3QzY1RQA=", "timestamp": "1766990407", "text": { "body": "Hello, this is test message" }, "type": "text" } ] }, "field": "messages" } ] } ``` ### Response No response schema is provided in the source documentation. The webhook is expected to return a success status (e.g., 200 OK) to acknowledge receipt. ``` -------------------------------- ### GET / Source: https://soft10.io/api-docs The base endpoint of the Soft10 WhatsApp Business API. It serves as the entry point for the API and is used to verify connectivity and access the API documentation. ```APIDOC ## GET / ### Description The base endpoint of the Soft10 WhatsApp Business API. It serves as the entry point for the API and is used to verify connectivity and access the API documentation. ### Method GET ### Endpoint https://api.soft10.io/v1 ### Authentication Authenticate your requests by including your Bearer Token in the `Authorization` header. ``` Authorization: Bearer ``` ### Response #### Success Response (200) - **message** (string) - Welcome message or API information. #### Response Example { "message": "Welcome to the Soft10 WhatsApp Business API" } ``` -------------------------------- ### GET /waba/template Source: https://soft10.io/api-docs/templates/get-templates Retrieves a list of approved WhatsApp templates for the authenticated account. Requires a bearer token in the Authorization header. ```APIDOC ## GET /waba/template ### Description Retrieve a list of approved WhatsApp templates available for your account. ### Method GET ### Endpoint /waba/template ### Headers - **Authorization** (string) - Required - Bearer token for authentication. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **statusCode** (number) - HTTP status code. - **message** (string) - Response message. - **data.templates** (array) - List of approved templates. - **name** (string) - Template name. - **language** (string) - Template language code. - **status** (string) - Approval status (e.g., APPROVED). - **category** (string) - Template category (e.g., UTILITY). - **id** (string) - Template ID. #### Response Example { "success": true, "statusCode": 200, "message": "Templates fetched successfully", "data": { "templates": [ { "name": "hello_world", "language": "en", "status": "APPROVED", "category": "UTILITY", "id": "123456789" } ] } } ``` -------------------------------- ### POST /waba/template Source: https://soft10.io/api-docs/templates/create-text-parameter-template Creates a new text template with parameters. The request includes the template name, language, category, and body text with placeholders for dynamic values. A footer and example values can also be provided. ```APIDOC ## [POST] /waba/template ### Description Creates a new text template with parameters. The request includes the template name, language, category, and body text with placeholders for dynamic values. A footer and example values can also be provided. ### Method POST ### Endpoint /waba/template ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication - **Content-Type** (string) - Required - application/json #### Request Body - **name** (string) - Required - Template name - **language** (string) - Required - Language code (e.g., "en") - **category** (string) - Required - Template category (e.g., "UTILITY") - **body** (object) - Required - Body content - **text** (string) - Required - Template text with placeholders like {{1}}, {{2}} - **example** (array) - Optional - Example values for placeholders - **footer** (object) - Optional - Footer content - **text** (string) - Optional - Footer text ### Request Example { "name": "order_confirmation", "language": "en", "category": "UTILITY", "body": { "text": "Dear {{1}}, your order ({{2}}) has been confirmed. Total: {{3}}", "example": [ "John", "ORD-12345", "150.00 USD" ] }, "footer": { "text": "Contact us for questions" } } ### Response #### Success Response (201) - **success** (boolean) - Indicates success - **statusCode** (integer) - HTTP status code - **message** (string) - Success message - **data** (object) - Response data - **id** (string) - Created template ID - **status** (string) - Template status (e.g., "PENDING") - **category** (string) - Template category #### Response Example { "success": true, "statusCode": 201, "message": "Template created successfully", "data": { "id": "123456789", "status": "PENDING", "category": "UTILITY" } } #### Error Response (400) - **success** (boolean) - false - **statusCode** (integer) - 400 - **message** (string) - Error message - **data** (object) - Error details - **errors** (array) - List of validation errors #### Error Response Example { "success": false, "statusCode": 400, "message": "Validation Error", "data": { "errors": [ "\"name\" is required" ] } } ``` -------------------------------- ### JSON payload for creating a full-featured template Source: https://soft10.io/api-docs/templates/create-full-featured-template The request body for creating a full-featured template. Includes header, body with example variables, footer, and two buttons (URL and quick reply). The allow_category_change field is set to true. ```json { "name": "full_featured_template", "language": "en", "category": "MARKETING", "header": { "format": "text", "text": "🎉 Special Offer!" }, "body": { "text": "Dear {{1}}, special discount for you: {{2}}% off on {{3}}! Code: {{4}}", "example": [ "John", "30", "iPhone 15", "SALE2026" ] }, "footer": { "text": "Offer valid for 7 days" }, "buttons": [ { "type": "url", "text": "Buy Now", "url": "https://example.com/promo/{{1}}", "example": [ "SALE2026" ] }, { "type": "quick_reply", "text": "More Info" } ], "allow_category_change": true } ``` -------------------------------- ### GET https://api.soft10.io/v1 Source: https://soft10.io/api-docs/getting-started/introduction This is the base endpoint for the Soft10 WhatsApp Business API. It serves as the entry point for all API operations, allowing you to send transactional and marketing messages, manage interactive conversations, and receive real-time updates. ```APIDOC ## GET https://api.soft10.io/v1 ### Description This is the base endpoint for the Soft10 WhatsApp Business API. It serves as the entry point for all API operations, allowing you to send transactional and marketing messages, manage interactive conversations, and receive real-time updates. ### Method GET ### Endpoint https://api.soft10.io/v1 ### Authentication Authenticate your requests by including your Bearer Token in the `Authorization` header. ### Request Headers - **Authorization** (string) - Required - Bearer token for authentication. ### Request Example ``` Authorization: Bearer ``` ### Response #### Success Response (200) No response body is documented. ``` -------------------------------- ### JSON request body for video header template Source: https://soft10.io/api-docs/templates/create-video-header-template Request body to create a video header template. The header format is 'video' and the example array contains a media ID. The body text is required. ```json { "name": "video_tutorial", "language": "tr", "category": "MARKETING", "header": { "format": "video", "example": [ "4::dmlkZW8vbXA0:ARc..." ] }, "body": { "text": "Watch our new tutorial video!" } } ``` -------------------------------- ### JSON payload for quick reply template Source: https://soft10.io/api-docs/templates/create-quick-reply-template Payload to create a template with three quick reply buttons. The body text uses a {{1}} placeholder with an example value. ```json { "name": "feedback_request", "language": "en", "category": "UTILITY", "body": { "text": "Dear {{1}}, how do you rate our service?", "example": [ "John" ] }, "buttons": [ { "type": "quick_reply", "text": "👍 Great" }, { "type": "quick_reply", "text": "😐 Average" }, { "type": "quick_reply", "text": "👎 Poor" } ] } ``` -------------------------------- ### JSON payload for URL button template Source: https://soft10.io/api-docs/templates/create-url-button-template The request body to create a URL button template. The URL button includes a dynamic parameter {{1}} and an example value. ```json { "name": "order_tracking", "language": "en", "category": "UTILITY", "body": { "text": "Your order {{1}} is on the way!", "example": [ "ORD-98765" ] }, "buttons": [ { "type": "url", "text": "Track Order", "url": "https://example.com/track/{{1}}", "example": [ "98765" ] } ] } ``` -------------------------------- ### JSON payload for creating a text template Source: https://soft10.io/api-docs/templates/create-text-parameter-template The request body for creating a text template with parameters. The body text uses placeholders like {{1}}, {{2}}, and {{3}}, and the example array provides sample values for those placeholders. ```json { "name": "order_confirmation", "language": "en", "category": "UTILITY", "body": { "text": "Dear {{1}}, your order ({{2}}) has been confirmed. Total: {{3}}", "example": [ "John", "ORD-12345", "150.00 USD" ] }, "footer": { "text": "Contact us for questions" } } ``` -------------------------------- ### Get Templates 200 OK response body Source: https://soft10.io/api-docs/templates/get-templates Expected response body for a successful 200 OK request. Contains a list of approved WhatsApp templates with name, language, status, category, and id. ```json { "success": true, "statusCode": 200, "message": "Templates fetched successfully", "data": { "templates": [ { "name": "hello_world", "language": "en", "status": "APPROVED", "category": "UTILITY", "id": "123456789" } ] } } ``` -------------------------------- ### Interactive Button Reply JSON Payload Source: https://soft10.io/api-docs/webhooks/interactive-button-reply Example JSON payload for the interactive_button_reply event, showing merchant info, phone number, and message data with button reply details. ```json { "provider": "soft10", "version": "v1", "merchant_id": "ec247b28-83d8-44bd-bec2-70709e71b513", "event": "interactive_button_reply", "phone_number": { "id": "75553384164447", "display": "+994 50 123 45 67" }, "data": [ { "value": { "messaging_product": "whatsapp", "contacts": [ { "profile": { "name": "John doe", "username": "" //only if the user username has been activated }, "wa_id": "99450xxxxxxx", "user_id": "AZ.9450056915...." } ], "messages": [ { "context": { "from": "99450715.....", "id": "wamid.HBgMOTA1MDYwOytrDU2FQIAERgSRjdGOTE3RkVCMUIxMURFMTAyAA==" }, "from": "99450xxxxxxx", "from_user_id": "AZ.94500....", "id": "wamid.HBgMOTA1MDYwOTMytyrtyFQIAEhgUM0E3NjVGRTUyNDIzQjQxQzhBRUYA", "timestamp": "1766990840", "type": "interactive", "interactive": { "type": "button_reply", "button_reply": { "id": "call_request", "title": "Call Me Back" } } } ] }, "field": "messages" } ] } ``` -------------------------------- ### Create image header template JSON body Source: https://soft10.io/api-docs/templates/create-image-header-template JSON body for creating a template with an image header. The header format is 'image' and the example contains a base64-encoded image placeholder. The body uses {{1}} and {{2}} placeholders, and the URL button uses {{1}}. ```json { "name": "product_promotion", "language": "en", "category": "MARKETING", "header": { "format": "image", "example": [ "4::aW1hZ2UvanBlZw==:ARb..." ] }, "body": { "text": "Check out our new {{1}}! Now only {{2}}", "example": [ "iPhone 15 Pro", "$999" ] }, "buttons": [ { "type": "url", "text": "Shop Now", "url": "https://example.com/products/{{1}}", "example": [ "iphone-15-pro" ] } ] } ``` -------------------------------- ### JSON payload for creating a document header template Source: https://soft10.io/api-docs/templates/create-document-header-template The request body for creating a template with a document header. The header format is 'document' and includes an example document ID. The body text uses a {{1}} variable for the document number. ```json { "name": "invoice_template", "language": "en", "category": "UTILITY", "header": { "format": "document", "example": [ "4::YXBwbGljYXRpb24vcGRm:ARd..." ] }, "body": { "text": "Your invoice is ready. Document number: {{1}}", "example": [ "INV-2026-001" ] } } ``` -------------------------------- ### POST /waba/partner/create-access-tokens Source: https://soft10.io/api-docs/partner/create-a-new-access-token-for-the-instance Creates a new access token for the instance. Requires the partner secret key in the Authorization header and the app ID in the request body. ```APIDOC ## POST /waba/partner/create-access-tokens ### Description Creates a new access token for the instance. ### Method POST ### Endpoint /waba/partner/create-access-tokens ### Headers - **Authorization** (string) - Required - Bearer token containing the partner secret key. - **Content-Type** (string) - Required - application/json ### Request Body - **appId** (integer) - Required - The ID of the application. ### Request Example { "appId": 11 } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **statusCode** (integer) - HTTP status code. - **message** (string) - Success message. - **data** (object) - Contains the created access token details. - **id** (integer) - Token ID. - **token** (string) - The generated access token. - **status** (integer) - Status of the token. - **createdAt** (string) - Creation timestamp. #### Response Example { "success": true, "statusCode": 200, "message": "Access token created successfully", "data": { "id": 1, "token": "er8rte9r0tejkrtjkht", "status": 1, "createdAt": "2026-02-10 09:36:59" } } ``` -------------------------------- ### POST /waba/template Source: https://soft10.io/api-docs/templates/create-full-featured-template Creates a full-featured WhatsApp Business API template with header, body, footer, and multiple buttons. Requires authentication via Bearer token. ```APIDOC ## POST /waba/template ### Description Create a full-featured template with header, body, footer, and multiple buttons. ### Method POST ### Endpoint /waba/template ### Headers - **Authorization** (string) - Required - Bearer token for authentication - **Content-Type** (string) - Required - application/json ### Request Body - **name** (string) - Required - Template name - **language** (string) - Required - Language code (e.g., "en") - **category** (string) - Required - Template category (e.g., "MARKETING") - **header** (object) - Optional - Header object with format and text - **body** (object) - Required - Body object with text and example array - **footer** (object) - Optional - Footer object with text - **buttons** (array) - Optional - Array of button objects (type, text, url, example) - **allow_category_change** (boolean) - Optional - Whether category change is allowed ### Request Example { "name": "full_featured_template", "language": "en", "category": "MARKETING", "header": { "format": "text", "text": "🎉 Special Offer!" }, "body": { "text": "Dear {{1}}, special discount for you: {{2}}% off on {{3}}! Code: {{4}}", "example": [ "John", "30", "iPhone 15", "SALE2026" ] }, "footer": { "text": "Offer valid for 7 days" }, "buttons": [ { "type": "url", "text": "Buy Now", "url": "https://example.com/promo/{{1}}", "example": [ "SALE2026" ] }, { "type": "quick_reply", "text": "More Info" } ], "allow_category_change": true } ### Response #### Success Response (201) - **success** (boolean) - Indicates success - **statusCode** (number) - HTTP status code - **message** (string) - Success message - **data** (object) - Contains id, status, category #### Response Example { "success": true, "statusCode": 201, "message": "Template created successfully", "data": { "id": "123456789012345", "status": "PENDING", "category": "MARKETING" } } #### Error Response (400) - **success** (boolean) - Indicates failure - **statusCode** (number) - HTTP status code - **message** (string) - Error message - **data** (object) - Contains errors array #### Error Response Example { "success": false, "statusCode": 400, "message": "Validation Error", "data": { "errors": [ "\"name\" is required" ] } } ``` -------------------------------- ### GET /waba/partner/get-access-tokens/:appId Source: https://soft10.io/api-docs/partner/get-access-tokens-of-app Retrieves the access tokens for a specific app instance identified by appId. Requires partner authentication via bearer token. ```APIDOC ## GET /waba/partner/get-access-tokens/:appId ### Description Retrieves the access tokens associated with a specific app instance. ### Method GET ### Endpoint /waba/partner/get-access-tokens/:appId ### Parameters #### Path Parameters - **appId** (string) - Required - The unique identifier of the app instance. #### Headers - **Authorization** (string) - Required - Bearer token containing the partner secret key. - **Content-Type** (string) - Required - Must be application/json. ### Request Example No request body required. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **statusCode** (integer) - HTTP status code. - **message** (string) - Success message. - **data** (array) - List of access tokens. - **id** (integer) - Token identifier. - **token** (string) - The access token value. - **createdAt** (string) - Creation timestamp of the token. #### Response Example { "success": true, "statusCode": 200, "message": "Embed signup link generated successfully", "data": [ { "id": 1, "token": "er8rte9r0tejkrtjkht", "createdAt": "2026-02-10 09:36:59" } ] } ``` -------------------------------- ### POST /waba/partner/generate-embed-link Source: https://soft10.io/api-docs/partner/generate-embed-signup-link Generates an embed signup link for a WhatsApp instance. Requires partner authentication and provides a redirect URL for the signup flow. ```APIDOC ## POST /waba/partner/generate-embed-link ### Description Generates an embed signup link for a WhatsApp instance. Requires partner authentication and provides a redirect URL for the signup flow. ### Method POST ### Endpoint /waba/partner/generate-embed-link ### Headers - **Authorization** (string) - Required - Bearer token with your partner secret key. - **Content-Type** (string) - Required - application/json ### Request Body - **internalId** (integer) - Required - Your instance's internal id. - **webhookUrl** (string) - Required - The webhook URL for receiving signup results. - **webhookSecretKey** (string) - Required - The secret key for webhook authentication. ### Request Example { "internalId": 11, "webhookUrl": "https://example.com", "webhookSecretKey": "12345sdfdsfsd" } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **statusCode** (integer) - HTTP status code. - **message** (string) - Success message. - **data.token** (string) - Token used to receive signup results. - **data.sessionId** (string) - Session identifier for the signup flow. - **data.redirectUrl** (string) - URL to redirect users to for the embed signup. #### Response Example { "success": true, "statusCode": 200, "message": "Embed signup link generated successfully", "data": { "token": "f2a1dfa1ba2602d38sds9efea804f92a4", "sessionId": "53fbadf96a16terte44962bd47", "redirectUrl": "https://chat.soft10.az/whatsapp-embed-signup?session=53fbadf96a16terte44962bd47&partner_id=0a944072-dadd-rtt7-bf43-c9e16533a10" } } ``` -------------------------------- ### POST /waba/template Source: https://soft10.io/api-docs/templates/create-image-header-template Creates a WhatsApp Business API template with an image header. The endpoint accepts template details including header, body, and optional buttons, and returns the created template's ID and status. ```APIDOC ## POST /waba/template ### Description Create a template with an image header. ### Method POST ### Endpoint /waba/template ### Headers - **Authorization** (string) - Required - Bearer token for authentication - **Content-Type** (string) - Required - application/json ### Request Body - **name** (string) - Required - Template name - **language** (string) - Required - Language code - **category** (string) - Required - Template category (e.g., MARKETING) - **header** (object) - Required - Header configuration - **format** (string) - Required - Header format (e.g., image) - **example** (array) - Required - Example media reference - **body** (object) - Required - Body configuration - **text** (string) - Required - Body text with placeholders - **example** (array) - Required - Example values for placeholders - **buttons** (array) - Optional - Button configurations - **type** (string) - Required - Button type (e.g., url) - **text** (string) - Required - Button text - **url** (string) - Required - Button URL with placeholder - **example** (array) - Required - Example URL values ### Request Example { "name": "product_promotion", "language": "en", "category": "MARKETING", "header": { "format": "image", "example": [ "4::aW1hZ2UvanBlZw==:ARb..." ] }, "body": { "text": "Check out our new {{1}}! Now only {{2}}", "example": [ "iPhone 15 Pro", "$999" ] }, "buttons": [ { "type": "url", "text": "Shop Now", "url": "https://example.com/products/{{1}}", "example": [ "iphone-15-pro" ] } ] } ### Response #### Success Response (201) - **success** (boolean) - Indicates success - **statusCode** (number) - HTTP status code - **message** (string) - Success message - **data** (object) - Response data - **id** (string) - Template ID - **status** (string) - Template status (e.g., PENDING) - **category** (string) - Template category #### Response Example { "success": true, "statusCode": 201, "message": "Template created successfully", "data": { "id": "123456789", "status": "PENDING", "category": "MARKETING" } } #### Error Response (400) - **success** (boolean) - Indicates failure - **statusCode** (number) - HTTP status code - **message** (string) - Error message - **data** (object) - Error details - **errors** (array) - List of validation errors #### Error Response Example { "success": false, "statusCode": 400, "message": "Validation Error", "data": { "errors": [ "\"name\" is required" ] } } ``` -------------------------------- ### POST /waba/template Source: https://soft10.io/api-docs/templates/create-quick-reply-template Creates a new WhatsApp template with quick reply buttons. Requires authentication via Bearer token and sends a JSON payload with template details, including the body text and an array of quick reply buttons. ```APIDOC ## [POST] /waba/template ### Description Creates a template with quick reply buttons. ### Method POST ### Endpoint /waba/template ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - Must be application/json. #### Request Body - **name** (string) - Required - The name of the template. - **language** (string) - Required - The language code (e.g., "en"). - **category** (string) - Required - The template category (e.g., "UTILITY"). - **body** (object) - Required - Contains the template body. - **text** (string) - Required - The body text with placeholders. - **example** (array of strings) - Optional - Example values for placeholders. - **buttons** (array of objects) - Required - List of quick reply buttons. - **type** (string) - Required - Must be "quick_reply". - **text** (string) - Required - The button label. ### Request Example { "name": "feedback_request", "language": "en", "category": "UTILITY", "body": { "text": "Dear {{1}}, how do you rate our service?", "example": ["John"] }, "buttons": [ {"type": "quick_reply", "text": "👍 Great"}, {"type": "quick_reply", "text": "😐 Average"}, {"type": "quick_reply", "text": "👎 Poor"} ] } ### Response #### Success Response (201 Created) - **success** (boolean) - Indicates success. - **statusCode** (integer) - HTTP status code. - **message** (string) - Success message. - **data** (object) - Contains created template details. - **id** (string) - Template ID. - **status** (string) - Status (e.g., PENDING). - **category** (string) - Category. #### Response Example { "success": true, "statusCode": 201, "message": "Template created successfully", "data": { "id": "123456789", "status": "PENDING", "category": "UTILITY" } } #### Error Response (400 Bad Request) - **success** (boolean) - Indicates failure. - **statusCode** (integer) - HTTP status code. - **message** (string) - Error message. - **data** (object) - Contains error details. - **errors** (array of strings) - List of validation errors. #### Response Example (Validation Error) { "success": false, "statusCode": 400, "message": "Validation Error", "data": { "errors": ["\"name\" is required"] } } ``` -------------------------------- ### PHP Webhook Signature Verification Source: https://soft10.io/api-docs/webhooks/webhooks PHP implementation using file_get_contents('php://input') to get the raw body, hash('sha256') to compute the signature, and hash_equals for secure comparison. ```php $webhookToken = "YOUR_SECURE_TOKEN"; // 1. Get raw input $requestBody = file_get_contents('php://input'); // 2. Calculate Hash (Body . Token) $calculatedSignature = hash('sha256', $requestBody . $webhookToken); // 3. Compare $incomingSignature = $_SERVER['HTTP_X_SIGNATURE_256']; if (hash_equals($calculatedSignature, $incomingSignature)) { // Verified } ``` -------------------------------- ### Headers for POST /waba/partner/create-access-tokens Source: https://soft10.io/api-docs/partner/create-a-new-access-token-for-the-instance Required headers for the request: Authorization with the partner secret key and Content-Type set to application/json. ```json { "Authorization": "Bearer ", "Content-Type": "application/json" } ``` -------------------------------- ### 200 OK response for POST /waba/partner/create-access-tokens Source: https://soft10.io/api-docs/partner/create-a-new-access-token-for-the-instance Successful response body with success flag, status code, message, and data containing the created token details. ```json { "success": true, "statusCode": 200, "message": "Access token created successfully", "data": { "id": 1, "token": "er8rte9r0tejkrtjkht", "status": 1, "createdAt": "2026-02-10 09:36:59" } } ``` -------------------------------- ### POST /waba/template Source: https://soft10.io/api-docs/templates/create-video-header-template This endpoint creates a new template with a video header. It requires authentication and accepts a JSON payload with template details. ```APIDOC ## POST /waba/template ### Description Create a template with a video header. ### Method POST ### Endpoint /waba/template ### Headers - **Authorization** (string) - Required - Bearer token for authentication - **Content-Type** (string) - Required - application/json ### Request Body - **name** (string) - Required - Template name - **language** (string) - Required - Language code (e.g., "tr") - **category** (string) - Required - Template category (e.g., "MARKETING") - **header** (object) - Required - Header object with format and example - **format** (string) - Required - Header format (e.g., "video") - **example** (array) - Required - Array of video example strings - **body** (object) - Required - Body object with text - **text** (string) - Required - Body text content ### Request Example { "name": "video_tutorial", "language": "tr", "category": "MARKETING", "header": { "format": "video", "example": [ "4::dmlkZW8vbXA0:ARc..." ] }, "body": { "text": "Watch our new tutorial video!" } } ### Response #### Success Response (201) - **success** (boolean) - Indicates success - **statusCode** (number) - HTTP status code - **message** (string) - Success message - **data** (object) - Response data - **id** (string) - Template ID - **status** (string) - Template status (e.g., "PENDING") - **category** (string) - Template category #### Response Example { "success": true, "statusCode": 201, "message": "Template created successfully", "data": { "id": "123456789", "status": "PENDING", "category": "MARKETING" } } #### Error Response (400) - **success** (boolean) - Indicates failure - **statusCode** (number) - HTTP status code - **message** (string) - Error message - **data** (object) - Error details - **errors** (array) - List of validation error messages #### Error Response Example { "success": false, "statusCode": 400, "message": "Validation Error", "data": { "errors": [ "\"name\" is required" ] } } ``` -------------------------------- ### Incoming Message Webhook JSON Payload Source: https://soft10.io/api-docs/webhooks/incoming-message Example JSON payload for the message_received event. Contains merchant_id, phone_number, and a data array with message details. The username field is only present if the user's username has been activated. ```json { "provider": "soft10", "version": "v1", "merchant_id": "ec247b28-83d8-44bd-bec2-70709e71b513", "event": "message_received", "phone_number": { "id": "75553384164447", "display": "+994 50 123 45 67" }, "data": [ { "value": { "messaging_product": "whatsapp", "contacts": [ { "profile": { "name": "John doe", "username": "" //only if the user username has been activated }, "wa_id": "99450715....", "user_id": "AZ.9450056915...." } ], "messages": [ { "from": "994........", "from_user_id": "AZ.94500....", "id": "wamid.HBgMOTA1MDYwOTM0ODU2FQIAEhgWM0VCMDY4QUMxNhdkjUcyMDk3QzY1RQA=", "timestamp": "1766990407", "text": { "body": "Hello, this is test message" }, "type": "text" } ] }, "field": "messages" } ] } ``` -------------------------------- ### POST /waba/message/send Source: https://soft10.io/api-docs/messages/interactive-message-buttons Documentation for sending an interactive message with quick reply buttons via the /waba/message/send endpoint. ```APIDOC ## POST /waba/message/send ### Description Send a message with up to 3 quick reply buttons. ### Method POST ### Endpoint /waba/message/send ### Headers - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - Must be application/json. ### Request Body - **to** (string) - Required - Phone number or BSUID of the recipient. - **type** (string) - Required - Must be "button". - **text** (string) - Required - The message text to display. - **interactive** (object) - Required - Contains header, footer, and reply_buttons. - **header** (string) - Optional - Header text for the interactive message. - **footer** (string) - Optional - Footer text for the interactive message. - **reply_buttons** (array) - Required - List of up to 3 quick reply buttons. - **id** (string) - Required - Unique identifier for the button. - **title** (string) - Required - Button label. ### Request Example ```json { "to": "994501234567", "type": "button", "text": "Would you like to continue?", "interactive": { "header": "Confirmation", "footer": "Select an option", "reply_buttons": [ { "id": "yes", "title": "Yes" }, { "id": "no", "title": "No" } ] } } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates success. - **statusCode** (integer) - HTTP status code. - **message** (string) - Success message. - **data** (object) - Contains message_id. - **message_id** (string) - The WhatsApp message ID. #### Response Example ```json { "success": true, "statusCode": 200, "message": "Message sent successfully", "data": { "message_id": "wamid.HBgLOTk0NTAxMjM0NTY3FQIAERgSM0VCMDAwMDAwMDAwMDAwMDAA" } } ``` ### Error Handling #### 400 Bad Request - Validation Error - **success** (boolean) - false - **statusCode** (integer) - 400 - **message** (string) - "Validation Error" - **data** (object) - Contains errors array. - **errors** (array of strings) - List of validation error messages. #### Response Example ```json { "success": false, "statusCode": 400, "message": "Validation Error", "data": { "errors": [ "\"to\" is required", "\"type\" is required" ] } } ``` #### 403 Forbidden - **success** (boolean) - false - **statusCode** (integer) - 403 - **message** (string) - "You do not have permission to perform this process." #### Response Example ```json { "success": false, "statusCode": 403, "message": "You do not have permission to perform this process." } ``` #### 500 Internal Server Error - Provider Error - **success** (boolean) - false - **statusCode** (integer) - 500 - **message** (object) - Contains provider and details. - **provider** (string) - The provider name (e.g., "Meta"). - **details** (object) - Contains error details. - **error** (object) - Contains message, type, and code. - **message** (string) - Error message. - **type** (string) - Error type. - **code** (integer) - Error code. #### Response Example ```json { "success": false, "statusCode": 500, "message": { "provider": "Meta", "details": { "error": { "message": "", "type": "", "code": "" } } } } ``` ```