Skip to content

API Reference

REST API documentation for GoatFlow developers.

Getting Started

First steps with GoatFlow - installation, initial setup, and your first ticket.

Deployment

Production deployment guides for Docker, Kubernetes, and air-gapped environments.

Admin Guide

Configure queues, users, groups, automation, and system settings.

API Reference

REST API documentation for integrations and custom development.

Migration Guide

Moving from OTRS to GoatFlow - import your existing data and configuration.

FAQ

Frequently asked questions and common troubleshooting tips.

This page is built from GoatFlow’s OpenAPI specification, api/openapi.yaml on the main branch, each time the site is published. GoatFlow’s tests check every path in it against the server’s routes, so what is listed here exists in the released version.

Paths are relative to your GoatFlow address, for example https://helpdesk.example.com/api/v1/tickets.

Other references in the goatflow repository:

  • Route reference: every route the server registers, including the web interface and admin routes, generated from routes/*.yaml. These routes are not a stable API.
  • A running GoatFlow serves Swagger UI at /swagger/ for the handlers that carry API annotations.

OpenAPI 3.0.3, API version 0.10.0. Source: api/openapi.yaml.

REST API v1 of GoatFlow, an OTRS/Znuny-compatible helpdesk.

Authenticate with Authorization: Bearer <token>, where the token is either a JWT from POST /api/v1/auth/login or a personal API token (gf_...) created under Settings -> API Tokens (/settings/tokens). Browser sessions authenticate with the auth_token cookie set at login.

API tokens carry scopes. A token without the scope an endpoint needs gets 403. Agent tokens pass admin checks only when they carry admin:* (or *, or no scopes) and their owner is an admin.

Every path here is checked against the router by TestOpenAPISpecMatchesRoutes (internal/api). The liveness probe GET /health and the MCP endpoint (/api/mcp, see docs/api/MCP.md) are not part of this API.

Endpoints

Tickets

Tickets (OTRS ticket table)

GET /api/v1/tickets List tickets

Paginated ticket list. Callable by agents and customers (JWT, session cookie or API token; no API-token scope is checked).

  • Agents need ro permission on at least one queue (admins bypass); results are limited to tickets in queues the agent can read.
  • Customers pass the queue check and only ever see tickets whose customer_user_id is their own login.

Invalid or out-of-range numeric query values are ignored (defaults apply). status values other than open, closed and pending are accepted but have no effect.

ParameterInTypeRequiredDescription
pagequeryintegernoPage number (values < 1 or non-numeric are ignored). Default 1.
per_pagequeryintegernoPage size; values above 100 are capped at 100. Default 20.
limitqueryintegernoAlias for per_page; overrides it when both are given. Capped at 100.
offsetqueryintegernoRow offset; converted to page = offset / per_page + 1 and overrides page.
statusquerystring, one of: open, closed, pendingnoState category filter. open = new/open state types, closed = closed state types, pending = pending state types. Any other value is ignored.
queue_idqueryintegernoOnly tickets in this queue.
priority_idqueryintegernoOnly tickets with this priority.
customer_user_idquerystringnoOnly tickets of this customer login (ticket.customer_user_id).
assigned_user_idqueryintegernoOnly tickets whose responsible user is this user ID.
searchquerystringnoCase-insensitive substring match on the title, or exact ticket number.
sortquerystring, one of: created, updated, priority, tn, titlenoSort field; unknown values sort by creation time. Default created.
orderquerystring, one of: asc, descnoSort direction; any other value means desc. Default desc.
includequerystringnoComma-separated extras per ticket: article_count adds article_count, last_article adds last_article. Unknown entries are ignored.
ResponseBodyDescription
200TicketListResponseOne page of tickets
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseAgent without ro on any queue (“You do not have access to any queues”), or a customer whose login cannot be resolved.
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/tickets Create a ticket

Agents only (customers get 403). The caller needs create permission on the target queue (admins bypass). No API-token scope is checked.

The queue is read from queue_id in the JSON body (or the queue_id query/form parameter); all given values must agree. An initial customer-visible article with the ticket title as subject and body as content is created. When customer_email is given, a “Ticket Created” email is queued to it asynchronously. Form-encoded bodies (application/x-www-form-urlencoded, multipart/form-data) with the same field names are accepted as well; there subject and description are fallbacks for title and body.

Request body (required): application/json TicketCreateRequest

ResponseBodyDescription
201TicketCreateResponseTicket created
400ErrorResponseMissing/invalid/conflicting queue_id (“Queue ID is required”, “Invalid queue ID”, “Conflicting queue IDs in request”), body not parseable, missing title or queue_id, or the ticket service rejected the input (message passed through).
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseCaller is a customer, or lacks create permission on the queue
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/tickets/{id} Get a ticket

Agents need ro permission on the ticket’s queue (admins bypass); without it the response is 403 from the access check, or 404. Customers may read only tickets whose customer_user_id is their login and whose customer_id equals their own company; other tickets answer 404. No API-token scope is checked.

The identifier must be the numeric ticket ID (a ticket number is rejected with 400).

ParameterInTypeRequiredDescription
idpathinteger (int64)yesNumeric ticket ID. (The queue-access check also resolves a ticket number, but the handlers accept only the numeric ID.)
ResponseBodyDescription
200TicketGetResponseThe ticket
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseAgent lacks ro on the ticket’s queue, or the customer’s customer_user record was not found.
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

PUT /api/v1/tickets/{id} Update a ticket

Agents only, with rw permission on the ticket’s queue (admins bypass). No API-token scope is checked. Additionally: changing priority_id needs priority (or rw), changing user_id needs owner (or rw) on the current queue, and changing queue_id needs move_into on the new queue.

Only the given fields change. Unknown fields are rejected. One history entry is written per changed field, in the same transaction as the update. Returns the updated ticket.

ParameterInTypeRequiredDescription
idpathinteger (int64)yesNumeric ticket ID. (The queue-access check also resolves a ticket number, but the handlers accept only the numeric ID.)

Request body (required): application/json TicketUpdateRequest

ResponseBodyDescription
200TicketUpdateResponseUpdated ticket
400ErrorResponseNon-numeric ticket ID, invalid JSON, empty object (“No fields to update”), unknown field, wrong type/length, empty title, or a referenced ID that does not exist or is not valid (e.g. “Invalid queue_id”).
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseCaller is a customer, or lacks the queue permission for the change
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

DELETE /api/v1/tickets/{id} Archive a ticket

Agents only, with rw permission on the ticket’s queue (admins bypass). No API-token scope is checked. Tickets are never hard deleted: the state is set to closed successful, archive_flag to 1, and an internal “Ticket Archived” article is added.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesNumeric ticket ID. (The queue-access check also resolves a ticket number, but the handlers accept only the numeric ID.)
ResponseBodyDescription
204Ticket archived
400ErrorResponseNon-numeric ticket ID, or the ticket is already in a closed state type
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/tickets/{id}/reopen Reopen a closed ticket

Agents only, with rw permission on the ticket’s queue (admins bypass). No API-token scope is checked. Only tickets whose state type is closed can be reopened; the state becomes open, archive_flag is cleared and a customer-visible “Ticket Reopened” article containing the reason is added.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesNumeric ticket ID. (The queue-access check also resolves a ticket number, but the handlers accept only the numeric ID.)

Request body (required): application/json TicketReopenRequest

ResponseBodyDescription
200TicketReopenResponseTicket reopened
400ErrorResponseNon-numeric ticket ID, missing reason, or the ticket is not closed
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

Articles

Messages and notes on a ticket

GET /api/v1/tickets/{id}/articles List ticket articles

Returns all articles of a ticket, newest first (create_time DESC, id DESC), without pagination.

Callable by agents with ro permission on the ticket’s queue (admins bypass the queue check) and by customers who own the ticket (customer_user_id equals their login). Customers only see articles with is_visible_for_customer = true. Tickets the caller cannot see, including other customers’ tickets, return 404. Agents without ro on the queue get 403.

ParameterInTypeRequiredDescription
idpathintegeryesNumeric ticket ID.
include_attachmentsquerystring, one of: true, falsenoWhen exactly true, each article gets an attachments array (HTML body parts are excluded). Any other value is ignored.
ResponseBodyDescription
200objectArticles of the ticket.
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/tickets/{id}/articles Add an article to a ticket

Creates an article (reply or note) on a ticket and updates the ticket’s change_time.

Agents only (customers get 403 Agent access required); the agent needs note permission on the ticket’s queue (403 from middleware otherwise; admins bypass). The handler re-checks note/rw and answers 404 if that fails.

Behaviour:

  • body is required (non-blank); content_type defaults to text/plain.
  • from/to fall back to from_email/to_email.
  • Sender: article_sender_type_id (must exist, else 400), else sender_type name, else agent.
  • Visibility key precedence: is_visible, is_visible_to_customer, is_visible_for_customer.
  • article_type picks channel and visibility; without it, a visibility flag picks note-external/note-internal. Unknown type -> 400 Invalid article type; type not allowed for the sender -> 400.
  • communication_channel_id overrides the derived channel and must exist.
  • time_unit > 0 adds a time accounting row (failure is ignored).
  • Customer-visible articles on tickets with a customer queue a notification email.
ParameterInTypeRequiredDescription
idpathintegeryesNumeric ticket ID.

Request body (required): application/json ArticleCreateRequest

ResponseBodyDescription
201objectArticle created.
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/tickets/{id}/articles/{article_id} Get a ticket article

Returns one article of a ticket. Same access rules as listing: agents with ro on the ticket’s queue (admins bypass), or the customer owning the ticket. Articles not on this ticket, and internal articles requested by a customer, return 404 Article not found.
ParameterInTypeRequiredDescription
idpathintegeryesNumeric ticket ID.
article_idpathintegeryesNumeric article ID; must belong to the ticket.
include_attachmentsquerystring, one of: true, falsenoWhen exactly true, the article gets an attachments array (HTML body parts are excluded).
ResponseBodyDescription
200ArticleDetailThe article.
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

Queues

Ticket queues

GET /api/v1/queues List queues

Agents only (customers get 403). Requires read (ro) permission on at least one queue (queue_ro middleware); admins bypass that check. Returns the queues on which the caller holds any queue permission, ordered by name. Optional keys are omitted when the column is NULL. Ticket counters are added only with include_stats=true and only for queues the caller can read.
ParameterInTypeRequiredDescription
validquerystringno1 = valid queues only, 2 = invalid only; any other value is ignored (all queues).
include_statsquerystring, one of: true, falsenotrue adds ticket_count/open_tickets/closed_tickets/pending_tickets.
filter_attributequerystringnoTicket attribute (e.g. Type) whose ticket-attribute-relations restrict the list. Used only together with filter_value.
filter_valuequerystringnoValue of filter_attribute.
ResponseBodyDescription
200objectQueues visible to the caller
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/queues Create queue

Admins only (admin middleware). The handler additionally requires user_role == "Admin", so admin-scoped API tokens (role User) pass the middleware but are refused with 403 “Admin role required”. The queue is created valid (valid_id 1). Defaults: system_address_id/salutation_id/signature_id 1, follow_up_id 1, negative unlock_timeout becomes 0.

Request body (required): application/json QueueCreateRequest

ResponseBodyDescription
201objectQueue created
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
409ErrorResponseThe request conflicts with existing data
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/queues/{id} Get queue

Agents only. Requires ro permission on this queue (queue_access_ro middleware; admins bypass; otherwise 403). Any lookup failure, including a missing queue, answers 404. Optional keys are omitted when NULL.
ParameterInTypeRequiredDescription
idpathintegeryesQueue ID
ResponseBodyDescription
200objectThe queue
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

PUT /api/v1/queues/{id} Update queue

Admins only (admin middleware). Partial update: only keys present in the body change. name must be non-blank and unique (case-insensitive, 409 otherwise); group_id must reference an existing valid group; system_address_id, salutation_id, signature_id and comments may be set to null. A body without any known key changes nothing and returns the current values. Errors from this handler carry only error (no success) except group errors.
ParameterInTypeRequiredDescription
idpathintegeryesQueue ID

Request body (required): application/json QueueUpdateRequest

ResponseBodyDescription
200objectQueue after the update
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
409ErrorResponseThe request conflicts with existing data
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

DELETE /api/v1/queues/{id} Invalidate queue

Admins only (admin middleware). Soft delete: sets valid_id to 2. Queues 1-3 are system queues (403). A queue that still has tickets cannot be deleted (409).
ParameterInTypeRequiredDescription
idpathintegeryesQueue ID
ResponseBodyDescription
200QueueMessageResponseQueue invalidated
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
409ErrorResponseThe request conflicts with existing data
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/queues/{id}/stats Get queue ticket statistics

Agents only. Requires ro permission on this queue (queue_access_ro middleware, admins bypass). The handler re-checks read permission via the permission service and answers 404 (not 403) when it fails or the queue does not exist.
ParameterInTypeRequiredDescription
idpathintegeryesQueue ID
ResponseBodyDescription
200objectTicket counters of the queue
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

Priorities

Ticket priorities

GET /api/v1/priorities List priorities

Any agent (customers get 403). Ordered by id. On 500 the response also carries an X-Guru-Error header.
ParameterInTypeRequiredDescription
validquerystringnotrue/1/empty = valid only (default), false/0 = invalid only, all = no filter. Case-insensitive; unknown values act as true. Default true.
filter_attributequerystringnoTicket attribute whose ticket-attribute-relations restrict the list. Used only together with filter_value.
filter_valuequerystringnoValue of filter_attribute.
ResponseBodyDescription
200objectPriorities
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/priorities Create priority

Admins only (admin middleware). Created valid; color defaults to #cdcdcd. A valid priority with the same name gives 409. Any bind error answers 400 “Name is required”.

Request body (required): application/json PriorityCreateRequest

ResponseBodyDescription
201PriorityEnvelopePriority created
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
409ErrorResponseThe request conflicts with existing data
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/priorities/{id} Get priority

Any agent. Returns the priority object itself (no success/data envelope), valid or not. Any lookup failure answers 404.
ParameterInTypeRequiredDescription
idpathintegeryesPriority ID
ResponseBodyDescription
200PriorityThe priority (not enveloped)
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

PUT /api/v1/priorities/{id} Update priority

Admins only (admin middleware). name is always written, so an omitted name sets it to the empty string. Empty or omitted color keeps the current color. The response always reports valid_id 1. IDs outside the smallint range answer 404.
ParameterInTypeRequiredDescription
idpathintegeryesPriority ID

Request body (required): application/json PriorityUpdateRequest

ResponseBodyDescription
200PriorityEnvelopePriority after the update
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

DELETE /api/v1/priorities/{id} Invalidate priority

Admins only (admin middleware). Soft delete: sets valid_id to 2. Priority 1 is a system priority (403). IDs outside the smallint range or unknown IDs answer 404.
ParameterInTypeRequiredDescription
idpathintegeryesPriority ID
ResponseBodyDescription
200PriorityMessageResponsePriority invalidated
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

Users

The calling user

GET /api/v1/users/me Get current user

Any agent (customers get 403). Returns the calling agent’s users row. email is the login (the users table has no email column). groups lists valid groups the agent is a member of; it is null when the agent has no group and [] when the group query fails.
ResponseBodyDescription
200objectThe calling agent
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

Webhooks

Outbound webhooks and their delivery log (admin only)

GET /api/v1/webhook-deliveries/{id} Get webhook delivery

Admins only. One delivery including its payload and the (truncated) response body.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesDelivery ID (positive integer; otherwise 400 invalid id)
ResponseBodyDescription
200WebhookDeliveryResponseThe delivery
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/webhook-deliveries/{id}/redeliver Redeliver webhook delivery

Admins only. Sends the payload of an earlier delivery again now as a new delivery (one attempt, no retries, also when the webhook is inactive) and returns the new delivery. A failed HTTP attempt is still 200 with success: false in the delivery. No request body.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesDelivery ID (positive integer; otherwise 400 invalid id)
ResponseBodyDescription
200WebhookDeliveryResponseThe new delivery
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/webhooks List webhooks

Admins only (unified_auth + admin; API tokens need admin:*, * or no scopes and an admin owner). Returns all webhooks ordered by name, optionally filtered by state. Secrets are never returned.
ParameterInTypeRequiredDescription
activequerybooleannotrue = only active, false = only inactive. Parsed with Go strconv.ParseBool, so 1, 0, t, f, TRUE, False etc. are accepted too; anything else is 400.
ResponseBodyDescription
200WebhookListResponseWebhooks ordered by name (empty array when none)
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/webhooks Create webhook

Admins only. Creates an outbound webhook. Deliveries are POSTed as JSON {event, occurred_at, data} and signed with X-Webhook-Signature: sha256=<hex HMAC-SHA256 of body> when a secret is set. Defaults: retry_count 3, timeout_seconds 10, is_active true. Name and url are trimmed; duplicate events are removed.

Request body (required): application/json WebhookCreateRequest

ResponseBodyDescription
201WebhookResponseWebhook created
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
409ErrorResponseThe request conflicts with existing data
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/webhooks/events List subscribable webhook events

Admins only. The catalogue of events a webhook can subscribe to, in display order.
ResponseBodyDescription
200objectEvent catalogue
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/webhooks/{id} Get webhook

Admins only.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesWebhook ID (positive integer; otherwise 400 invalid id)
ResponseBodyDescription
200WebhookResponseThe webhook
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

PUT /api/v1/webhooks/{id} Update webhook

Admins only. Partial update: only fields present in the body change ({} is valid and only bumps updated_at/updated_by). The result is re-validated as on create. secret: "" removes the secret.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesWebhook ID (positive integer; otherwise 400 invalid id)

Request body (required): application/json WebhookUpdateRequest

ResponseBodyDescription
200WebhookResponseThe updated webhook
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
409ErrorResponseThe request conflicts with existing data
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

DELETE /api/v1/webhooks/{id} Delete webhook

Admins only. Deletes the webhook and its delivery log.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesWebhook ID (positive integer; otherwise 400 invalid id)
ResponseBodyDescription
200objectDeleted
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/webhooks/{id}/deliveries List webhook deliveries

Admins only. Newest deliveries first (by id), without payload and response (fetch a single delivery for those).
ParameterInTypeRequiredDescription
idpathinteger (int64)yesWebhook ID (positive integer; otherwise 400 invalid id)
limitqueryintegernoMaximum number of deliveries; outside 1-200 or non-integer is 400. Default 50.
ResponseBodyDescription
200objectDeliveries (empty array when none)
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/webhooks/{id}/test Send test delivery

Admins only. Sends a webhook.test event now (one attempt, no retries, also when the webhook is inactive) with data {webhook_id, name, message} and returns the recorded delivery. A failed HTTP attempt is still 200 with success: false in the delivery. No request body.
ParameterInTypeRequiredDescription
idpathinteger (int64)yesWebhook ID (positive integer; otherwise 400 invalid id)
ResponseBodyDescription
200WebhookDeliveryResponseThe recorded delivery
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable
Ticket search and saved searches

GET /api/v1/search/saved List saved searches

Lists the calling agent’s saved ticket searches (names only), sorted by name. Saved searches live in the OTRS search_profile table under login TicketSearch::<agent login>, so they are private to the agent and shared with OTRS/Znuny ticket search profiles of the same agent. Agents only; API tokens need tickets:read; caller needs ro access to at least one queue.
ResponseBodyDescription
200objectThe caller’s saved searches
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/search/saved Create saved search

Saves a ticket search for the calling agent under a new name. Stored as one search_profile row per value (login TicketSearch::<agent login>, profile_type SCALAR for text/date parameters, ARRAY for ID/list parameters, profile_key the OTRS attribute name, e.g. QueueIDs). Parameters are validated exactly like the query parameters of GET /api/v1/search/tickets; paging parameters (page, limit, sort, order) are not search parameters and are rejected. Agents only; API tokens need tickets:read; caller needs ro access to at least one queue.

Request body (required): application/json SearchSavedCreateRequest

ResponseBodyDescription
201SearchSavedResponseSaved search created
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
409ErrorResponseThe request conflicts with existing data
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/search/saved/{name} Get saved search

Returns one of the calling agent’s saved searches (looked up by search_profile.login = TicketSearch::<agent login> and profile_name). Stored attributes this API does not search on (e.g. OTRS result-form settings) or whose values do not validate are listed in ignored_parameters instead of parameters. Agents only; API tokens need tickets:read; caller needs ro access to at least one queue.
ParameterInTypeRequiredDescription
namepathstringyesSaved search name (search_profile.profile_name, exact match)
ResponseBodyDescription
200objectThe saved search
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

PUT /api/v1/search/saved/{name} Update saved search

Replaces all stored parameters of one of the calling agent’s saved searches (all its search_profile rows are deleted and rewritten, including attributes previously reported as ignored). The search cannot be renamed: name and type in the body are ignored. The body is parsed before the search is looked up, so malformed JSON gives 400 even for an unknown name. Agents only; API tokens need tickets:read; caller needs ro access to at least one queue.
ParameterInTypeRequiredDescription
namepathstringyesSaved search name (search_profile.profile_name, exact match)

Request body (required): application/json SearchSavedUpdateRequest

ResponseBodyDescription
200SearchSavedResponseSaved search updated
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

DELETE /api/v1/search/saved/{name} Delete saved search

Deletes all search_profile rows of one of the calling agent’s saved searches. Agents only; API tokens need tickets:read; caller needs ro access to at least one queue.
ParameterInTypeRequiredDescription
namepathstringyesSaved search name (search_profile.profile_name, exact match)
ResponseBodyDescription
204Saved search deleted
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

POST /api/v1/search/saved/{name}/execute Execute saved search

Runs one of the calling agent’s saved searches, limited to the queues the agent may read. Paging and ordering come from the query string; other query parameters are ignored and no request body is read. Paging parameters are validated before the search is looked up. If every stored attribute is ignored, the search has no criteria and returns all tickets in the agent’s readable queues. Agents only; API tokens need tickets:read; caller needs ro access to at least one queue.
ParameterInTypeRequiredDescription
namepathstringyesSaved search name (search_profile.profile_name, exact match)
sortquerystring, one of: created, changed, priority, tn, titlenoSort column (ties broken by ticket ID in the same direction) Default created.
orderquerystring, one of: asc, descnoSort direction (case-insensitive) Default desc.
pagequeryintegernoPage number Default 1.
limitqueryintegernoPage size Default 25.
ResponseBodyDescription
200objectOne page of matching tickets plus the saved search used
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
404ErrorResponseThe resource does not exist (or the caller may not see it)
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

GET /api/v1/search/tickets Search tickets

Agent ticket search over ticket, article and customer data. Agents only (customers get 403); API tokens need the tickets:read scope (or higher); the caller must have ro access to at least one queue, and results are limited to the queues the agent may read.

Text parameters match case-insensitively anywhere in the column; * is a wildcard (then the pattern is anchored), %, _ and \ match literally. Text and date parameters accept one value only. ID and state_type parameters accept comma-separated and/or repeated values (any-of). Empty values are ignored. Any query parameter not listed here is rejected with 400. Date parameters take YYYY-MM-DD, YYYY-MM-DD HH:MM:SS (UTC) or RFC 3339; a bare date for *_before includes that whole day.

ParameterInTypeRequiredDescription
qquerystringnoWhitespace-separated words; each must match ticket number, title, customer ID, customer user login, customer user email/first/last name, customer company name, or an article’s subject, body, From or To
tnquerystringnoTicket number
titlequerystringnoTicket title
customer_idquerystringnoCustomer (company) ID
customer_user_loginquerystringnoCustomer user login
fromquerystringnoAny article’s From
toquerystringnoAny article’s To or Cc
subjectquerystringnoAny article’s subject
bodyquerystringnoAny article’s body
state_typequeryarray of stringnoState type names, matched lower-cased (e.g. new, open, closed, merged, removed, “pending reminder”, “pending auto”); pending means both pending types. Comma-separated or repeated.
state_idqueryarray of integer (int64)noState IDs (positive integers), comma-separated or repeated
queue_idqueryarray of integer (int64)noQueue IDs (positive integers), comma-separated or repeated; still limited to readable queues
priority_idqueryarray of integer (int64)noPriority IDs (positive integers), comma-separated or repeated
type_idqueryarray of integer (int64)noTicket type IDs (positive integers), comma-separated or repeated
owner_idqueryarray of integer (int64)noOwner agent IDs (positive integers), comma-separated or repeated
responsible_idqueryarray of integer (int64)noResponsible agent IDs (positive integers), comma-separated or repeated
lock_idqueryarray of integer (int64)noLock IDs (positive integers), comma-separated or repeated
created_afterquerystringnoCreated at or after (YYYY-MM-DD, “YYYY-MM-DD HH:MM:SS” or RFC 3339)
created_beforequerystringnoCreated at or before; a bare date includes the whole day
changed_afterquerystringnoChanged at or after (YYYY-MM-DD, “YYYY-MM-DD HH:MM:SS” or RFC 3339)
changed_beforequerystringnoChanged at or before; a bare date includes the whole day
sortquerystring, one of: created, changed, priority, tn, titlenoSort column (ties broken by ticket ID in the same direction) Default created.
orderquerystring, one of: asc, descnoSort direction (case-insensitive) Default desc.
pagequeryintegernoPage number Default 1.
limitqueryintegernoPage size Default 25.
ResponseBodyDescription
200objectOne page of matching tickets
400ErrorResponseThe request is malformed or fails validation
401ErrorResponseNo credentials, or the token is invalid, expired or revoked
403ErrorResponseThe caller is authenticated but not allowed to do this
500ErrorResponseUnexpected server or database error
503ErrorResponseA required backend (database, token verifier) is unavailable

Schemas

ApiErrorDetail

FieldTypeRequiredDescription
codestringyes
messagestringyes

ArticleAttachment

FieldTypeRequiredDescription
content_typestringyes
dispositionstringyes
filenamestringyes
idintegeryesFile ID of the attachment within the article.
sizeinteger (int64)yes

ArticleCreateRequest

FieldTypeRequiredDescription
article_sender_type_idintegernoMust exist in article_sender_type.
article_typestringnoArticle type name (case-insensitive); aliases note = note-internal, email = email-external.
bodystringyesRequired; blank -> 400 Article body is required.
ccstringno
communication_channel_idintegernoMust exist in communication_channel; 0/absent derives from article type.
content_typestringno
fromstringno
from_emailstringno
in_reply_tostringno
incoming_timeinteger (int64)noUnix seconds; defaults to now.
is_visiblebooleanno
is_visible_for_customerbooleanno
is_visible_to_customerbooleanno
message_idstringno
referencesstringno
reply_tostringno
sender_typestringnoUsed when article_sender_type_id is 0/absent (case-insensitive; unknown names fall back to agent).
subjectstringno
time_unitnumberno
tostringno
to_emailstringno

ArticleCreated

Created article. create_time, from, to, cc, message_id are absent when the re-read after commit fails (fallback payload) or the column is NULL.
FieldTypeRequiredDescription
article_sender_type_idintegeryes
article_typeArticleTypeyes
bodystringyes
ccstringno
communication_channel_idintegeryes
content_typestringyes
create_byintegeryes
create_timestring (date-time)no
fromstringno
idinteger (int64)yes
is_visible_for_customerbooleanyes
message_idstringno
subjectstring, nullableyes
ticket_idinteger (int64)yes
ticket_updatedboolean, one of: trueyes
tostringno

ArticleDetail

FieldTypeRequiredDescription
article_sender_type_idintegeryes
article_typeArticleTypeyes
attachmentsarray of ArticleAttachmentnoPresent only with include_attachments=true.
bodystringyes
ccstringyes
change_byintegeryes
change_timestring (date-time)yes
communication_channel_idintegeryes
content_typestringyes
create_byintegeryes
create_timestring (date-time)yes
fromstringyesEmpty string when no MIME data.
idintegeryes
is_visible_for_customerbooleanyes
sender_typestringyesSender type name (e.g. agent, system, customer); empty if unknown.
subjectstringyes
ticket_idintegeryes
tostringyes

ArticleType

Article type derived from communication channel and customer visibility.

Type: string, one of: email-external, email-internal, email-notification-ext, email-notification-int, phone, fax, sms, note-internal, note-external, note-report, chat-external, chat-internal

ErrorResponse

Error body. Authentication and scope middleware send error as an object with a namespaced code; handlers send error as a message string, usually with success: false.
FieldTypeRequiredDescription
errorstring or ApiErrorDetailyes
successboolean, one of: falseno

Priority

FieldTypeRequiredDescription
colorstringyes
idintegeryes
namestringyes
valid_idintegeryes

PriorityCreateRequest

FieldTypeRequiredDescription
colorstringnoDefault #cdcdcd
namestringyes

PriorityEnvelope

FieldTypeRequiredDescription
dataPriorityyes
successboolean, one of: trueyes

PriorityMessageResponse

FieldTypeRequiredDescription
messagestringyes
successboolean, one of: trueyes

PriorityUpdateRequest

FieldTypeRequiredDescription
colorstringnoEmpty/omitted keeps the current color
namestringnoAlways written; omitting it blanks the name

QueueCreateRequest

FieldTypeRequiredDescription
commentsstring, nullableno
follow_up_idintegerno0/omitted becomes 1
follow_up_lockintegerno
group_idintegeryesExisting, valid group
namestringyesMust be unique among all queues (valid or not)
salutation_idinteger, nullablenoDefault 1
signature_idinteger, nullablenoDefault 1
system_address_idinteger, nullablenoDefault 1
unlock_timeoutintegernoNegative values become 0

QueueCreated

FieldTypeRequiredDescription
commentsstring, nullableyes
group_idintegeryes
group_namestringyes
groupsarray of QueueGroupRefyes
idintegeryes
namestringyes
valid_idinteger, one of: 1yes

QueueDetail

FieldTypeRequiredDescription
commentsstringno
follow_up_idintegerno
follow_up_lockintegerno
group_idintegeryes
group_namestringyesEmpty string when the group row is missing
groupsarray of QueueGroupRefyes
idintegeryes
namestringyes
salutation_idintegerno
signature_idintegerno
system_address_idintegerno
unlock_timeoutintegerno
valid_idintegeryes

QueueGroupRef

The queue’s single permission group (queue.group_id)
FieldTypeRequiredDescription
idintegeryes
namestringyes

QueueListItem

FieldTypeRequiredDescription
change_timestring (date-time)no
closed_ticketsintegerno
commentstringnoqueue.comments (note the singular key in this endpoint)
create_timestring (date-time)no
follow_up_idintegerno
follow_up_lockintegerno
group_idintegerno
group_namestringno
groupsarray of QueueGroupRefyesEmpty when the queue has no group
idintegeryes
namestringyes
open_ticketsintegerno
pending_ticketsintegerno
system_address_idintegerno
ticket_countintegerno
unlock_timeoutintegerno
validbooleanyesvalid_id == 1
valid_idintegeryes

QueueMessageResponse

FieldTypeRequiredDescription
messagestringyes
successboolean, one of: trueyes

QueueStats

FieldTypeRequiredDescription
closed_ticketsintegeryes
open_ticketsintegeryes
pending_ticketsintegeryes
total_ticketsintegeryes

QueueUpdateRequest

Partial update; at least one key (an empty body is 400)
FieldTypeRequiredDescription
commentsstring, nullableno
follow_up_idintegerno
follow_up_lockinteger, one of: 0, 1no
group_idintegerno
namestringno
salutation_idinteger, nullableno
signature_idinteger, nullableno
system_address_idinteger, nullableno
unlock_timeoutintegernoNegative values become 0
valid_idinteger, one of: 1, 2no

QueueUpdated

FieldTypeRequiredDescription
commentsstringno
follow_up_idintegeryes
follow_up_lockintegeryes
group_idintegeryes
group_namestringyes
groupsarray of QueueGroupRefyes
idintegeryes
namestringyes
salutation_idintegerno
signature_idintegerno
system_address_idintegerno
unlock_timeoutintegeryes
valid_idintegeryes

SearchIgnoredParameters

OTRS profile_keys stored for this search that are not applied (unknown to this API or with invalid values); never null

Type: array of string

SearchInputParameters

Search parameters keyed by the query parameter names of GET /api/v1/search/tickets (not page/limit/sort/order). Each value is a string, a number, or an array of strings/numbers; ID and state_type strings may be comma-separated. Same validation as the query; at least one non-empty parameter is required.

Type: object

SearchParameterValues

Search parameter value; text/date parameters are a single string, ID/list parameters an array of strings

Type: string or array of string

SearchParameters

Search parameters keyed by query parameter name (same names as GET /api/v1/search/tickets); ID and state_type values are arrays of strings, others strings

Type: object

SearchResultPage

FieldTypeRequiredDescription
paginationobjectyes
ticketsarray of SearchTicketyes

SearchSavedCreateRequest

FieldTypeRequiredDescription
namestringyesMust not be blank; must not already be used by the caller (409)
parametersSearchInputParametersyes
typestring, one of: TicketSearchnoOptional; any other non-empty value is 400

SearchSavedDetail

FieldTypeRequiredDescription
ignored_parametersSearchIgnoredParametersyes
namestringyes
parametersSearchParametersyes
typestring, one of: TicketSearchyes

SearchSavedResponse

FieldTypeRequiredDescription
dataobjectyes
successboolean, one of: trueyes

SearchSavedSummary

FieldTypeRequiredDescription
namestringyes
typestring, one of: TicketSearchyes

SearchSavedUpdateRequest

FieldTypeRequiredDescription
parametersSearchInputParametersyes

SearchTicket

FieldTypeRequiredDescription
created_atstring (date-time)yes
customer_idstringyesEmpty string when NULL
customer_user_loginstringyesEmpty string when NULL
idinteger (int64)yes
lock_idinteger (int64)yes
owner_idinteger (int64)yes
prioritystringyesPriority name
priority_idinteger (int64)yes
queuestringyesQueue name
queue_idinteger (int64)yes
responsible_idinteger (int64)yes
statestringyesState name
state_idinteger (int64)yes
state_typestringyesState type name
titlestringyes
tnstringyesTicket number
type_idinteger (int64), nullableyes
updated_atstring (date-time)yes

TicketCreateRequest

FieldTypeRequiredDescription
bodystringnoBody of the initial article; HTML is sanitised
customer_emailstringnoWhen set, a “Ticket Created” email is queued to this address
customer_idstringnoCustomer company ID
customer_user_idstringnoCustomer login
priority_idintegernoOmitted or 0 = service default
queue_idintegeryesTarget queue; caller needs create permission on it
state_idintegernoOmitted or 0 = service default
titlestringyes
type_idintegernoOmitted or 0 = none/default

TicketCreateResponse

FieldTypeRequiredDescription
dataobjectyes
successboolean, one of: trueyes

TicketGetResponse

FieldTypeRequiredDescription
dataobjectyes
successboolean, one of: trueyes

TicketListItem

FieldTypeRequiredDescription
article_countintegernoOnly with include=article_count
create_timestringyesSame as created_at
created_atstringyesCreation time as returned by the database driver
customer_idstringyesCustomer company ID; empty string when unset
customer_user_idstringyesCustomer login; empty string when unset
idinteger (int64)yes
last_articleobject, nullablenoOnly with include=last_article; null when the ticket has no article
priority_idintegeryes
priority_namestringyes
queue_idintegeryes
queue_namestringyes
responsible_user_idinteger, nullableyes
state_idintegeryes
state_namestringyes
ticket_numberstringyesSame as tn
titlestringyes
tnstringyesTicket number
update_timestringyesSame as updated_at
updated_atstringyesLast change time as returned by the database driver
user_idintegeryesOwner user ID

TicketListResponse

FieldTypeRequiredDescription
dataarray of TicketListItemyes
paginationobjectyes
successboolean, one of: trueyes

TicketRecord

FieldTypeRequiredDescription
change_byintegeryes
change_timestring (date-time)yes
create_byintegeryes
create_timestring (date-time)yes
customer_idstringyesEmpty string when unset
customer_user_idstringyesEmpty string when unset
idinteger (int64)yes
priority_idintegeryes
queue_idintegeryes
responsible_user_idintegeryes0 when unset
state_idintegeryes
ticket_lock_idintegeryes
titlestringyes
tnstringyes
type_idintegeryes0 when unset
user_idintegeryesOwner; 0 when unset

TicketReopenRequest

FieldTypeRequiredDescription
reasonstringyesStored in the “Ticket Reopened” article

TicketReopenResponse

FieldTypeRequiredDescription
idintegeryes
reasonstringyes
reopened_atstring (date-time)yes
statestring, one of: openyes
state_idintegeryes
successboolean, one of: trueyes

TicketUpdateRequest

At least one field. Integer fields must be positive whole numbers.
FieldTypeRequiredDescription
customer_idstringno
customer_user_idstringno
priority_idintegernoNeeds priority permission
queue_idintegernoValid queue; needs move_into on it
responsible_user_idintegerno
state_idintegerno
ticket_lock_idintegerno1 = unlock, 2 = lock, 3 = tmp_lock
titlestringnoMust not be blank
type_idintegerno
user_idintegernoNew owner (valid user); needs owner permission

TicketUpdateResponse

FieldTypeRequiredDescription
dataTicketRecordyes
successboolean, one of: trueyes

UserGroupRef

FieldTypeRequiredDescription
idintegeryes
namestringyes

UserMe

FieldTypeRequiredDescription
activebooleanyesvalid_id == 1
emailstringyesSame as login
first_namestringyes
groupsarray of UserGroupRef, nullableyes
idintegeryes
last_namestringyes
loginstringyes

Webhook

FieldTypeRequiredDescription
created_atstring (date-time)yes
created_byintegeryes
eventsarray of WebhookEventNameyes
has_secretbooleanyes
header_hintsobjectyesCustom header name -> masked hint of its value ({} when none). Values are never returned.
idinteger (int64)yes
is_activebooleanyes
namestringyes
retry_countintegeryes
secret_hintstringnoMasked hint of the secret; omitted when there is none
timeout_secondsintegeryes
updated_atstring (date-time)yes
updated_byintegeryes
urlstringyes

WebhookCreateRequest

FieldTypeRequiredDescription
eventsarray of WebhookEventNameyes
headersWebhookHeadersInputno
is_activebooleanno
namestringyesUnique name (trimmed, non-empty); duplicate is 409
retry_countintegerno
secretstringnoHMAC signing secret, 16-512 characters; empty or omitted = unsigned
timeout_secondsintegerno
urlstringyesAbsolute http or https URL. 400 when the host is localhost (or *.localhost) or a loopback, private, link-local, multicast, unspecified, 0.0.0.0/8, 100.64.0.0/10 or 240.0.0.0/4 IP literal, unless the server runs with GOATFLOW_WEBHOOK_ALLOW_PRIVATE_TARGETS=true. Host names are checked after DNS resolution on every delivery instead (a blocked address fails that delivery, not this request).

WebhookDelivery

FieldTypeRequiredDescription
attemptsintegeryes
created_atstring (date-time)yes
delivered_atstring (date-time)noOmitted until delivered
duration_msinteger, nullableyes
errorstringnoError of the last attempt; omitted when empty
eventstringyesEvent name (one of the subscribable events, or webhook.test)
idinteger (int64)yes
next_attempt_atstring (date-time)noNext retry time; omitted when none
payloadstringnoJSON envelope sent; omitted in delivery lists and when empty
responsestringnoResponse body of the last attempt (truncated to 4096 bytes); omitted in lists and when empty
statusstring, one of: pending, delivering, delivered, failedyes
status_codeinteger, nullableyesHTTP status of the last attempt; null if no response
successbooleanyes
updated_atstring (date-time)yes
webhook_idinteger (int64)yes

WebhookDeliveryResponse

FieldTypeRequiredDescription
dataWebhookDeliveryyes
successboolean, one of: trueyes

WebhookEventName

Type: string, one of: ticket.created, ticket.updated, ticket.state_changed, ticket.closed, ticket.queue_moved, ticket.assigned, ticket.priority_changed, ticket.merged, ticket.escalated, article.created

WebhookHeadersInput

Complete set of extra HTTP headers sent with every delivery, name -> value; replaces the stored set (names left out are removed, {} removes all). Values are write-only (stored encrypted, never returned). Names: valid HTTP tokens up to 256 characters, case-insensitively unique; Content-Type, Content-Length, Host, User-Agent, X-Webhook-Signature, X-Webhook-Event and X-Webhook-Delivery are reserved. Values: up to 1024 characters, no control characters. A null value keeps the value currently stored under that name (400 when none is stored, so always 400 on create).

Type: object

WebhookListResponse

FieldTypeRequiredDescription
dataarray of Webhookyes
successboolean, one of: trueyes

WebhookResponse

FieldTypeRequiredDescription
dataWebhookyes
successboolean, one of: trueyes

WebhookUpdateRequest

Any subset of the create fields; same constraints. secret "" removes the secret. Omitting headers keeps all stored headers.
FieldTypeRequiredDescription
eventsarray of WebhookEventNameno
headersWebhookHeadersInputno
is_activebooleanno
namestringno
retry_countintegerno
secretstringno
timeout_secondsintegerno
urlstringnoSame rules as on create: absolute http or https URL. 400 when the host is localhost (or *.localhost) or a loopback, private, link-local, multicast, unspecified, 0.0.0.0/8, 100.64.0.0/10 or 240.0.0.0/4 IP literal, unless the server runs with GOATFLOW_WEBHOOK_ALLOW_PRIVATE_TARGETS=true. Host names are checked after DNS resolution on every delivery instead (a blocked address fails that delivery, not this request).