{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argorant-com/json-schema/argorant-com-webhook-schema.json",
  "title": "Webhook",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argorant-com-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Webhook id."
    },
    "url": {
      "type": "string",
      "description": "Where events are sent.",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "description": "Events it receives.",
      "items": {
        "$ref": "#/$defs/WebhookEvent"
      }
    },
    "active": {
      "type": "boolean",
      "description": "Whether it receives events."
    },
    "failure_count": {
      "type": "integer",
      "description": "Failed calls in a row. At 50 the webhook switches itself off."
    },
    "last_error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why the last call failed."
    },
    "last_success_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "When your server last accepted a call.",
      "format": "date-time"
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "When it was created.",
      "format": "date-time"
    }
  },
  "$defs": {
    "WebhookEvent": {
      "type": "string",
      "enum": [
        "export.ready",
        "verification.completed",
        "segment.new_matches",
        "reply.received",
        "reply.positive",
        "email.bounced",
        "email.unsubscribed",
        "campaign.paused",
        "campaign.resumed",
        "list.ready"
      ]
    }
  }
}