{
  "info": {
    "name": "BotPulsar API",
    "description": "Every endpoint an API key can call. Set `api_key` and `workspace_id` in the collection variables, then run the requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.botpulsar.com"
    },
    {
      "key": "api_key",
      "value": "smk_your_prefix_your_secret"
    },
    {
      "key": "workspace_id",
      "value": "YOUR_WORKSPACE_ID"
    },
    {
      "key": "id",
      "value": "YOUR_ID"
    },
    {
      "key": "message_id",
      "value": "YOUR_MESSAGE_ID"
    }
  ],
  "item": [
    {
      "name": "Contacts",
      "item": [
        {
          "name": "List contacts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/contacts/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "contacts"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": "Page number (50 per page).",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "description": "Match on name, phone number or email.",
                  "disabled": true
                },
                {
                  "key": "tag_id",
                  "value": "",
                  "description": "Only contacts carrying this tag.",
                  "disabled": true
                },
                {
                  "key": "owner_id",
                  "value": "",
                  "description": "Only contacts owned by this teammate.",
                  "disabled": true
                },
                {
                  "key": "team_id",
                  "value": "",
                  "description": "Only contacts assigned to this team.",
                  "disabled": true
                }
              ]
            },
            "description": "Paginated contacts, newest first.\n\nScope: contacts:read"
          }
        },
        {
          "name": "Create or find a contact",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/contacts/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "contacts"
              ],
              "query": []
            },
            "description": "Idempotent on the phone number: `201` when a contact is created, `200` with the existing record when the number is already in the workspace. A duplicate is returned untouched \u2014 your name, email, tags and fields are not applied to it; use the update call for that.\n\nScope: contacts:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"phone_e164\": \"+919812345678\",\n  \"display_name\": \"Ada Lovelace\",\n  \"email\": \"ada@example.com\",\n  \"custom_attributes\": {\n    \"admission_no\": \"A-1042\",\n    \"class\": \"8-B\"\n  },\n  \"tag_names\": [\n    \"parents\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a contact",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/contacts/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "contacts",
                "{{id}}"
              ],
              "query": []
            },
            "description": "One contact, including tags, consent and active suppressions.\n\nScope: contacts:read"
          }
        },
        {
          "name": "Update a contact",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/contacts/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "contacts",
                "{{id}}"
              ],
              "query": []
            },
            "description": "Send only the fields you want to change. `tag_names` and `initial_fields` are create-only and are refused here.\n\nScope: contacts:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"display_name\": \"Ada King\",\n  \"custom_attributes\": {\n    \"class\": \"9-A\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Conversations",
      "item": [
        {
          "name": "List conversations",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/conversations/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "conversations"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": "Page number.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "",
                  "description": "`open`, `pending`, `snoozed`, `closed` or `blocked`.",
                  "disabled": true
                },
                {
                  "key": "priority",
                  "value": "",
                  "description": "`low`, `normal`, `high` or `urgent`.",
                  "disabled": true
                },
                {
                  "key": "assigned_to",
                  "value": "",
                  "description": "Teammate (membership) id.",
                  "disabled": true
                },
                {
                  "key": "phone_number_id",
                  "value": "",
                  "description": "Only conversations on this WhatsApp number.",
                  "disabled": true
                },
                {
                  "key": "search",
                  "value": "",
                  "description": "Match on contact name or number.",
                  "disabled": true
                }
              ]
            },
            "description": "Paginated, most recently active first.\n\nScope: conversations:read"
          }
        },
        {
          "name": "Start a conversation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/conversations/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "conversations"
              ],
              "query": []
            },
            "description": "Idempotent: the same contact on the same channel returns the existing open conversation instead of opening a second one.\n\nScope: conversations:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"contact_id\": \"3f9c7e2a-1b4d-4e8a-9c3f-2a1b4d4e8a9c\",\n  \"channel_account_id\": \"YOUR_CHANNEL_ID\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a conversation",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/conversations/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "conversations",
                "{{id}}"
              ],
              "query": []
            },
            "description": "Includes `messaging_window` \u2014 whether free-form text is currently allowed or a template is required.\n\nScope: conversations:read"
          }
        }
      ]
    },
    {
      "name": "Messages",
      "item": [
        {
          "name": "List messages in a conversation",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/conversations/{{id}}/messages/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "conversations",
                "{{id}}",
                "messages"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": "Page number.",
                  "disabled": true
                }
              ]
            },
            "description": "Paginated message history, inbound and outbound.\n\nScope: messages:read"
          }
        },
        {
          "name": "Send a text message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/conversations/{{id}}/messages/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "conversations",
                "{{id}}",
                "messages"
              ],
              "query": []
            },
            "description": "Free-form text. Only valid inside the 24-hour window.\n\nScope: messages:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"content_type\": \"text\",\n  \"text\": \"Hi Ada, your order has shipped!\",\n  \"client_message_id\": \"0b5c1a3e-8f6d-4a3e-9c2a-1d9b7f4e6a10\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send a template message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/conversations/{{id}}/messages/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "conversations",
                "{{id}}",
                "messages"
              ],
              "query": []
            },
            "description": "Required to start a conversation or after the window closes. Get `template_id` from the templates endpoint; only `approved` templates can be sent.\n\nScope: messages:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"content_type\": \"template\",\n  \"template_id\": \"YOUR_APPROVED_TEMPLATE_ID\",\n  \"template_parameters\": {\n    \"1\": \"Ada\",\n    \"2\": \"12045\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send an image, video, audio or document",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/conversations/{{id}}/messages/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "conversations",
                "{{id}}",
                "messages"
              ],
              "query": []
            },
            "description": "`content_type` is `image`, `video`, `audio`, `document`, `voice_note` or `sticker`. Upload the file in Dashboard \u2192 Media library first and pass its id \u2014 uploading through the API (`media:write`) is not open to API keys yet.\n\nScope: messages:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"content_type\": \"document\",\n  \"media_asset_id\": \"YOUR_MEDIA_ASSET_ID\",\n  \"text\": \"Fee receipt\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Templates",
      "item": [
        {
          "name": "List templates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/whatsapp/templates/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "whatsapp",
                "templates"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": "Page number.",
                  "disabled": true
                }
              ]
            },
            "description": "Every template on the workspace, with its review status.\n\nScope: templates:read"
          }
        },
        {
          "name": "Get a template",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/whatsapp/templates/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "whatsapp",
                "templates",
                "{{id}}"
              ],
              "query": []
            },
            "description": "Full template including its components and versions.\n\nScope: templates:read"
          }
        },
        {
          "name": "Template variables",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/whatsapp/templates/{{id}}/variable-suggestions/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "whatsapp",
                "templates",
                "{{id}}",
                "variable-suggestions"
              ],
              "query": []
            },
            "description": "The variables a template expects, its example values, saved defaults and suggested contact fields to fill each one from.\n\nScope: templates:read"
          }
        }
      ]
    },
    {
      "name": "API campaigns",
      "item": [
        {
          "name": "Create an API campaign",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/campaigns/api-campaigns/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "campaigns",
                "api-campaigns"
              ],
              "query": []
            },
            "description": "Names must be unique in the workspace.\n\nScope: campaigns:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"fee-reminder\",\n  \"template_id\": \"YOUR_APPROVED_TEMPLATE_ID\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send through an API campaign",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/campaigns/api-campaigns/send/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "campaigns",
                "api-campaigns",
                "send"
              ],
              "query": []
            },
            "description": "Creates or updates the contact, then sends the campaign's template. Also accepts `campaignName`, `userName` and `templateParams`, so an integration written for AiSensy only needs a new URL and key.\n\nScope: messages:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"campaign_name\": \"fee-reminder\",\n  \"destination\": \"+919812345678\",\n  \"user_name\": \"Ada Lovelace\",\n  \"template_params\": [\n    \"Ada\",\n    \"\u20b94,500\",\n    \"15 Oct\"\n  ],\n  \"tags\": [\n    \"fee-due\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List API campaigns",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/campaigns/api-campaigns/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "campaigns",
                "api-campaigns"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": "Page number.",
                  "disabled": true
                }
              ]
            },
            "description": "Each campaign carries live `metrics` (sent, delivered, read, failed).\n\nScope: campaigns:read"
          }
        },
        {
          "name": "Get an API campaign",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/campaigns/api-campaigns/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "campaigns",
                "api-campaigns",
                "{{id}}"
              ],
              "query": []
            },
            "description": "One campaign with its metrics.\n\nScope: campaigns:read"
          }
        },
        {
          "name": "Update or pause an API campaign",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/campaigns/api-campaigns/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "campaigns",
                "api-campaigns",
                "{{id}}"
              ],
              "query": []
            },
            "description": "Change the template, number or media, or set `is_active` to `false` to pause.\n\nScope: campaigns:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"is_active\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List a campaign's sends",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/campaigns/api-campaigns/{{id}}/sends/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "campaigns",
                "api-campaigns",
                "{{id}}",
                "sends"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "",
                  "description": "Page number.",
                  "disabled": true
                }
              ]
            },
            "description": "One row per message with its status and, when it failed, a readable reason.\n\nScope: campaigns:read"
          }
        }
      ]
    },
    {
      "name": "Automations",
      "item": [
        {
          "name": "Trigger an automation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "order-12045-paid",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/automations/{{id}}/trigger/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "automations",
                "{{id}}",
                "trigger"
              ],
              "query": []
            },
            "description": "Requires an `Idempotency-Key` header (1\u2013120 letters, numbers, `.`, `_`, `:` or `-`). The same key returns `duplicate: true` instead of running twice. The key's creator needs automation-manage permission.\n\nScope: automations:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"event_name\": \"order_paid\",\n  \"contact_id\": \"3f9c7e2a-1b4d-4e8a-9c3f-2a1b4d4e8a9c\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Webhook subscriptions",
      "item": [
        {
          "name": "Create a subscription",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-subscriptions/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-subscriptions"
              ],
              "query": []
            },
            "description": "The signing secret is in this response and **never shown again** \u2014 store it immediately. The URL must be public HTTPS.\n\nScope: webhooks:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"ERP events\",\n  \"endpoint_url\": \"https://erp.example.com/hooks/botpulsar\",\n  \"event_types\": [\n    \"message.received\",\n    \"message.delivery_status.changed\"\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "List subscriptions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-subscriptions/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-subscriptions"
              ],
              "query": []
            },
            "description": "All subscriptions, paginated.\n\nScope: webhooks:read"
          }
        },
        {
          "name": "Get a subscription",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-subscriptions/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-subscriptions",
                "{{id}}"
              ],
              "query": []
            },
            "description": "One subscription (the secret is never included).\n\nScope: webhooks:read"
          }
        },
        {
          "name": "Update or disable a subscription",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-subscriptions/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-subscriptions",
                "{{id}}"
              ],
              "query": []
            },
            "description": "Change the URL or events, or set `is_active` to `false` to pause deliveries.\n\nScope: webhooks:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"is_active\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Rotate the signing secret",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-subscriptions/{{id}}/rotate-secret/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-subscriptions",
                "{{id}}",
                "rotate-secret"
              ],
              "query": []
            },
            "description": "Invalidates the old secret immediately and returns the new one once.\n\nScope: webhooks:write"
          }
        },
        {
          "name": "List deliveries",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-deliveries/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-deliveries"
              ],
              "query": [
                {
                  "key": "subscription",
                  "value": "",
                  "description": "Only deliveries for this subscription.",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "",
                  "description": "Page number.",
                  "disabled": true
                }
              ]
            },
            "description": "Delivery evidence: status (`pending`, `delivering`, `failed`, `delivered`, `dead`), attempts and your endpoint's response code. Records hold hashes, not payload bodies.\n\nScope: webhooks:read"
          }
        },
        {
          "name": "Get a delivery",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-deliveries/{{id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-deliveries",
                "{{id}}"
              ],
              "query": []
            },
            "description": "One delivery with every attempt.\n\nScope: webhooks:read"
          }
        },
        {
          "name": "Replay a delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "X-Tenant-ID",
                "value": "{{workspace_id}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/developer/webhook-deliveries/{{id}}/replay/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "developer",
                "webhook-deliveries",
                "{{id}}",
                "replay"
              ],
              "query": []
            },
            "description": "Re-send a failed or dead-lettered delivery once your endpoint is healthy again.\n\nScope: webhooks:write"
          }
        }
      ]
    },
    {
      "name": "Simple send API",
      "item": [
        {
          "name": "Check the connection",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/partner-api/workspace/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "partner-api",
                "workspace"
              ],
              "query": []
            },
            "description": "Returns the workspace and its connected WhatsApp numbers \u2014 the quickest way to test a key.\n\nScope: messages:read"
          }
        },
        {
          "name": "Send a template message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/partner-api/workspace/messages/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "partner-api",
                "workspace",
                "messages"
              ],
              "query": []
            },
            "description": "Finds or creates the contact and conversation, then sends. `201` for a new message, `200` when `idempotency_key` was already used.\n\nScope: contacts:write + conversations:write + messages:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"+919812345678\",\n  \"template\": {\n    \"name\": \"fee_due\",\n    \"language\": \"en\",\n    \"params\": [\n      \"Ada\",\n      \"\u20b94,500\",\n      \"15 Oct\"\n    ]\n  },\n  \"idempotency_key\": \"fee-due-STU1042-2026-10\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send a text message",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/partner-api/workspace/messages/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "partner-api",
                "workspace",
                "messages"
              ],
              "query": []
            },
            "description": "Free-form text, valid only while the customer's 24-hour window is open.\n\nScope: contacts:write + conversations:write + messages:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"to\": \"+919812345678\",\n  \"text\": \"Thanks \u2014 we received your payment.\",\n  \"idempotency_key\": \"receipt-8841\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get a message's status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/partner-api/workspace/messages/{{message_id}}/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "partner-api",
                "workspace",
                "messages",
                "{{message_id}}"
              ],
              "query": []
            },
            "description": "`delivery_status` moves `queued \u2192 submitted \u2192 sent \u2192 delivered \u2192 read`, or `failed` with an `error`. For an inbound message it also returns `from` and `text` \u2014 `message.received` webhooks carry ids only, so this is how you read the reply.\n\nScope: messages:read"
          }
        },
        {
          "name": "List templates",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/partner-api/workspace/templates/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "partner-api",
                "workspace",
                "templates"
              ],
              "query": []
            },
            "description": "Every template on the workspace's WhatsApp account with its status.\n\nScope: templates:read"
          }
        },
        {
          "name": "Install a template pack",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/partner-api/workspace/templates/deploy-pack/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "partner-api",
                "workspace",
                "templates",
                "deploy-pack"
              ],
              "query": []
            },
            "description": "Creates a ready-made set of templates and submits them to Meta. Safe to re-run \u2014 it resubmits any left in draft by a failed submission.\n\nScope: templates:read + templates:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"pack\": \"edugradup_school\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Connect your app's webhook",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "ApiKey {{api_key}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/partner-api/workspace/webhook/",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "partner-api",
                "workspace",
                "webhook"
              ],
              "query": []
            },
            "description": "Creates (or updates) the workspace's \"Connected app\" subscription and returns its signing secret. Calling it again **rotates** the secret.\n\nScope: webhooks:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://erp.example.com/hooks/botpulsar\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    }
  ]
}