AttendBeacon
Arbeitsbereich öffnen

API-Referenz

Webhooks

Webhook endpoints, their deliveries and the event types they can receive.

List webhook event types

GET/webhooks/event-types

Lists every event type a webhook can receive, with what it means, the scopes a subscription to it needs, its payload's JSON schema and an example.

Scopes
webhooks:read

    Antworten

    • 200 The types. WebhookEventTypeList
      Felder
      • dataWebhookEventType[]

        The types.

        Felder anzeigen
        • typestring

          The type: attendee.registered and the others.

        • summarystring oder null

          In a few words.

        • descriptionstring oder null

          When it is sent and what it carries.

        • scopesstring[]

          The scopes a key needs to subscribe to it through /hooks.

        • schemaobject

          The JSON schema of the signed body: { type, timestamp, data }.

        • exampleobject

          An example of the signed body.

    • 401 invalidKey, keyExpired, keyRevoked.
    • 403 missingScope.
    • 429 rateLimited.

    Ablehnungen

    invalidKey keyExpired keyRevoked rateLimited missingScope

    Anfrage

    curl "https://attendbeacon.com/api/v1/webhooks/event-types" \
      -H "Authorization: Bearer $ATTENDBEACON_KEY"
    401 invalidKey, keyExpired, keyRevoked.
    JSON
    {
      "type": "https://attendbeacon.com/developers/errors#invalidKey",
      "title": "No working API key",
      "status": 401,
      "detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
      "instance": "/api/v1/webhooks/event-types",
      "code": "invalidKey",
      "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
      "error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
    }

    List webhook endpoints

    GET/webhooks

    Lists the workspace's webhook endpoints. Their secrets are never shown, and an address's query is hidden.

    Scopes
    webhooks:read

      Antworten

      • 200 The endpoints. WebhookList
        Felder
        • dataWebhook[]

          The endpoints.

          Felder anzeigen
          • webhookIdstring (uuid)

            The endpoint's id.

          • urlstring

            Its address, with any query hidden.

          • hoststring

            Its host.

          • descriptionstring oder null

            What it is for.

          • eventTypesstring[]

            What it receives.

          • activeboolean

            Whether it is switched on.

          • disabledReasonstring oder null

            Why it stopped by itself: gone (it answered 410).

          • lastStatusstring oder null

            How its last delivery went: succeeded or failed.

          • lastDeliveryUtcstring (date-time) oder null

            When it was last called, in UTC.

          • createdUtcstring (date-time)

            When it was added, in UTC.

          • createdBystring

            Who added it.

        • mostinteger (int32)

          The most a workspace may have.

      • 401 invalidKey, keyExpired, keyRevoked.
      • 403 missingScope.
      • 429 rateLimited.

      Ablehnungen

      invalidKey keyExpired keyRevoked rateLimited missingScope

      Anfrage

      curl "https://attendbeacon.com/api/v1/webhooks" \
        -H "Authorization: Bearer $ATTENDBEACON_KEY"
      401 invalidKey, keyExpired, keyRevoked.
      JSON
      {
        "type": "https://attendbeacon.com/developers/errors#invalidKey",
        "title": "No working API key",
        "status": 401,
        "detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
        "instance": "/api/v1/webhooks",
        "code": "invalidKey",
        "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
        "error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
      }

      Add a webhook endpoint Ändert Daten

      POST/webhooks

      Adds a webhook endpoint for some event types. Its signing secret is in this answer and nowhere else afterwards, so an Idempotency-Key is not honoured here: the answer is never kept. The key needs the scopes of what the event types deliver (GET /webhooks/event-types), and the endpoint is switched off when the key is revoked or expires.

      Scopes
      webhooks:write
      • Senden Sie einen Idempotency-Key, damit Wiederholungen sicher sind. →

      Body NewWebhook

      The endpoint.

      • urlstring (uri)

        The https address to call. A public address only.

      • descriptionstring oder null

        What it is for, at most 200 characters.

      • eventTypesstring[]

        What it receives: attendee.registered and the others (GET /webhooks/event-types).

      • activeboolean

        Switched on; a new one starts on.

      Antworten

      • 201 The endpoint and its secret. WebhookCreated
        Felder
        • webhookWebhook

          A webhook endpoint: an address told what happens, signed the Standard Webhooks way.

          Felder anzeigen
          • webhookIdstring (uuid)

            The endpoint's id.

          • urlstring

            Its address, with any query hidden.

          • hoststring

            Its host.

          • descriptionstring oder null

            What it is for.

          • eventTypesstring[]

            What it receives.

          • activeboolean

            Whether it is switched on.

          • disabledReasonstring oder null

            Why it stopped by itself: gone (it answered 410).

          • lastStatusstring oder null

            How its last delivery went: succeeded or failed.

          • lastDeliveryUtcstring (date-time) oder null

            When it was last called, in UTC.

          • createdUtcstring (date-time)

            When it was added, in UTC.

          • createdBystring

            Who added it.

        • secretstring

          The signing secret, whsec_ and Base64. Keep it: it is never shown again; POST /webhooks/{webhookId}/secret makes a new one.

      • 400 invalidBody, invalidRequest, tooManyEndpoints.
      • 401 invalidKey, keyExpired, keyRevoked.
      • 403 missingScope, demoWorkspace.
      • 429 rateLimited.
      • 503 webhooksUnavailable.

      Ablehnungen

      invalidKey keyExpired keyRevoked rateLimited missingScope invalidBody invalidRequest demoWorkspace tooManyEndpoints webhooksUnavailable

      Anfrage

      curl -X POST "https://attendbeacon.com/api/v1/webhooks" \
        -H "Authorization: Bearer $ATTENDBEACON_KEY" \
        -H "Idempotency-Key: $(uuidgen)" \
        -H "Content-Type: application/json" \
        -d '{
        "url": "https://hooks.example.com/attendbeacon",
        "description": "CRM sync",
        "eventTypes": [
          "attendee.registered",
          "attendee.cancelled",
          "attendee.erased"
        ]
      }'
      400 invalidBody, invalidRequest, tooManyEndpoints.
      JSON
      {
        "type": "https://attendbeacon.com/developers/errors#invalidBody",
        "title": "The body is not readable",
        "status": 400,
        "detail": "The body is not JSON, or a field has the wrong type.",
        "instance": "/api/v1/webhooks",
        "code": "invalidBody",
        "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
        "error": "The body is not JSON, or a field has the wrong type."
      }

      Get a webhook endpoint

      GET/webhooks/{webhookId}

      Gets one webhook endpoint, without its secret.

      Scopes
      webhooks:read
      • Antwortet mit einem ETag; senden Sie If-None-Match, um sich einen Download zu sparen.

      Parameter

      Pfad

      • webhookIdstring (uuid)erforderlich

        The webhook endpoint's id.

      Header

      • If-None-Matchstring

        The ETag you have: when it is still current the answer is 304 with no body.

      Antworten

      • 200 The endpoint. Webhook
        Felder
        • webhookIdstring (uuid)

          The endpoint's id.

        • urlstring

          Its address, with any query hidden.

        • hoststring

          Its host.

        • descriptionstring oder null

          What it is for.

        • eventTypesstring[]

          What it receives.

        • activeboolean

          Whether it is switched on.

        • disabledReasonstring oder null

          Why it stopped by itself: gone (it answered 410).

        • lastStatusstring oder null

          How its last delivery went: succeeded or failed.

        • lastDeliveryUtcstring (date-time) oder null

          When it was last called, in UTC.

        • createdUtcstring (date-time)

          When it was added, in UTC.

        • createdBystring

          Who added it.

      • 304 Not modified: If-None-Match named the representation as it is.
      • 401 invalidKey, keyExpired, keyRevoked.
      • 403 missingScope.
      • 404 notFound.
      • 429 rateLimited.

      Ablehnungen

      invalidKey keyExpired keyRevoked rateLimited missingScope notFound

      Anfrage

      curl "https://attendbeacon.com/api/v1/webhooks/2c8e4a6f-1b3d-4e5a-9c7b-0d2f4a6c8e1b" \
        -H "Authorization: Bearer $ATTENDBEACON_KEY"
      401 invalidKey, keyExpired, keyRevoked.
      JSON
      {
        "type": "https://attendbeacon.com/developers/errors#invalidKey",
        "title": "No working API key",
        "status": 401,
        "detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
        "instance": "/api/v1/webhooks/{webhookId}",
        "code": "invalidKey",
        "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
        "error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
      }

      Change a webhook endpoint Ändert Daten

      PATCH/webhooks/{webhookId}

      Changes an endpoint's address, description, event types, or switches it on or off. A field left out stays as it is. A new address or new event types need the scopes of everything the endpoint will then receive.

      Scopes
      webhooks:write
      • Senden Sie If-Match mit dem gelesenen ETag, damit eine zwischenzeitliche Änderung nicht überschrieben wird.

      Parameter

      Pfad

      • webhookIdstring (uuid)erforderlich

        The webhook endpoint's id.

      Header

      • If-Matchstring

        The ETag you read, so a change made since is refused (412) rather than overwritten.

      Body NewWebhook

      The fields to change.

      • urlstring (uri)

        The https address to call. A public address only.

      • descriptionstring oder null

        What it is for, at most 200 characters.

      • eventTypesstring[]

        What it receives: attendee.registered and the others (GET /webhooks/event-types).

      • activeboolean

        Switched on; a new one starts on.

      Antworten

      • 200 The endpoint as it is now. Webhook
        Felder
        • webhookIdstring (uuid)

          The endpoint's id.

        • urlstring

          Its address, with any query hidden.

        • hoststring

          Its host.

        • descriptionstring oder null

          What it is for.

        • eventTypesstring[]

          What it receives.

        • activeboolean

          Whether it is switched on.

        • disabledReasonstring oder null

          Why it stopped by itself: gone (it answered 410).

        • lastStatusstring oder null

          How its last delivery went: succeeded or failed.

        • lastDeliveryUtcstring (date-time) oder null

          When it was last called, in UTC.

        • createdUtcstring (date-time)

          When it was added, in UTC.

        • createdBystring

          Who added it.

      • 400 invalidBody, invalidRequest.
      • 401 invalidKey, keyExpired, keyRevoked.
      • 403 missingScope, demoWorkspace.
      • 404 notFound.
      • 412 preconditionFailed.
      • 429 rateLimited.

      Ablehnungen

      invalidKey keyExpired keyRevoked rateLimited missingScope notFound invalidBody invalidRequest demoWorkspace preconditionFailed

      Anfrage

      curl -X PATCH "https://attendbeacon.com/api/v1/webhooks/2c8e4a6f-1b3d-4e5a-9c7b-0d2f4a6c8e1b" \
        -H "Authorization: Bearer $ATTENDBEACON_KEY" \
        -H "If-Match: $ETAG" \
        -H "Content-Type: application/json" \
        -d '{
        "active": false
      }'
      400 invalidBody, invalidRequest.
      JSON
      {
        "type": "https://attendbeacon.com/developers/errors#invalidBody",
        "title": "The body is not readable",
        "status": 400,
        "detail": "The body is not JSON, or a field has the wrong type.",
        "instance": "/api/v1/webhooks/{webhookId}",
        "code": "invalidBody",
        "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
        "error": "The body is not JSON, or a field has the wrong type."
      }

      Remove a webhook endpoint Ändert Daten

      DELETE/webhooks/{webhookId}

      Removes an endpoint and its secret. Nothing more is sent to it.

      Scopes
      webhooks:write

        Parameter

        Pfad

        • webhookIdstring (uuid)erforderlich

          The webhook endpoint's id.

        Antworten

        • 204 Removed.
        • 401 invalidKey, keyExpired, keyRevoked.
        • 403 missingScope, demoWorkspace.
        • 404 notFound.
        • 429 rateLimited.

        Ablehnungen

        invalidKey keyExpired keyRevoked rateLimited missingScope notFound demoWorkspace

        Anfrage

        curl -X DELETE "https://attendbeacon.com/api/v1/webhooks/2c8e4a6f-1b3d-4e5a-9c7b-0d2f4a6c8e1b" \
          -H "Authorization: Bearer $ATTENDBEACON_KEY"
        401 invalidKey, keyExpired, keyRevoked.
        JSON
        {
          "type": "https://attendbeacon.com/developers/errors#invalidKey",
          "title": "No working API key",
          "status": 401,
          "detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
          "instance": "/api/v1/webhooks/{webhookId}",
          "code": "invalidKey",
          "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
          "error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
        }

        Make a new signing secret Ändert Daten

        POST/webhooks/{webhookId}/secret

        Replaces an endpoint's signing secret. The old one stops working at once: there is no overlap, because a secret that leaked should not be trusted any longer. No Idempotency-Key: the answer, a secret, is never kept.

        Scopes
        webhooks:write
        • Senden Sie einen Idempotency-Key, damit Wiederholungen sicher sind. →

        Parameter

        Pfad

        • webhookIdstring (uuid)erforderlich

          The webhook endpoint's id.

        Antworten

        • 200 The new secret, shown this once. WebhookSecret
          Felder
          • webhookIdstring (uuid)

            The endpoint's id.

          • secretstring

            The new secret, shown this once.

        • 401 invalidKey, keyExpired, keyRevoked.
        • 403 missingScope, demoWorkspace.
        • 404 notFound.
        • 429 rateLimited.
        • 503 webhooksUnavailable.

        Ablehnungen

        invalidKey keyExpired keyRevoked rateLimited missingScope notFound demoWorkspace webhooksUnavailable

        Anfrage

        curl -X POST "https://attendbeacon.com/api/v1/webhooks/2c8e4a6f-1b3d-4e5a-9c7b-0d2f4a6c8e1b/secret" \
          -H "Authorization: Bearer $ATTENDBEACON_KEY" \
          -H "Idempotency-Key: $(uuidgen)"
        401 invalidKey, keyExpired, keyRevoked.
        JSON
        {
          "type": "https://attendbeacon.com/developers/errors#invalidKey",
          "title": "No working API key",
          "status": 401,
          "detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
          "instance": "/api/v1/webhooks/{webhookId}/secret",
          "code": "invalidKey",
          "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
          "error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
        }

        Send a test message Ändert Daten

        POST/webhooks/{webhookId}/test

        Sends a signed webhook.test message to the endpoint now, while you wait, and says what it answered. A switched-off endpoint can be tested too.

        Scopes
        webhooks:write
        • Senden Sie einen Idempotency-Key, damit Wiederholungen sicher sind. →

        Parameter

        Pfad

        • webhookIdstring (uuid)erforderlich

          The webhook endpoint's id.

        Header

        • Idempotency-Keystring

          A key of your own, such as a UUID, so a retry after a lost connection is answered with the first answer instead of doing it twice. Kept 24 hours.

        Antworten

        • 200 What came of it. WebhookTest
          Felder
          • okboolean

            Whether the endpoint answered 2xx.

          • statusinteger (int32) oder null

            The status it answered.

          • errorstring oder null

            What went wrong.

          • durationMsinteger (int32) oder null

            How long it took.

          • deliveryIdstring (uuid)

            The delivery, in the endpoint's log.

        • 400 invalidIdempotencyKey.
        • 401 invalidKey, keyExpired, keyRevoked.
        • 403 missingScope.
        • 404 notFound.
        • 409 idempotencyKeyInUse.
        • 422 idempotencyKeyReused.
        • 429 rateLimited.

        Ablehnungen

        invalidKey keyExpired keyRevoked rateLimited missingScope notFound idempotencyKeyInUse idempotencyKeyReused invalidIdempotencyKey

        Anfrage

        curl -X POST "https://attendbeacon.com/api/v1/webhooks/2c8e4a6f-1b3d-4e5a-9c7b-0d2f4a6c8e1b/test" \
          -H "Authorization: Bearer $ATTENDBEACON_KEY" \
          -H "Idempotency-Key: $(uuidgen)"
        400 invalidIdempotencyKey.
        JSON
        {
          "type": "https://attendbeacon.com/developers/errors#invalidIdempotencyKey",
          "title": "Idempotency-Key is not valid",
          "status": 400,
          "detail": "An Idempotency-Key is 1 to 255 visible ASCII characters; a UUID is a good one.",
          "instance": "/api/v1/webhooks/{webhookId}/test",
          "code": "invalidIdempotencyKey",
          "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
          "error": "An Idempotency-Key is 1 to 255 visible ASCII characters; a UUID is a good one."
        }

        List deliveries

        GET/webhooks/{webhookId}/deliveries

        Lists an endpoint's latest deliveries, newest first: what was sent, how many attempts, what the endpoint answered.

        Scopes
        webhooks:read

          Parameter

          Pfad

          • webhookIdstring (uuid)erforderlich

            The webhook endpoint's id.

          Query

          • limitinteger (int32)

            How many, up to 200.

            Standard: 50

          Antworten

          • 200 The deliveries. WebhookDeliveryList
            Felder
            • dataWebhookDelivery[]

              The deliveries.

              Felder anzeigen
              • deliveryIdstring (uuid)

                The delivery's id.

              • messageIdstring

                The message's webhook-id: msg_ and its id, the same on every attempt.

              • eventTypestring

                Its type.

              • statusstring

                Pending, claimed, succeeded, failed or cancelled.

              • testboolean

                Whether it was a test.

              • attemptsinteger (int32)

                Attempts so far.

              • nextAttemptUtcstring (date-time) oder null

                When it is tried again, in UTC.

              • statusCodeinteger (int32) oder null

                The last status the endpoint answered.

              • errorstring oder null

                The last error.

              • durationMsinteger (int32) oder null

                How long the last attempt took.

              • createdUtcstring (date-time)

                When it was queued, in UTC.

              • completedUtcstring (date-time) oder null

                When it ended, in UTC.

          • 401 invalidKey, keyExpired, keyRevoked.
          • 403 missingScope.
          • 404 notFound.
          • 429 rateLimited.

          Ablehnungen

          invalidKey keyExpired keyRevoked rateLimited missingScope notFound

          Anfrage

          curl "https://attendbeacon.com/api/v1/webhooks/2c8e4a6f-1b3d-4e5a-9c7b-0d2f4a6c8e1b/deliveries?limit=2" \
            -H "Authorization: Bearer $ATTENDBEACON_KEY"
          401 invalidKey, keyExpired, keyRevoked.
          JSON
          {
            "type": "https://attendbeacon.com/developers/errors#invalidKey",
            "title": "No working API key",
            "status": 401,
            "detail": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key.",
            "instance": "/api/v1/webhooks/{webhookId}/deliveries",
            "code": "invalidKey",
            "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
            "error": "No key was sent, or it is not one this platform made. Send it as Authorization: Bearer abk_... or in X-Api-Key."
          }

          Die Anleitungen und diese Website sind in Ihrer Sprache. Die Beschreibungen in der API-Referenz selbst sind auf Englisch, so wie die API selbst spricht.