v1

latestOpenAPI 3.0.02026-07-24311994.6 KB
Company Management

Set Company Webhook

Set or clear the webhook configuration for an existing company. Send webhook: null to clear it; otherwise webhook.url and webhook.token are both required.

If the authenticated user belongs to an organization with synced_data: true, only the user with organization.role: "owner" can call this endpoint. Other members receive 403 Forbidden.

put/companies/{companyId}/webhook

Path parameters

companyIdstring required
Example:65f0a1b2c3d4e5f6a7b8c9d0

Unique identifier of the target company

Request body

Example request

{
  "webhook": {
    "url": "https://example.com/webhooks/acme",
    "token": "11111111-2222-3333-4444-555555555555",
    "auth_header": "Authorization"
  }
}

Response

Updated list of companies for the authenticated user

Example response

{
  "companies": [
    {
      "_id": "65f0a1b2c3d4e5f6a7b8c9d0",
      "name": "Acme Corp",
      "data": {
        "domains": [
          "acme.com"
        ],
        "apks": [
          "com.acme.app"
        ],
        "external_domains": [
          "vendor.com"
        ],
        "webhook": {
          "url": "https://example.com/webhooks/acme",
          "token": "11111111-2222-3333-4444-555555555555",
          "auth_header": "Authorization"
        }
      }
    }
  ]
}