Remove a webhook subscription target

Stop receiving events for an organization or office.

Use removeWebhookSubscriptionTarget to stop receiving events for an organization or office. A subscription must keep at least one target.

Required scope: api-management

Request

mutation removeWebhookSubscriptionTarget($input: RemoveWebhookTargetInput!) {
  removeWebhookSubscriptionTarget(input: $input) {
    ... on WebhookSubscription {
      id
      endpoint
      eventTypes
    }
    ... on ValidationErrors {
      errors {
        message
      }
    }
  }
}

Variables

{
  "input": {
    "webhookSubscriptionId": "318",
    "target": {
      "organizationKey": "3f2b8c1e9a4d4e7f8b6c5d4e3f2a1b0c",
      "officeKeys": [
        "2c4e6a8b1d3f4b5a8c7e9f0a1b2c3d4e"
      ]
    }
  }
}

Response

{
  "data": {
    "removeWebhookSubscriptionTarget": {
      "id": "318",
      "endpoint": "https://integrations.example.com/first-aml/webhooks",
      "eventTypes": [
        "CASE_STATUS_UPDATED"
      ]
    }
  }
}