### Generate URL Request Example Source: https://docs.loopmessage.com/imessage-conversation-api/opt-in/frontend-method Example of a GET request to the generate-url endpoint with query parameters. ```http GET https://t.imsg.link/tracker-api/v1/generate-url/{organization_id}/?body=hello%20world%20[opt-in-code]¶m1=abcd1234¶m2=google¶m3=mysite.com ``` -------------------------------- ### Order Phone Sender Request Body Example Source: https://docs.loopmessage.com/dashboard/senders/order-bulk-sender-names This example demonstrates the structure for ordering a sender with a phone number. Ensure 'plan_id' is provided and 'phone_region' is set to 'US' or 'GB'. Optional fields like 'zip_code', 'sms_and_call', and 'forwarding_to_phone_number' can also be included. ```json { "count": 1, "items": [ { "id": "f41c27d2-1251-488f-bf10-267945199555", "phone_region": "US", "zip_code": "10001", "sms_and_call": true, "forwarding_to_phone_number": "+13231112233", "rcs": true } ] } ``` -------------------------------- ### Order Email Sender Request Body Example Source: https://docs.loopmessage.com/dashboard/senders/order-bulk-sender-names This example shows the JSON response structure when ordering an email sender. It includes the sender's ID and name. ```json { "count": 1, "items": [ { "id": "f41c27d2-1251-488f-bf10-267945199555", "name": "sender@example.com" } ] } ``` -------------------------------- ### Update pool response Source: https://docs.loopmessage.com/dashboard/pools/manage-pool Response examples for successful and failed update requests. ```json { "success": true, } ``` ```json { "code": 100, "success": false, "message": "error description", } ``` -------------------------------- ### Campaign API Response Examples Source: https://docs.loopmessage.com/imessage-conversation-api/campaigns/new Standard responses for successful requests and bad request errors. ```json { "id": "UUID String", "name": "String", "api_key": "String", "create_date": "2025-01-01T23:59:59Z" } ``` ```json { "code": 100, "success": false, "message": "error description", } ``` -------------------------------- ### GET /api/v1/sender/plans/ Source: https://docs.loopmessage.com/dashboard/senders/get-a-list-of-available-payment-plans Retrieves a list of all available sender name payment plans. ```APIDOC ## GET /api/v1/sender/plans/ ### Description Use this method to get a list of available sender name plans. ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/sender/plans/ ### Response #### Success Response (200) - **count** (integer) - The total number of plans available. - **items** (array) - A list of payment plans. - **id** (string) - The unique identifier for the plan. - **name** (string) - The name of the plan. - **daily_contacts** (integer) - The maximum number of contacts allowed per day. - **monthly_contacts** (integer) - The maximum number of contacts allowed per month. - **monthly_fee** (number) - The monthly cost of the plan. - **currency** (string) - The currency of the monthly fee. #### Response Example ```json { "count": 1, "items": [ { "id": "string", "name": "string", "daily_contacts": 0, "monthly_contacts": 0, "monthly_fee": 100.00, "currency": "USD" } ] } ``` ``` -------------------------------- ### Get Available Sender Name Plans Source: https://docs.loopmessage.com/dashboard/senders/get-a-list-of-available-payment-plans Use this GET request to retrieve a list of available sender name plans. The response includes details such as daily and monthly contact limits, and pricing. ```HTTP GET https://a.loopmessage.com/api/v1/sender/plans/ ``` ```JSON { "count": 1, "items": [ { "id": "string", "name": "string", "daily_contacts": 0, "monthly_contacts": 0, "monthly_fee": 100.00, "currency": "USD" } ] } ``` -------------------------------- ### Create a New Pool API Responses Source: https://docs.loopmessage.com/dashboard/pools/new-pool Example JSON responses for successful creation and bad request error scenarios. ```json { "id": "string", "name": "string", "count": 1, "create_date": "2025-01-27T22:23:51Z" } ``` ```json { "code": 100, "success": false, "message": "error description", } ``` -------------------------------- ### Generate URL Response Example Source: https://docs.loopmessage.com/imessage-conversation-api/opt-in/frontend-method The JSON response returned by the generate-url endpoint containing tracking IDs and formatted URLs. ```json { "id": "6ad46341-4c91-4d01-a943-ea97f8e00d74", "imessage": "imessage://hi%40imsg.co&body=hello%20%22%232M6t-%21DXSy%22%20world", "sms": "sms:hi%40imsg.co&body=hello%20%22%232M6t-%21DXSy%22%20world", "url": "https://opt-in.imsg.link/opt-in/5cTjZ/?id=6ad46341-4c91-4d01-a943-ea97f8e00d74&body=hello%20%5Bopt-in-code%5D%20world" } } ``` -------------------------------- ### Get pool details response Source: https://docs.loopmessage.com/dashboard/pools/manage-pool The response structure for a successful GET request to retrieve pool details. ```json { "id": "string", "name": "string", "status": "enum string", "create_date": "2025-01-27T22:23:51Z", } ``` -------------------------------- ### GET /api/v1/organizations/list/ Source: https://docs.loopmessage.com/dashboard/organizations/list Retrieves a list of all available organizations. This API requires an API Key from the Default organization and active paid services. It does not work with the sandbox environment. ```APIDOC ## GET /api/v1/organizations/list/ ### Description Use this method to get a list of all available organizations. This API requires an API Key from the Default organization and active paid services. It does not work with the sandbox environment. ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/organizations/list/ ### Parameters #### Query Parameters - **sort_by** (String) - Optional - Sorting order for results. Possible values: asc (ascending) or desc (default). - **page** (Integer) - Optional - The page number to retrieve. Default is 1. - **per_page** (Integer) - Optional - Number of webhook records per page. Default is 20. - **search** (String) - Optional - Filter organizations by a specific value in name. ### Request Headers - **Authorization** (String) - Required - API Key. - **Content-Type** (String) - Required - application/json ### Response #### Success Response (200) - **page** (Integer) - The current page number. - **num_pages** (Integer) - The total number of pages. - **per_page** (Integer) - The number of items per page. - **count** (Integer) - The total number of organizations. - **items** (Array) - An array of organization objects. - **id** (String) - The unique identifier for the organization. - **name** (String) - The name of the organization. - **status** (String) - The status of the organization (e.g., 'active'). - **create_date** (String) - The date and time the organization was created in ISO 8601 format. #### Response Example ```json { "page": 1, "num_pages": 1, "per_page": 20, "count": 1, "items": [ { "id": "string", "name": "string", "status": "active", "create_date": "2025-01-01T23:59:59Z" } ] } ``` ``` -------------------------------- ### Create a New Pool Request Body Source: https://docs.loopmessage.com/dashboard/pools/new-pool Example JSON payload for the POST request to create a new pool. ```json { "name": "new pool", "ids": ["id1", "id2", "id3"] } ``` -------------------------------- ### Define campaign with message array and schedule Source: https://docs.loopmessage.com/imessage-conversation-api/campaigns/new Example payload for a campaign using an array of individual messages with specific scheduling parameters. ```json { "name": "My new campaign", "from_date": "2026-12-31", "from_time": "10:00", "to_time": "19:00", "messages" [ { "text": "Hello 1", "contact": "+13231112233", }, { "text": "Hello with attachment", "contact": "+13232112233", "attachments": ["https://mycdn.com/image.png"] } ] } ``` -------------------------------- ### Define campaign with contact array and schedule Source: https://docs.loopmessage.com/imessage-conversation-api/campaigns/new Example payload for a campaign targeting multiple contacts with specific scheduling parameters. ```json { "name": "My new campaign", "from_date": "2026-12-31", "from_time": "10:00", "to_time": "19:00", "text": "Hello", "contacts": ["+13231112233", "+13232112233", "+13233112233"] } ``` -------------------------------- ### GET /api/v1/webhooks/history/ Source: https://docs.loopmessage.com/dashboard/webhook-history Retrieves a paginated list of webhook history records. ```APIDOC ## GET /api/v1/webhooks/history/ ### Description Use this method to get a history of webhooks that have been sent to you. ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/webhooks/history/ ### Parameters #### Query Parameters - **sort_by** (String) - Optional - Sorting order for results. Possible values: asc (ascending) or desc (default). - **page** (Integer) - Optional - The page number to retrieve. Default is 1. - **per_page** (Integer) - Optional - Number of webhook records per page. Default is 20. ### Response #### Success Response (200) - **page** (Integer) - Current page number. - **num_pages** (Integer) - Total number of pages. - **per_page** (Integer) - Number of records per page. - **count** (Integer) - Total count of records. - **items** (Array) - List of webhook history objects. #### Response Example { "page": 1, "num_pages": 1, "per_page": 20, "count": 1, "items": [ { "attempt": 1, "create_date": "2025-01-27T22:23:51Z", "event_type": "message_inbound", "json": { "contact": "+155566678958", "event": "message_inbound", "language": { "code": "de", "name": "German" }, "message_id": "2a12f7ed-da37-49fd-bbf9-e2965adfb01d", "organization_id": "e2229e7b-29df-486d-924e-7dae925b0796", "parameters": { "param1": "abcd1234", "param2": "google", "param3": "mysite.com" }, "text": "Hello world", "type": "opt_in", "webhook_id": "d37985d1-d648-4d42-ac69-ae72e08da86e" } } ] } ``` -------------------------------- ### Webhook Event Payload Source: https://docs.loopmessage.com/imessage-conversation-api/opt-in/backend-method Example of the data structure received via webhook after a user completes the opt-in process. ```json { "contact": "+155566678958", "event": "message_inbound", "language": { "code": "de", "name": "German" }, "message_id": "2a12f7ed-da37-49fd-bbf9-e2965adfb01d", "organization_id": "e2229e7b-29df-486d-924e-7dae925b0796", "parameters": { "click_id": "asdasads1241412fdsf", "utm_medium": "google", "utm_campaign": "credit on card online" }, "text": "Hey guy, want to test end-to-end analytics a little?", "type": "opt_in", "webhook_id": "d37985d1-d648-4d42-ac69-ae72e08da86e" } ``` -------------------------------- ### GET /api/v1/sender/list/ Source: https://docs.loopmessage.com/dashboard/pools/list Retrieves a list of all sender names. Supports pagination and sorting. ```APIDOC ## GET /api/v1/sender/list/ ### Description Use this method to get a list of all sender names. You can use a contact ID or a phone number/email address (depending on what the user provided you with when subscribing). ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/sender/list/ ### Headers - **Authorization** (String) - API Key. Required. - **Content-Type** (String) - `application/json`. Required. ### Query Parameters - **sort_by** (String) - Optional. Sorting order for results. Possible values: asc (ascending) or desc (default). - **page** (Integer) - Optional. The page number to retrieve. Default is 1. - **per_page** (Integer) - Optional. Number of webhook records per page. Default is 20. ### Response #### Success Response (200) - **page** (Integer) - The current page number. - **num_pages** (Integer) - The total number of pages. - **per_page** (Integer) - The number of items per page. - **count** (Integer) - The total number of items. - **items** (Array) - A list of sender objects. - **id** (String) - The unique identifier of the sender. - **name** (String) - The name of the sender. - **status** (enum string) - The status of the sender. - **create_date** (String) - The date and time the sender was created (ISO 8601 format). - **imessage_link** (URL string) - A link related to iMessage for the sender. #### Response Example ```json { "page": 1, "num_pages": 1, "per_page": 20, "count": 1, "items": [ { "id": "string", "name": "string", "status": "enum string", "create_date": "2025-01-27T22:23:51Z", "imessage_link": "URL string" } ] } ``` ``` -------------------------------- ### Message history response schema Source: https://docs.loopmessage.com/dashboard/messages-history Example JSON response structure for a successful message history request. ```json { "page": 1, "num_pages": 1, "per_page": 20, "count": 1, "status": "unsubscribed", "items": [ { "id": "uuid", "create_date": "iso8 format date", "channel": "imessage", "direction": "outbound", "language": "EN", "type": "text", "text": "string" } ] } ``` -------------------------------- ### Bulk Sender Names Request Body Example Source: https://docs.loopmessage.com/dashboard/senders/order-bulk-sender-names This JSON structure defines the 'senders' array for bulk ordering. Each object within the array can specify details for a phone or email sender. ```json "senders" [ { "phone_region": "US", "plan_id": "string" }, { "name": "sender2", "domain": "example.com", "plan_id": "string" } ] ``` -------------------------------- ### Get Organization Opt-in History Source: https://docs.loopmessage.com/dashboard/opt-in-history Retrieves a paginated list of opt-in events for an organization. Supports filtering by date and sorting. ```APIDOC ## GET /api/v1/audience/tracker/ ### Description Retrieves a paginated list of opt-in events for an organization. Supports filtering by date and sorting. ### Method GET ### Endpoint `https://a.loopmessage.com/api/v1/audience/tracker/` ### Parameters #### Query Parameters - **page** (Integer) - Optional - The current page of the paginated request. Default: `1`. - **per_page** (Integer) - Optional - The number of items to be returned for a specific page. Default: `20`. Max value: `1000`. - **sort_by** (String) - Optional - Possible values: `asc` or `desc`. Default: `desc`. - **from_date** (String) - Optional - YYYY-MM-DD format date. For example: `2010-12-31`. - **to_date** (String) - Optional - YYYY-MM-DD format date. For example: `2010-12-31`. ### Headers - **Authorization** (String) - Required - API Key. - **Content-Type** (String) - Required - `application/json` ### Response #### Success Response (200) - **page** (Integer) - The current page number. - **num_pages** (Integer) - The total number of pages available. - **per_page** (Integer) - The number of items per page. - **count** (Integer) - The total number of opt-in records. - **items** (Array) - An array of opt-in history objects. - **id** (String) - The unique identifier for the opt-in event. - **ip_address** (String) - The IP address from which the opt-in occurred. - **organization** (String) - The UUID string of the organization. - **origin** (String) - The origin URL of the opt-in (e.g., `https://your-website.com/`). - **type** (String) - The type of event, typically `opt_in`. - **create_date** (String) - The timestamp when the opt-in occurred in ISO 8601 format. - **geo** (Object) - Geographic information about the opt-in location. - **city** (String) - The city of the IP address. - **country** (String) - The country code (e.g., `US`). - **europe_union** (Boolean) - Indicates if the country is part of the European Union. - **postal_code** (String) - The postal code. - **region** (String) - The region or state. - **time_zone** (String) - The time zone of the location. - **user_agent** (Object) - Information about the user's browser and operating system. - **bot** (Boolean) - Indicates if the user agent is a bot. - **browser** (String) - The name and version of the browser. - **device** (String) - The type of device used. - **email_client** (Boolean) - Indicates if the user agent is an email client. - **mobile** (Boolean) - Indicates if the device is a mobile phone. - **os** (String) - The name and version of the operating system. #### Response Example ```json { "page": 1, "num_pages": 7, "per_page": 20, "count": 132, "items": [ { "id": "string", "ip_address": "127.0.0.1", "organization": "uuid string", "origin": "https://your-website.com/", "type": "opt_in", "create_date": "2025-12-31T23:59:59+00:00", "geo": { "city": "New York", "country": "US", "europe_union": false, "postal_code": "10001", "region": "NY", "time_zone": "America/New_York" }, "user_agent": { "bot": false, "browser": "Safari 18.0", "device": "Mac", "email_client": false, "mobile": false, "os": "Mac OS X 10.15.7" } } ] } ``` ``` -------------------------------- ### All Sender Names API Source: https://docs.loopmessage.com/dashboard/senders/senders-list Use this method to get a list of all sender names. ```APIDOC ## GET /api/v1/sender/list/ ### Description Retrieves a list of all sender names. You can use a contact ID or a phone number/email address (depending on what the user provided you with when subscribing). ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/sender/list/ ### Query Parameters - **sort_by** (String) - Optional - Sorting order for results. Possible values: asc (ascending) or desc (default). - **page** (Integer) - Optional - The page number to retrieve. Default is 1. - **per_page** (Integer) - Optional - Number of webhook records per page. Default is 20. ### Headers - **Authorization** (String) - Required - API Key. - **Content-Type** (String) - Required - application/json ### Response #### Success Response (200) - **page** (Integer) - The current page number. - **num_pages** (Integer) - The total number of pages. - **per_page** (Integer) - The number of items per page. - **count** (Integer) - The total number of items. - **items** (Array) - A list of sender objects. - **id** (String) - The sender's unique identifier. - **name** (String) - The sender's name. - **status** (enum string) - The sender's status. - **create_date** (String) - The date and time the sender was created (ISO 8601 format). - **imessage_link** (URL string) - A link related to iMessage. ### Response Example ```json { "page": 1, "num_pages": 1, "per_page": 20, "count": 1, "items": [ { "id": "string", "name": "string", "status": "enum string", "create_date": "2025-01-27T22:23:51Z", "imessage_link": "URL string" } ] } ``` ``` -------------------------------- ### Get Organization Opt-in History Source: https://docs.loopmessage.com/dashboard/opt-in-history Use this endpoint to retrieve a paginated list of opt-in events for an organization. You can filter and sort the results by date and page number. Ensure you include the 'Authorization' header with your API key. ```json { "page": 1, "num_pages": 7, "per_page": 20, "count": 132, "items": [ { "id": "string", "ip_address": "127.0.0.1", "organization": "uuid string", "origin": "https://your-website.com/", "type": "opt_in", "create_date": "2025-12-31T23:59:59+00:00", "geo": { "city": "New York", "country": "US", "europe_union": false, "postal_code": "10001", "region": "NY", "time_zone": "America/New_York" }, "user_agent": { "bot": false, "browser": "Safari 18.0", "device": "Mac", "email_client": false, "mobile": false, "os": "Mac OS X 10.15.7" } } ] } ``` -------------------------------- ### GET /api/v1/pool/list/ Source: https://docs.loopmessage.com/dashboard/pools/list Retrieves a list of all sender pools associated with a specific organization. Supports pagination and sorting. ```APIDOC ## GET /api/v1/pool/list/ ### Description Use this method to get a list of all sender pool related to a specific organization. ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/pool/list/ ### Headers - **Authorization** (String) - API Key. Required. - **Content-Type** (String) - `application/json`. Required. ### Query Parameters - **sort_by** (String) - Optional. Sorting order for results. Possible values: asc (ascending) or desc (default). - **page** (Integer) - Optional. The page number to retrieve. Default is 1. - **per_page** (Integer) - Optional. Number of webhook records per page. Default is 20. ### Response #### Success Response (200) - **page** (Integer) - The current page number. - **num_pages** (Integer) - The total number of pages. - **per_page** (Integer) - The number of items per page. - **count** (Integer) - The total number of items. - **items** (Array) - A list of sender pool objects. - **id** (String) - The unique identifier of the sender pool. - **name** (String) - The name of the sender pool. - **count** (Integer) - The number of associated senders. - **create_date** (String) - The date and time the sender pool was created (ISO 8601 format). #### Response Example ```json { "page": 1, "num_pages": 1, "per_page": 20, "count": 1, "items": [ { "id": "string", "name": "string", "count": 1, "create_date": "2025-01-27T22:23:51Z" } ] } ``` ``` -------------------------------- ### Define campaign with message array and message effects Source: https://docs.loopmessage.com/imessage-conversation-api/campaigns/new Example payload for a campaign using an array of individual messages with optional message effects and subjects. ```json { "name": "My new campaign", "messages" [ { "text": "Hello 1", "contact": "+13231112233", "effect": "love" }, { "text": "Hello with attachment", "contact": "+13232112233", "attachments": ["https://mycdn.com/image.png"], "subject": "String" } ] } ``` -------------------------------- ### Sample Webhook Events Source: https://docs.loopmessage.com/imessage-conversation-api/webhooks Examples of various webhook events you might receive from LoopMessage, including inbound messages, scheduled messages, failed messages, delivered messages, and reactions. Note that webhooks may contain additional fields not shown in these samples. ```APIDOC ## Sample Webhook Events ### Inbound Message Event ```json { "event": "message_inbound", "contact": "+13231112233", "text": "text", "message_type": "text", "message_id": "59c55Ce8-41d6-43Cc-9116-8cfb2e696D7b", "webhook_id": "ab5Ae733-cCFc-4025-9987-7279b26bE71b", "api_version": "1.0" } ``` ### Scheduled Message Event ```json { "event": "message_scheduled", "contact": "+13231112233", "text": "text", "message_id": "59c55Ce8-41d6-43Cc-9116-8cfb2e696D7b", "webhook_id": "ab5Ae733-cCFc-4025-9987-7279b26bE71b", "api_version": "1.0" } ``` ### Failed Message Event ```json { "event": "message_failed", "contact": "+13231112233", "text": "text", "error_code": 100, "message_id": "59c55Ce8-41d6-43Cc-9116-8cfb2e696D7b", "webhook_id": "ab5Ae733-cCFc-4025-9987-7279b26bE71b", "api_version": "1.0" } ``` ### Delivered Message Event ```json { "event": "message_delivered", "contact": "+13231112233", "text": "text", "message_id": "59c55Ce8-41d6-43Cc-9116-8cfb2e696D7b", "webhook_id": "ab5Ae733-cCFc-4025-9987-7279b26bE71b", "api_version": "1.0" } ``` ### Reaction Event ```json { "event": "message_reaction", "contact": "+13231112233", "text": "text", "reaction": "like", "message_id": "59c55Ce8-41d6-43Cc-9116-8cfb2e696D7b", "webhook_id": "ab5Ae733-cCFc-4025-9987-7279b26bE71b", "api_version": "1.0" } ``` ``` -------------------------------- ### Define campaign with contact array and message effects Source: https://docs.loopmessage.com/imessage-conversation-api/campaigns/new Example payload for a campaign targeting multiple contacts with optional message effects and subjects. ```json { "name": "My new campaign", "text": "Hello", "contacts": ["+13231112233", "+13232112233", "+13233112233"], "effect": "echo", "subject": "String" } ``` -------------------------------- ### Generate Tracking URL Source: https://docs.loopmessage.com/imessage-conversation-api/opt-in/frontend-method This endpoint generates a tracking URL. Additional parameters can be passed as GET query parameters. ```APIDOC ## GET /tracker-api/v1/generate-url/{organization_id}/ ### Description Generates a tracking URL for the specified organization. Additional parameters are passed as GET query parameters. ### Method GET ### Endpoint `https://t.imsg.link/tracker-api/v1/generate-url/{organization_id}/` ### Parameters #### Path Parameters - **organization_id** (String) - Required - Your organization ID. #### Query Parameters - **body** (String) - Optional - The body content for the message. ### Request Example `GET https://t.imsg.link/tracker-api/v1/generate-url/{organization_id}/?body=hello%20world%20[opt-in-code]¶m1=abcd1234¶m2=google¶m3=mysite.com` ### Response #### Success Response (200) - **id** (String) - The unique identifier for the generated tracking entry. - **imessage** (String) - An iMessage link. - **sms** (String) - An SMS link. - **url** (String) - The generated tracking URL. #### Response Example ```json { "id": "6ad46341-4c91-4d01-a943-ea97f8e00d74", "imessage": "imessage://hi%40imsg.co&body=hello%20%22%232M6t-%21DXSy%22%20world", "sms": "sms:hi%40imsg.co&body=hello%20%22%232M6t-%21DXSy%22%20world", "url": "https://opt-in.imsg.link/opt-in/5cTjZ/?id=6ad46341-4c91-4d01-a943-ea97f8e00d74&body=hello%20%5Bopt-in-code%5D%20world" } ``` ``` -------------------------------- ### Get Organization Details Source: https://docs.loopmessage.com/dashboard/organizations/manage Retrieve details for a specific organization using its ID. The response varies based on the API key used (default organization key provides broader access). ```json { "id": "string", "name": "string", "status": "enum string", "create_date": "2025-01-27T22:23:51Z", "api_key": "string" // optional } ``` -------------------------------- ### GET /api/v1/organizations/details/{id}/ Source: https://docs.loopmessage.com/dashboard/organizations/manage Retrieves the details of a specific organization using its ID. The response may vary based on the API key used, providing either organization-specific details or admin-level access to all organizations. ```APIDOC ## GET /api/v1/organizations/details/{id}/ ### Description Use this method to get a list of sender names related to a specific organization. ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/organizations/details/{id}/ ### Parameters #### Path Parameters - **id** (String) - Required - Sender pool ID ### Response #### Success Response (200) - **id** (string) - The unique identifier for the organization. - **name** (string) - The name of the organization. - **status** (enum string) - The current status of the organization. - **create_date** (string) - The date and time when the organization was created, in ISO 8601 format. - **api_key** (string) - Optional - The API key associated with the organization. #### Response Example ```json { "id": "string", "name": "string", "status": "enum string", "create_date": "2025-01-27T22:23:51Z", "api_key": "string" } ``` ``` -------------------------------- ### POST /api/v1/sender/new/ Source: https://docs.loopmessage.com/dashboard/senders/order-bulk-sender-names Use this method for bulk ordering new sender names. Before sending this request, you need to fetch `plan_id` from another API request. To prevent billing issues, you can send this request once every 30 seconds. Once the request is accepted, you will be automatically charged from the attached billing method. ```APIDOC ## POST /api/v1/sender/new/ ### Description Use this method for bulk ordering new sender names. It supports ordering sender names associated with phone numbers or email addresses. ### Method POST ### Endpoint https://a.loopmessage.com/api/v1/sender/new/ ### Parameters #### Request Body - **senders** (array) - Required - An array of sender objects to be ordered. - **phone_region** (string) - Optional - Default value `US`. Possible values: `US` or `GB`. - **plan_id** (string) - Required - Payment plan ID. - **zip_code** (string) - Optional - Only for `US` phone numbers. - **sms_and_call** (boolean) - Optional. - **forwarding_to_phone_number** (string) - Optional - Requires `"sms_and_call": true`. Phone number region should support call forwarding. - **rcs** (boolean) - Optional. - **whatsapp** (boolean) - Optional. - **init_conversations** (boolean) - Optional - Enables the feature to send messages first. - **name** (string) - Required - Name part (for email senders). - **domain** (string) - Required - Sender domain (for email senders). - **test** (boolean) - Optional - Include `"test": true` to test the request without actual ordering. ### Request Example ```json { "senders": [ { "phone_region": "US", "plan_id": "string", "zip_code": "10001", "sms_and_call": true, "forwarding_to_phone_number": "+13231112233", "rcs": true }, { "name": "sender2", "domain": "example.com", "plan_id": "string" } ] } ``` ### Response #### Success Response (200) - **count** (integer) - The number of sender names processed. - **items** (array) - An array of objects, each representing an ordered sender name. - **id** (string) - The unique identifier for the sender name. - **phone_region** (string) - The region of the phone number. - **zip_code** (string) - The zip code associated with the phone number. - **sms_and_call** (boolean) - Indicates if SMS and call features are enabled. - **forwarding_to_phone_number** (string) - The phone number for call forwarding. - **rcs** (boolean) - Indicates if RCS is enabled. - **name** (string) - The name part of the email sender. #### Response Example ```json { "count": 1, "items": [ { "id": "f41c27d2-1251-488f-bf10-267945199555", "phone_region": "US", "zip_code": "10001", "sms_and_call": true, "forwarding_to_phone_number": "+13231112233", "rcs": true } ] } ``` ### Test purchase To test this request, you need to include the `"test": true` parameter in the JSON payload. Once the request is accepted, you will receive a webhook within a few minutes confirming the activation of the sender name. In the production environment, you should receive this webhook within a few hours. For this test flow, you need to have at least one active paid service. These APIs do not work with the sandbox environment. ``` -------------------------------- ### Create New Organization API Source: https://docs.loopmessage.com/dashboard/organizations/new Use this method to create a new organization. This API requires an API Key from the Default organization and active paid services. It does not work with the sandbox environment. ```APIDOC ## POST /api/v1/organizations/new/ ### Description Creates a new organization within the LoopMessage platform. ### Method POST ### Endpoint https://a.loopmessage.com/api/v1/organizations/new/ ### Parameters #### Request Body - **name** (String) - Required - New name for the organization. - **website** (String) - Required - Your organization or product webpage. - **support_url** (String) - Required - A webpage where your users can get support related to your services. - **country** (String) - Required - Your organization country. Value should be in ISO-2 format (e.g., US, CA, GB). - **webhook_url** (String) - Optional - URL that will be used to fire webhooks related to this organization. This field is required to receive an API key in the response. - **webhook_header** (String) - Optional - Value that will be included in the webhooks `Authorization` header. ### Request Example ```json { "name": "String", "website": "https://site.com/", "support_url": "https://site.com/contact-us/", "country": "US", "webhook_url": "https://site.com/webhook/", "webhook_header": "secure string" } ``` ### Response #### Success Response (200) - **id** (String) - UUID String representing the organization's ID. - **name** (String) - The name of the created organization. - **api_key** (String) - The API key generated for the organization (if webhook_url is provided). - **create_date** (String) - The creation date of the organization in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). #### Response Example ```json { "id": "UUID String", "name": "String", "api_key": "String", "create_date": "2025-01-01T23:59:59Z" } ``` #### Error Response (400) - **code** (Number) - Error code. - **success** (Boolean) - Indicates if the request was successful (false for errors). - **message** (String) - Description of the error. #### Error Response Example ```json { "code": 100, "success": false, "message": "error description" } ``` ``` -------------------------------- ### Webhook Registration and Processing Source: https://docs.loopmessage.com/imessage-conversation-api/webhooks Learn how to set up webhook URLs and headers for your organization to receive event notifications. Our server sends POST requests with JSON payloads. Ensure your server responds with a 200 status code within 15 seconds to avoid retries. Processing should be deferred until after a successful response. ```APIDOC ## Webhook Processing Guidelines ### Description Our server sends `POST` requests to your registered webhook URL when an event occurs. The request body will contain a `JSON` representation of the notification. ### Response Requirements - Your server must return a **200 status code** to indicate successful receipt. - Any other status code will be treated as a failure. - If your service does not respond within `15 seconds`, the connection will be terminated, and the webhook will be rescheduled for retry. - It is highly recommended to defer processing of the event until after returning a `200` status code. ### Retry Mechanism - Our server will retry failed notifications up to 30 times. - The retry intervals increase over time: first 10 retries every 30 seconds, the next 10 every 3 minutes, and the final 10 every 15 minutes. ### Configuration - For each organization, you can specify separate webhook URLs and headers for different events. ``` -------------------------------- ### GET /api/v1/sender/{id}/ Source: https://docs.loopmessage.com/dashboard/senders/manage-sener-name Retrieves a list of sender names associated with a specific organization ID. ```APIDOC ## GET /api/v1/sender/{id}/ ### Description Use this method to get a list of sender names related to a specific organization. ### Method GET ### Endpoint https://a.loopmessage.com/api/v1/sender/{id}/ ### Headers - **Authorization** (String) - API Key. Required. - **Content-Type** (String) - application/json ### Parameters #### Path Parameters - **id** (String) - Required - ID that you received after a successful request #### Query Parameters - **sort_by** (String) - Optional - Sorting order for results. Possible values: asc (ascending) or desc (default). - **page** (Integer) - Optional - The page number to retrieve. Default is 1. - **per_page** (Integer) - Optional - Number of webhook records per page. Default is 20. ### Response #### Success Response (200) - **id** (string) - **name** (string) - **status** (enum string) - **create_date** (string) - ISO 8601 format date-time - **imessage_link** (URL string) ### Response Example ```json { "id": "string", "name": "string", "status": "enum string", "create_date": "2025-01-27T22:23:51Z", "imessage_link": "URL string" } ``` ``` -------------------------------- ### GET /v1/message/status/{id}/ Source: https://docs.loopmessage.com/imessage-conversation-api/statuses Retrieve the current status of a message using its unique message ID. ```APIDOC ## GET /v1/message/status/{id}/ ### Description Check the status of an individual message based on the message ID received after a successful request. ### Method GET ### Endpoint https://a.loopmessage.com/v1/message/status/{id}/ ### Parameters #### Path Parameters - **id** (String) - Required - ID that you received after a successful request ### Response #### Success Response (200) - **message_id** (String) - The unique ID of the message - **status** (String) - Current status (processing, failed, delivered, unknown) - **contact** (String) - The recipient contact number - **text** (String) - The message content - **error_code** (Integer) - Optional error code if sending was unsuccessful - **last_update** (String) - Timestamp of the last status update #### Response Example { "message_id": "2BC4FD6A-CE49-439F-81DF-E895C09CA49C", "status": "processing", "contact": "+13231112233", "text": "text", "error_code": 100, "last_update": "2021-12-31T23:59:59.809Z" } ```