LemuAIDocs

Webhook Subscriptions · 2 min read

Create a Webhook

Subscribe a URL to LemuTickets events; the signing secret is returned once

Open in ChatGPTOpen in ClaudeMarkdown

Creates a webhook subscription: LemuTickets sends a signed POST to your URL for every matching event. See Webhooks for the event list, the payload, verifying signatures and retries.

POST/v1/webhooks

Needs the api_keys.manage scope.

Request body#

FieldTypeRequiredDescription
urlstringYesWhere to send events. https:// is recommended. Must resolve to a public address. Up to 1,000 characters.
eventsarray of stringsYesEvent names or patterns, for example ["ticket.created", "ticket.transitioned", "comment.*"]. Each must match at least one event.
descriptionstringNoA note for your team, for example ERP ticket sync.
project_idsarray of UUIDsNoOnly send events for tickets in these projects. Empty (default) means all projects and also events that are not about a ticket.
enabledbooleanNoDefault true. Set false to create it switched off.

Example request:

cURL
curl -X POST https://api.tickets.lemuai.com/v1/webhooks \
  -H "Authorization: Bearer ltk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://erp.example.com/lemutickets/webhook",
    "events": ["ticket.created", "ticket.transitioned", "ticket.updated", "comment.created"],
    "description": "ERP ticket sync",
    "project_ids": ["3b0f6c1e-8a2d-4f5b-9c71-0e4d2a6b8f13"]
  }'

Response#

201

JSON
{
  "id": "f2a4c6e8-0b1d-4f3a-8c5e-a7c9e1b3d5f7",
  "url": "https://erp.example.com/lemutickets/webhook",
  "description": "ERP ticket sync",
  "events": ["comment.created", "ticket.created", "ticket.transitioned", "ticket.updated"],
  "project_ids": ["3b0f6c1e-8a2d-4f5b-9c71-0e4d2a6b8f13"],
  "enabled": true,
  "failure_count": 0,
  "disabled_reason": null,
  "last_success_at": null,
  "last_failure_at": null,
  "created_at": "2026-11-25T10:10:00.120000+00:00",
  "updated_at": "2026-11-25T10:10:00.120000+00:00",
  "secret": "whsec_Lr6c0Xh2vJ9kQ1pT8sW3nB5mA7dF4gE2"
}

secret is only returned here. Store it straight away: you need it to verify signatures. If you lose it, issue a new one with Rotate secret in Settings → API keys and webhooks.

FieldTypeDescription
idstringThe webhook's id.
urlstringThe endpoint URL.
descriptionstringYour note.
eventsarray of stringsThe event patterns, sorted and without duplicates.
project_idsarray of stringsThe project filter. Empty means all.
enabledbooleanWhether events are being sent.
failure_countintegerFailed attempts in a row. Resets on a successful delivery.
disabled_reasonstring or nullWhy the webhook was turned off automatically, if it was.
last_success_at, last_failure_atstring or nullThe last successful and failed delivery.
created_at, updated_atstringTimestamps.
secretstringThe signing secret (whsec_...). Only in this response.

Errors#

StatuscodeWhen
403missing_capabilityThe key does not have api_keys.manage
422missing_eventsevents is empty
422invalid_eventsA pattern matches no event. data.unknown lists them
422invalid_urlThe URL does not start with http:// or https://
422private_addressThe URL points at a private, local or internal address
422unresolvable_hostThe URL's host name does not resolve