Tayl Tayl Public API

Webhooks

React to events such as completions by subscribing an HTTPS endpoint, verifying signatures, and inspecting and retrying deliveries.

Part of Tayl's API docs: requests go to https://tayl.pro with Authorization: Bearer <key>, and Errors explains every error code.

Webhooks tell you about changes as they happen, such as a task becoming overdue or a person joining a group, so you don't have to poll. An organisation admin can manage endpoints in Tayl under Settings > Public API > Webhook endpoints, or a key can with webhooks:manage.

Setting up an endpoint

  1. Run a public HTTPS receiver that can read the exact raw request body.
  2. Create the endpoint with POST /api/v1/webhook-endpoints, subscribing only to the events you need. The key also needs each event's read scope, listed under Events below.
  3. Store the whsec_… signing secret from the response in your receiver's secret store. It's shown only once.

Removing an event from an endpoint also stops its pending and retrying deliveries: they're abandoned rather than sent, and retrying one returns 422 event_unsubscribed.

Deliveries

Each delivery is an HTTPS POST of a JSON envelope that never changes once created:

{
  "id": "event-uuid",
  "type": "completion.created",
  "created_at": "2026-07-16T10:00:00Z",
  "data": {}
}

It carries the headers X-Tayl-Event, X-Tayl-Event-Id, X-Tayl-Delivery, X-Tayl-Timestamp and X-Tayl-Signature. Delivery is at least once and in no particular order, so:

  1. Verify the signature, as below.
  2. Deduplicate on X-Tayl-Event-Id, the envelope's id, in the same transaction that applies the change.
  3. Return any 2xx promptly, once the event is safely stored. Redirects aren't followed.

Verifying signatures

X-Tayl-Signature is t=<unix seconds>,v1=<hex>, where the hex is an HMAC-SHA256 of <timestamp>.<raw body> with the endpoint's secret. Verify it against the raw bytes before parsing, since re-serialised JSON won't match, compare in constant time, and reject timestamps outside your replay window. During a secret rotation the header has one v1 for each valid secret.

Ruby:

require "openssl"

def verify_tayl_webhook(body:, signature_header:, secrets:, now: Time.now.to_i)
  parts = signature_header.to_s.split(",").filter_map { |part| part.strip.split("=", 2) if part.include?("=") }
  timestamp = Integer(parts.find { |key, _| key == "t" }&.last, 10)
  return false if (now - timestamp).abs > 300

  signatures = parts.filter_map { |key, value| value if key == "v1" }
  Array(secrets).any? do |secret|
    expected = OpenSSL::HMAC.hexdigest("SHA256", secret, "#{timestamp}.#{body}")
    signatures.any? do |signature|
      signature.bytesize == expected.bytesize && OpenSSL.fixed_length_secure_compare(signature, expected)
    end
  end
rescue ArgumentError, TypeError
  false
end

JavaScript (Node.js):

const crypto = require("node:crypto")

function verifyTaylWebhook({ body, signatureHeader, secrets, now = Math.floor(Date.now() / 1000) }) {
  const parts = String(signatureHeader || "").split(",").map((part) => part.trim().split("=", 2))
  const timestampPart = parts.find(([key]) => key === "t")
  const timestamp = Number(timestampPart && timestampPart[1])
  if (!Number.isSafeInteger(timestamp) || Math.abs(now - timestamp) > 300) return false

  const signatures = parts.filter(([key, value]) => key === "v1" && /^[0-9a-f]{64}$/.test(value)).map(([, value]) => value)
  return secrets.some((secret) => {
    const expected = crypto.createHmac("sha256", secret).update(String(timestamp)).update(".").update(body).digest()
    return signatures.some((signature) => crypto.timingSafeEqual(Buffer.from(signature, "hex"), expected))
  })
}

Both take the raw body, the X-Tayl-Signature header and a list of secrets: the current one, plus the previous one while rotating. Both enforce a five-minute replay window.

Test a receiver with this fixed vector. The body is the exact compact UTF-8 bytes shown, without a trailing newline.

Rotating the secret

Rotate with POST /api/v1/webhook-endpoints/{id}/rotate-secret, or from the endpoint in Tayl. The response shows the new secret once, and for the next 24 hours deliveries carry a v1 signature for both the new and the previous secret.

  1. Keep the current secret as the receiver's previous one, and add the new secret as current.
  2. Confirm deliveries verify against the new secret.
  3. Remove the previous secret once the 24 hours are up.

Accept a delivery when any v1 matches any secret you hold, and keep checking the timestamp throughout.

Operations

Webhook endpoints

Create and manage signed webhook subscriptions.

List webhook endpoints

GET https://tayl.pro/api/v1/webhook-endpoints · listWebhookEndpoints · Scope webhooks:manage

Lists active and deactivated webhook destinations without exposing current or previous signing secrets.

Parameters

Responses

Example response (200)

{
  "webhook_endpoints": [
    {
      "id": "019cf5b0-7c00-7000-8000-000000000010",
      "url": "https://integrations.example.com/tayl/webhooks",
      "events": [
        "user.created",
        "task.completed"
      ],
      "status": "active",
      "created_by_user_id": "019cf5b0-7c00-7000-8000-000000000002",
      "deactivated_at": null,
      "consecutive_failures": 0,
      "last_success_at": "2026-03-16T10:00:02Z",
      "last_failure_at": null,
      "last_failure_reason": null,
      "created_at": "2026-03-01T09:00:00Z",
      "updated_at": "2026-03-16T10:00:02Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_pages": 1,
    "total_count": 1
  }
}

Create a webhook endpoint

POST https://tayl.pro/api/v1/webhook-endpoints · createWebhookEndpoint · Scope webhooks:manage

Creates an endpoint. The signing_secret is returned exactly once and cannot be retrieved later. Each event also needs its resource's read scope (for example users:read for user.* events).

Body (application/json): WebhookEndpointCreateInput.

Responses

Example request

{
  "url": "https://integrations.example.com/tayl/webhooks",
  "events": [
    "user.created",
    "task.completed"
  ]
}

Get a webhook endpoint

GET https://tayl.pro/api/v1/webhook-endpoints/{id} · getWebhookEndpoint · Scope webhooks:manage

Returns endpoint configuration and delivery health without exposing signing secrets.

Parameters

Responses

Example response (200)

{
  "id": "019cf5b0-7c00-7000-8000-000000000010",
  "url": "https://integrations.example.com/tayl/webhooks",
  "events": [
    "user.created",
    "task.completed"
  ],
  "status": "active",
  "created_by_user_id": "019cf5b0-7c00-7000-8000-000000000002",
  "deactivated_at": null,
  "consecutive_failures": 0,
  "last_success_at": "2026-03-16T10:00:02Z",
  "last_failure_at": null,
  "last_failure_reason": null,
  "created_at": "2026-03-01T09:00:00Z",
  "updated_at": "2026-03-16T10:00:02Z"
}

Update a webhook endpoint

PATCH https://tayl.pro/api/v1/webhook-endpoints/{id} · updateWebhookEndpoint · Scope webhooks:manage

Fields you leave out keep their values. Each event also needs its resource's read scope (for example users:read for user.* events). An update that keeps the existing events, such as a URL change, is checked against those events. Pending and retrying deliveries of a removed event are abandoned rather than sent.

Parameters

Body (application/json): WebhookEndpointUpdateInput.

Responses

Example request

{
  "events": [
    "user.created",
    "user.updated",
    "task.completed"
  ]
}

Deactivate a webhook endpoint

DELETE https://tayl.pro/api/v1/webhook-endpoints/{id} · deactivateWebhookEndpoint · Scope webhooks:manage

Stops new deliveries to the endpoint; calling this more than once is safe.

Parameters

Responses

Reactivate a webhook endpoint

POST https://tayl.pro/api/v1/webhook-endpoints/{id}/reactivate · reactivateWebhookEndpoint · Scope webhooks:manage

Resumes delivery and resets consecutive-failure health for a deactivated endpoint.

Parameters

Responses

Example response (200)

{
  "id": "019cf5b0-7c00-7000-8000-000000000010",
  "url": "https://integrations.example.com/tayl/webhooks",
  "events": [
    "user.created",
    "task.completed"
  ],
  "status": "active",
  "created_by_user_id": "019cf5b0-7c00-7000-8000-000000000002",
  "deactivated_at": null,
  "consecutive_failures": 0,
  "last_success_at": "2026-03-16T10:00:02Z",
  "last_failure_at": null,
  "last_failure_reason": null,
  "created_at": "2026-03-01T09:00:00Z",
  "updated_at": "2026-03-16T10:00:02Z"
}

Rotate a webhook endpoint signing secret

POST https://tayl.pro/api/v1/webhook-endpoints/{id}/rotate-secret · rotateWebhookEndpointSecret · Scope webhooks:manage

Returns the new signing_secret exactly once. The previous secret remains valid during the 24-hour dual-signature grace period.

Parameters

Responses

Example response (200)

{
  "id": "019cf5b0-7c00-7000-8000-000000000010",
  "url": "https://integrations.example.com/tayl/webhooks",
  "events": [
    "user.created",
    "task.completed"
  ],
  "status": "active",
  "created_by_user_id": "019cf5b0-7c00-7000-8000-000000000002",
  "deactivated_at": null,
  "consecutive_failures": 0,
  "last_success_at": "2026-03-16T10:00:02Z",
  "last_failure_at": null,
  "last_failure_reason": null,
  "created_at": "2026-03-01T09:00:00Z",
  "updated_at": "2026-03-16T10:00:02Z",
  "signing_secret": "whsec_lQ8fY2mN7cR4vP9xT6kD3sA1bE5gH0jU"
}

Webhook deliveries

Inspect and retry webhook deliveries.

List webhook deliveries

GET https://tayl.pro/api/v1/webhook-deliveries · listWebhookDeliveries · Scope webhooks:manage

Lists retained delivery records for diagnosing endpoint behavior and locating failed events. Only deliveries of events whose resource the key can read (for example users:read for user.*) are listed.

Parameters

Responses

Example response (200)

{
  "webhook_deliveries": [
    {
      "id": "019cf5b0-7c00-7000-8000-000000000012",
      "webhook_endpoint_id": "019cf5b0-7c00-7000-8000-000000000010",
      "event_type": "user.created",
      "event_id": "019cf5b0-7c00-7000-8000-000000000011",
      "payload": {
        "id": "019cf5b0-7c00-7000-8000-000000000011",
        "type": "user.created",
        "created_at": "2026-03-16T10:00:00Z",
        "data": {
          "id": "019cf5b0-7c00-7000-8000-000000000002",
          "external_id": "usr-1042",
          "email": "alex.chen@example.com",
          "name": "Alex Chen",
          "first_name": "Alex",
          "last_name": "Chen",
          "state": "active",
          "invited_at": "2026-03-10T09:00:00Z",
          "accepted_at": "2026-03-10T09:15:00Z",
          "created_at": "2026-03-10T09:00:00Z",
          "updated_at": "2026-03-16T10:00:00Z"
        }
      },
      "status": "sent",
      "status_reason": null,
      "attempts": 1,
      "next_attempt_at": null,
      "delivery_started_at": null,
      "last_attempted_at": "2026-03-16T10:00:02Z",
      "response_status": 204,
      "response_body_excerpt": "",
      "history": [
        {
          "at": "2026-03-16T10:00:02Z",
          "manual": false,
          "status": 204,
          "error": null,
          "duration_ms": 182
        }
      ],
      "created_at": "2026-03-16T10:00:00Z",
      "updated_at": "2026-03-16T10:00:02Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total_pages": 1,
    "total_count": 1
  }
}

Get a webhook delivery

GET https://tayl.pro/api/v1/webhook-deliveries/{id} · getWebhookDelivery · Scope webhooks:manage

Returns one retained delivery with the immutable payload and up to 20 recent attempt diagnostics. A delivery of an event whose resource the key can't read (for example users:read for user.*) returns 404.

Parameters

Responses

Example response (200)

{
  "id": "019cf5b0-7c00-7000-8000-000000000012",
  "webhook_endpoint_id": "019cf5b0-7c00-7000-8000-000000000010",
  "event_type": "user.created",
  "event_id": "019cf5b0-7c00-7000-8000-000000000011",
  "payload": {
    "id": "019cf5b0-7c00-7000-8000-000000000011",
    "type": "user.created",
    "created_at": "2026-03-16T10:00:00Z",
    "data": {
      "id": "019cf5b0-7c00-7000-8000-000000000002",
      "external_id": "usr-1042",
      "email": "alex.chen@example.com",
      "name": "Alex Chen",
      "first_name": "Alex",
      "last_name": "Chen",
      "state": "active",
      "invited_at": "2026-03-10T09:00:00Z",
      "accepted_at": "2026-03-10T09:15:00Z",
      "created_at": "2026-03-10T09:00:00Z",
      "updated_at": "2026-03-16T10:00:00Z"
    }
  },
  "status": "sent",
  "status_reason": null,
  "attempts": 1,
  "next_attempt_at": null,
  "delivery_started_at": null,
  "last_attempted_at": "2026-03-16T10:00:02Z",
  "response_status": 204,
  "response_body_excerpt": "",
  "history": [
    {
      "at": "2026-03-16T10:00:02Z",
      "manual": false,
      "status": 204,
      "error": null,
      "duration_ms": 182
    }
  ],
  "created_at": "2026-03-16T10:00:00Z",
  "updated_at": "2026-03-16T10:00:02Z"
}

Retry a webhook delivery

POST https://tayl.pro/api/v1/webhook-deliveries/{id}/retry · retryWebhookDelivery · Scope webhooks:manage

Atomically claims and enqueues a retained failed or abandoned delivery. The endpoint must still be active and subscribed to the delivery's event (event_unsubscribed otherwise). A delivery of an event whose resource the key can't read (for example users:read for user.*) returns 404.

Parameters

Responses

Example response (202)

{
  "id": "019cf5b0-7c00-7000-8000-000000000012",
  "webhook_endpoint_id": "019cf5b0-7c00-7000-8000-000000000010",
  "event_type": "user.created",
  "event_id": "019cf5b0-7c00-7000-8000-000000000011",
  "payload": {
    "id": "019cf5b0-7c00-7000-8000-000000000011",
    "type": "user.created",
    "created_at": "2026-03-16T10:00:00Z",
    "data": {
      "id": "019cf5b0-7c00-7000-8000-000000000002",
      "external_id": "usr-1042",
      "email": "alex.chen@example.com",
      "name": "Alex Chen",
      "first_name": "Alex",
      "last_name": "Chen",
      "state": "active",
      "invited_at": "2026-03-10T09:00:00Z",
      "accepted_at": "2026-03-10T09:15:00Z",
      "created_at": "2026-03-10T09:00:00Z",
      "updated_at": "2026-03-16T10:00:00Z"
    }
  },
  "status": "delivering",
  "status_reason": "http_500",
  "attempts": 1,
  "next_attempt_at": null,
  "delivery_started_at": "2026-03-16T10:05:00Z",
  "last_attempted_at": "2026-03-16T10:00:02Z",
  "response_status": 500,
  "response_body_excerpt": "Internal Server Error",
  "history": [
    {
      "at": "2026-03-16T10:00:02Z",
      "manual": false,
      "status": 500,
      "error": null,
      "duration_ms": 182
    }
  ],
  "created_at": "2026-03-16T10:00:00Z",
  "updated_at": "2026-03-16T10:05:00Z"
}

Events

Each event is delivered and signed as described above.

Event Payload Read scope
user.created WebhookPayloadUserCreated users:read
user.updated WebhookPayloadUserUpdated users:read
user.archived WebhookPayloadUserArchived users:read
user.restored WebhookPayloadUserRestored users:read
group.created WebhookPayloadGroupCreated groups:read
group.updated WebhookPayloadGroupUpdated groups:read
group.archived WebhookPayloadGroupArchived groups:read
group.member_added WebhookPayloadGroupMemberAdded groups:read
group.member_removed WebhookPayloadGroupMemberRemoved groups:read
assignment.created WebhookPayloadAssignmentCreated assignments:read
assignment.updated WebhookPayloadAssignmentUpdated assignments:read
assignment.archived WebhookPayloadAssignmentArchived assignments:read
task.started WebhookPayloadTaskStarted tasks:read
task.completed WebhookPayloadTaskCompleted tasks:read
task.overdue WebhookPayloadTaskOverdue tasks:read
completion.created WebhookPayloadCompletionCreated completions:read
certificate.issued WebhookPayloadCertificateIssued certificates:read
signable.signed WebhookPayloadSignableSigned completions:read

Schemas

WebhookEventType

Event type available for webhook subscription and delivery filtering. One of "user.created", "user.updated", "user.archived", "user.restored", "group.created", "group.updated", "group.archived", "group.member_added", "group.member_removed", "assignment.created", "assignment.updated", "assignment.archived", "task.started", "task.completed", "task.overdue", "completion.created", "certificate.issued", "signable.signed".

WebhookEndpointList

One page of configured webhook destinations.

WebhookEndpoint

An HTTPS destination and the event types Tayl sends to it.

Meta

Pagination details on every list. Page links also come in the RFC 8288 Link header, as first, prev, next and last.

WebhookEndpointCreateInput

HTTPS destination and subscriptions for a new webhook endpoint. Unknown fields are refused.

WebhookEndpointWithSecret

Webhook endpoint plus the one-time signing secret returned after creation or rotation. WebhookEndpoint, with the fields below.

WebhookEndpointUpdateInput

A new URL, new events or both for an existing endpoint. Unknown fields are refused. Send at least 1 of these fields.

WebhookDeliveryList

One page of retained webhook deliveries.

WebhookDelivery

Retained delivery state, immutable event payload, and bounded attempt diagnostics.

WebhookEnvelope

Immutable event envelope delivered as the raw webhook request body. Unknown fields are refused.

WebhookDeliveryHistoryEntry

Bounded diagnostic record for one HTTP delivery attempt.

WebhookPayloadUserCreated

Signed webhook envelope emitted when user created. WebhookEnvelope, with the fields below.

WebhookPayloadUserUpdated

Signed webhook envelope emitted when user updated. WebhookEnvelope, with the fields below.

WebhookPayloadUserArchived

Signed webhook envelope emitted when user archived. WebhookEnvelope, with the fields below.

WebhookPayloadUserRestored

Signed webhook envelope emitted when user restored. WebhookEnvelope, with the fields below.

WebhookPayloadGroupCreated

Signed webhook envelope emitted when group created. WebhookEnvelope, with the fields below.

WebhookPayloadGroupUpdated

Signed webhook envelope emitted when group updated. WebhookEnvelope, with the fields below.

WebhookPayloadGroupArchived

Signed webhook envelope emitted when group archived. WebhookEnvelope, with the fields below.

WebhookPayloadGroupMemberAdded

Signed webhook envelope emitted when group member added. WebhookEnvelope, with the fields below.

WebhookPayloadGroupMemberRemoved

Signed webhook envelope emitted when group member removed. WebhookEnvelope, with the fields below.

WebhookPayloadAssignmentCreated

Signed webhook envelope emitted when assignment created. WebhookEnvelope, with the fields below.

WebhookPayloadAssignmentUpdated

Signed webhook envelope emitted when assignment updated. WebhookEnvelope, with the fields below.

WebhookPayloadAssignmentArchived

Signed webhook envelope emitted when assignment archived. WebhookEnvelope, with the fields below.

WebhookPayloadTaskStarted

Signed webhook envelope emitted when task started. WebhookEnvelope, with the fields below.

WebhookPayloadTaskCompleted

Signed webhook envelope emitted when task completed. WebhookEnvelope, with the fields below.

WebhookPayloadTaskOverdue

Signed webhook envelope emitted when task overdue. WebhookEnvelope, with the fields below.

WebhookPayloadCompletionCreated

Signed webhook envelope emitted when completion created. WebhookEnvelope, with the fields below.

WebhookPayloadCertificateIssued

Signed webhook envelope emitted when certificate issued. WebhookEnvelope, with the fields below.

WebhookPayloadSignableSigned

Signed webhook envelope emitted when signable signed. WebhookEnvelope, with the fields below.

User

A member of the organisation (an OrganisationUser). state tracks the membership lifecycle; archived users are retained with their learning history.

Group

A group of people. Automatic groups (automatic: true) are maintained by Tayl and read-only through the API. Rule-based groups (a non-empty rule_user_group_ids, category_made: true) are made only by Tayl, as a group category's subgroups: each holds everyone in both of the groups its rule names, and is read-only here apart from its memberships. People added to one directly (source direct) are in those groups through it.

WebhookMembershipData

Group and user snapshot captured for a membership change event. Unknown fields are refused.

Assignment

Content assigned to people and groups. The assignment's own settings are top-level fields; the settings learners get, wherever they come from, are under effective_settings.

Task

Training assigned to a learner. A task points at a version of its content: assignable_id is the course, pathway or document, and assignable_version_id its version. A course task's version can still change until the learner starts it; other tasks keep the version they were assigned.

Completion

A learner's completion of a piece of content. valid_until is null for completions that never expire; certificate_reference is non-null when a certificate was issued.

Certificate

Metadata for an issued certificate. A certificate is a course completion with a PDF, not a record of its own, so its id is the completion's UUID.

WebhookSignableSignedData

Signature snapshot captured when a learner signs a document or signable course chapter. Unknown fields are refused.

NullableExternalId

Caller-owned identifier, unique within the organisation. Matched case-sensitively; surrounding whitespace is stripped. String or null, at most 255 characters.

AssignmentTarget

A person or group the assignment is for.

AssignmentSettingSource

Ownership and write-protection metadata for one effective training setting. Unknown fields are refused.