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.
| Parameter | In | Type | Required | Description |
|---|
page | query | integer | no | Page number (values < 1 or non-numeric are ignored). Default 1. |
per_page | query | integer | no | Page size; values above 100 are capped at 100. Default 20. |
limit | query | integer | no | Alias for per_page; overrides it when both are given. Capped at 100. |
offset | query | integer | no | Row offset; converted to page = offset / per_page + 1 and overrides page. |
status | query | string, one of: open, closed, pending | no | State category filter. open = new/open state types, closed =
closed state types, pending = pending state types. Any other
value is ignored. |
queue_id | query | integer | no | Only tickets in this queue. |
priority_id | query | integer | no | Only tickets with this priority. |
customer_user_id | query | string | no | Only tickets of this customer login (ticket.customer_user_id). |
assigned_user_id | query | integer | no | Only tickets whose responsible user is this user ID. |
search | query | string | no | Case-insensitive substring match on the title, or exact ticket number. |
sort | query | string, one of: created, updated, priority, tn, title | no | Sort field; unknown values sort by creation time. Default created. |
order | query | string, one of: asc, desc | no | Sort direction; any other value means desc. Default desc. |
include | query | string | no | Comma-separated extras per ticket: article_count adds
article_count, last_article adds last_article. Unknown
entries are ignored. |
| Response | Body | Description |
|---|
200 | TicketListResponse | One page of tickets |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | Agent without ro on any queue (“You do not have access to any
queues”), or a customer whose login cannot be resolved. |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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
| Response | Body | Description |
|---|
201 | TicketCreateResponse | Ticket created |
400 | ErrorResponse | Missing/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). |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | Caller is a customer, or lacks create permission on the queue |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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).
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Numeric ticket ID. (The queue-access check also resolves a ticket
number, but the handlers accept only the numeric ID.) |
| Response | Body | Description |
|---|
200 | TicketGetResponse | The ticket |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | Agent lacks ro on the ticket’s queue, or the customer’s
customer_user record was not found. |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Numeric 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
| Response | Body | Description |
|---|
200 | TicketUpdateResponse | Updated ticket |
400 | ErrorResponse | Non-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”). |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | Caller is a customer, or lacks the queue permission for the change |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Numeric ticket ID. (The queue-access check also resolves a ticket
number, but the handlers accept only the numeric ID.) |
| Response | Body | Description |
|---|
204 | | Ticket archived |
400 | ErrorResponse | Non-numeric ticket ID, or the ticket is already in a closed state type |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Numeric 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
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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Numeric ticket ID. |
include_attachments | query | string, one of: true, false | no | When exactly true, each article gets an attachments array (HTML body parts are excluded). Any other value is ignored. |
| Response | Body | Description |
|---|
200 | object | Articles of the ticket. |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Numeric ticket ID. |
Request body (required): application/json ArticleCreateRequest
| Response | Body | Description |
|---|
201 | object | Article created. |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Numeric ticket ID. |
article_id | path | integer | yes | Numeric article ID; must belong to the ticket. |
include_attachments | query | string, one of: true, false | no | When exactly true, the article gets an attachments array (HTML body parts are excluded). |
| Response | Body | Description |
|---|
200 | ArticleDetail | The article. |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
valid | query | string | no | 1 = valid queues only, 2 = invalid only; any other value is ignored (all queues). |
include_stats | query | string, one of: true, false | no | true adds ticket_count/open_tickets/closed_tickets/pending_tickets. |
filter_attribute | query | string | no | Ticket attribute (e.g. Type) whose ticket-attribute-relations restrict the list. Used only together with filter_value. |
filter_value | query | string | no | Value of filter_attribute. |
| Response | Body | Description |
|---|
200 | object | Queues visible to the caller |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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
| Response | Body | Description |
|---|
201 | object | Queue created |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
409 | ErrorResponse | The request conflicts with existing data |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Queue ID |
| Response | Body | Description |
|---|
200 | object | The queue |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Queue ID |
Request body (required): application/json QueueUpdateRequest
| Response | Body | Description |
|---|
200 | object | Queue after the update |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
409 | ErrorResponse | The request conflicts with existing data |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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).
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Queue ID |
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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Queue ID |
| Response | Body | Description |
|---|
200 | object | Ticket counters of the queue |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
valid | query | string | no | true/1/empty = valid only (default), false/0 = invalid
only, all = no filter. Case-insensitive; unknown values act as
true. Default true. |
filter_attribute | query | string | no | Ticket attribute whose ticket-attribute-relations restrict the list. Used only together with filter_value. |
filter_value | query | string | no | Value of filter_attribute. |
| Response | Body | Description |
|---|
200 | object | Priorities |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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
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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Priority ID |
| Response | Body | Description |
|---|
200 | Priority | The priority (not enveloped) |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Priority ID |
Request body (required): application/json PriorityUpdateRequest
| Response | Body | Description |
|---|
200 | PriorityEnvelope | Priority after the update |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer | yes | Priority ID |
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.
| Response | Body | Description |
|---|
200 | object | The calling agent |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Delivery ID (positive integer; otherwise 400 invalid id) |
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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Delivery ID (positive integer; otherwise 400 invalid id) |
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.
| Parameter | In | Type | Required | Description |
|---|
active | query | boolean | no | true = 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. |
| Response | Body | Description |
|---|
200 | WebhookListResponse | Webhooks ordered by name (empty array when none) |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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
GET /api/v1/webhooks/events List subscribable webhook events
Admins only. The catalogue of events a webhook can subscribe to, in display order.
| Response | Body | Description |
|---|
200 | object | Event catalogue |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
503 | ErrorResponse | A required backend (database, token verifier) is unavailable |
GET /api/v1/webhooks/{id} Get webhook
Admins only.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Webhook ID (positive integer; otherwise 400 invalid id) |
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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Webhook ID (positive integer; otherwise 400 invalid id) |
Request body (required): application/json WebhookUpdateRequest
DELETE /api/v1/webhooks/{id} Delete webhook
Admins only. Deletes the webhook and its delivery log.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Webhook ID (positive integer; otherwise 400 invalid id) |
| Response | Body | Description |
|---|
200 | object | Deleted |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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).
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Webhook ID (positive integer; otherwise 400 invalid id) |
limit | query | integer | no | Maximum number of deliveries; outside 1-200 or non-integer is 400. Default 50. |
| Response | Body | Description |
|---|
200 | object | Deliveries (empty array when none) |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
id | path | integer (int64) | yes | Webhook ID (positive integer; otherwise 400 invalid id) |
Search
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.
| Response | Body | Description |
|---|
200 | object | The caller’s saved searches |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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
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.
| Parameter | In | Type | Required | Description |
|---|
name | path | string | yes | Saved search name (search_profile.profile_name, exact match) |
| Response | Body | Description |
|---|
200 | object | The saved search |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
name | path | string | yes | Saved search name (search_profile.profile_name, exact match) |
Request body (required): application/json SearchSavedUpdateRequest
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.
| Parameter | In | Type | Required | Description |
|---|
name | path | string | yes | Saved search name (search_profile.profile_name, exact match) |
| Response | Body | Description |
|---|
204 | | Saved search deleted |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
name | path | string | yes | Saved search name (search_profile.profile_name, exact match) |
sort | query | string, one of: created, changed, priority, tn, title | no | Sort column (ties broken by ticket ID in the same direction) Default created. |
order | query | string, one of: asc, desc | no | Sort direction (case-insensitive) Default desc. |
page | query | integer | no | Page number Default 1. |
limit | query | integer | no | Page size Default 25. |
| Response | Body | Description |
|---|
200 | object | One page of matching tickets plus the saved search used |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
404 | ErrorResponse | The resource does not exist (or the caller may not see it) |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A 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.
| Parameter | In | Type | Required | Description |
|---|
q | query | string | no | Whitespace-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 |
tn | query | string | no | Ticket number |
title | query | string | no | Ticket title |
customer_id | query | string | no | Customer (company) ID |
customer_user_login | query | string | no | Customer user login |
from | query | string | no | Any article’s From |
to | query | string | no | Any article’s To or Cc |
subject | query | string | no | Any article’s subject |
body | query | string | no | Any article’s body |
state_type | query | array of string | no | State 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_id | query | array of integer (int64) | no | State IDs (positive integers), comma-separated or repeated |
queue_id | query | array of integer (int64) | no | Queue IDs (positive integers), comma-separated or repeated; still limited to readable queues |
priority_id | query | array of integer (int64) | no | Priority IDs (positive integers), comma-separated or repeated |
type_id | query | array of integer (int64) | no | Ticket type IDs (positive integers), comma-separated or repeated |
owner_id | query | array of integer (int64) | no | Owner agent IDs (positive integers), comma-separated or repeated |
responsible_id | query | array of integer (int64) | no | Responsible agent IDs (positive integers), comma-separated or repeated |
lock_id | query | array of integer (int64) | no | Lock IDs (positive integers), comma-separated or repeated |
created_after | query | string | no | Created at or after (YYYY-MM-DD, “YYYY-MM-DD HH:MM:SS” or RFC 3339) |
created_before | query | string | no | Created at or before; a bare date includes the whole day |
changed_after | query | string | no | Changed at or after (YYYY-MM-DD, “YYYY-MM-DD HH:MM:SS” or RFC 3339) |
changed_before | query | string | no | Changed at or before; a bare date includes the whole day |
sort | query | string, one of: created, changed, priority, tn, title | no | Sort column (ties broken by ticket ID in the same direction) Default created. |
order | query | string, one of: asc, desc | no | Sort direction (case-insensitive) Default desc. |
page | query | integer | no | Page number Default 1. |
limit | query | integer | no | Page size Default 25. |
| Response | Body | Description |
|---|
200 | object | One page of matching tickets |
400 | ErrorResponse | The request is malformed or fails validation |
401 | ErrorResponse | No credentials, or the token is invalid, expired or revoked |
403 | ErrorResponse | The caller is authenticated but not allowed to do this |
500 | ErrorResponse | Unexpected server or database error |
503 | ErrorResponse | A required backend (database, token verifier) is unavailable |
Schemas
ApiErrorDetail
| Field | Type | Required | Description |
|---|
code | string | yes | |
message | string | yes | |
ArticleAttachment
| Field | Type | Required | Description |
|---|
content_type | string | yes | |
disposition | string | yes | |
filename | string | yes | |
id | integer | yes | File ID of the attachment within the article. |
size | integer (int64) | yes | |
ArticleCreateRequest
| Field | Type | Required | Description |
|---|
article_sender_type_id | integer | no | Must exist in article_sender_type. |
article_type | string | no | Article type name (case-insensitive); aliases note = note-internal, email = email-external. |
body | string | yes | Required; blank -> 400 Article body is required. |
cc | string | no | |
communication_channel_id | integer | no | Must exist in communication_channel; 0/absent derives from article type. |
content_type | string | no | |
from | string | no | |
from_email | string | no | |
in_reply_to | string | no | |
incoming_time | integer (int64) | no | Unix seconds; defaults to now. |
is_visible | boolean | no | |
is_visible_for_customer | boolean | no | |
is_visible_to_customer | boolean | no | |
message_id | string | no | |
references | string | no | |
reply_to | string | no | |
sender_type | string | no | Used when article_sender_type_id is 0/absent (case-insensitive; unknown names fall back to agent). |
subject | string | no | |
time_unit | number | no | |
to | string | no | |
to_email | string | no | |
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.
| Field | Type | Required | Description |
|---|
article_sender_type_id | integer | yes | |
article_type | ArticleType | yes | |
body | string | yes | |
cc | string | no | |
communication_channel_id | integer | yes | |
content_type | string | yes | |
create_by | integer | yes | |
create_time | string (date-time) | no | |
from | string | no | |
id | integer (int64) | yes | |
is_visible_for_customer | boolean | yes | |
message_id | string | no | |
subject | string, nullable | yes | |
ticket_id | integer (int64) | yes | |
ticket_updated | boolean, one of: true | yes | |
to | string | no | |
ArticleDetail
| Field | Type | Required | Description |
|---|
article_sender_type_id | integer | yes | |
article_type | ArticleType | yes | |
attachments | array of ArticleAttachment | no | Present only with include_attachments=true. |
body | string | yes | |
cc | string | yes | |
change_by | integer | yes | |
change_time | string (date-time) | yes | |
communication_channel_id | integer | yes | |
content_type | string | yes | |
create_by | integer | yes | |
create_time | string (date-time) | yes | |
from | string | yes | Empty string when no MIME data. |
id | integer | yes | |
is_visible_for_customer | boolean | yes | |
sender_type | string | yes | Sender type name (e.g. agent, system, customer); empty if unknown. |
subject | string | yes | |
ticket_id | integer | yes | |
to | string | yes | |
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.
| Field | Type | Required | Description |
|---|
error | string or ApiErrorDetail | yes | |
success | boolean, one of: false | no | |
Priority
| Field | Type | Required | Description |
|---|
color | string | yes | |
id | integer | yes | |
name | string | yes | |
valid_id | integer | yes | |
PriorityCreateRequest
| Field | Type | Required | Description |
|---|
color | string | no | Default #cdcdcd |
name | string | yes | |
PriorityEnvelope
| Field | Type | Required | Description |
|---|
data | Priority | yes | |
success | boolean, one of: true | yes | |
PriorityMessageResponse
| Field | Type | Required | Description |
|---|
message | string | yes | |
success | boolean, one of: true | yes | |
PriorityUpdateRequest
| Field | Type | Required | Description |
|---|
color | string | no | Empty/omitted keeps the current color |
name | string | no | Always written; omitting it blanks the name |
QueueCreateRequest
| Field | Type | Required | Description |
|---|
comments | string, nullable | no | |
follow_up_id | integer | no | 0/omitted becomes 1 |
follow_up_lock | integer | no | |
group_id | integer | yes | Existing, valid group |
name | string | yes | Must be unique among all queues (valid or not) |
salutation_id | integer, nullable | no | Default 1 |
signature_id | integer, nullable | no | Default 1 |
system_address_id | integer, nullable | no | Default 1 |
unlock_timeout | integer | no | Negative values become 0 |
QueueCreated
| Field | Type | Required | Description |
|---|
comments | string, nullable | yes | |
group_id | integer | yes | |
group_name | string | yes | |
groups | array of QueueGroupRef | yes | |
id | integer | yes | |
name | string | yes | |
valid_id | integer, one of: 1 | yes | |
QueueDetail
| Field | Type | Required | Description |
|---|
comments | string | no | |
follow_up_id | integer | no | |
follow_up_lock | integer | no | |
group_id | integer | yes | |
group_name | string | yes | Empty string when the group row is missing |
groups | array of QueueGroupRef | yes | |
id | integer | yes | |
name | string | yes | |
salutation_id | integer | no | |
signature_id | integer | no | |
system_address_id | integer | no | |
unlock_timeout | integer | no | |
valid_id | integer | yes | |
QueueGroupRef
The queue’s single permission group (queue.group_id)
| Field | Type | Required | Description |
|---|
id | integer | yes | |
name | string | yes | |
QueueListItem
| Field | Type | Required | Description |
|---|
change_time | string (date-time) | no | |
closed_tickets | integer | no | |
comment | string | no | queue.comments (note the singular key in this endpoint) |
create_time | string (date-time) | no | |
follow_up_id | integer | no | |
follow_up_lock | integer | no | |
group_id | integer | no | |
group_name | string | no | |
groups | array of QueueGroupRef | yes | Empty when the queue has no group |
id | integer | yes | |
name | string | yes | |
open_tickets | integer | no | |
pending_tickets | integer | no | |
system_address_id | integer | no | |
ticket_count | integer | no | |
unlock_timeout | integer | no | |
valid | boolean | yes | valid_id == 1 |
valid_id | integer | yes | |
QueueMessageResponse
| Field | Type | Required | Description |
|---|
message | string | yes | |
success | boolean, one of: true | yes | |
QueueStats
| Field | Type | Required | Description |
|---|
closed_tickets | integer | yes | |
open_tickets | integer | yes | |
pending_tickets | integer | yes | |
total_tickets | integer | yes | |
QueueUpdateRequest
Partial update; at least one key (an empty body is 400)
| Field | Type | Required | Description |
|---|
comments | string, nullable | no | |
follow_up_id | integer | no | |
follow_up_lock | integer, one of: 0, 1 | no | |
group_id | integer | no | |
name | string | no | |
salutation_id | integer, nullable | no | |
signature_id | integer, nullable | no | |
system_address_id | integer, nullable | no | |
unlock_timeout | integer | no | Negative values become 0 |
valid_id | integer, one of: 1, 2 | no | |
QueueUpdated
| Field | Type | Required | Description |
|---|
comments | string | no | |
follow_up_id | integer | yes | |
follow_up_lock | integer | yes | |
group_id | integer | yes | |
group_name | string | yes | |
groups | array of QueueGroupRef | yes | |
id | integer | yes | |
name | string | yes | |
salutation_id | integer | no | |
signature_id | integer | no | |
system_address_id | integer | no | |
unlock_timeout | integer | yes | |
valid_id | integer | yes | |
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
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
| Field | Type | Required | Description |
|---|
pagination | object | yes | |
tickets | array of SearchTicket | yes | |
SearchSavedCreateRequest
| Field | Type | Required | Description |
|---|
name | string | yes | Must not be blank; must not already be used by the caller (409) |
parameters | SearchInputParameters | yes | |
type | string, one of: TicketSearch | no | Optional; any other non-empty value is 400 |
SearchSavedDetail
SearchSavedResponse
| Field | Type | Required | Description |
|---|
data | object | yes | |
success | boolean, one of: true | yes | |
SearchSavedSummary
| Field | Type | Required | Description |
|---|
name | string | yes | |
type | string, one of: TicketSearch | yes | |
SearchSavedUpdateRequest
SearchTicket
| Field | Type | Required | Description |
|---|
created_at | string (date-time) | yes | |
customer_id | string | yes | Empty string when NULL |
customer_user_login | string | yes | Empty string when NULL |
id | integer (int64) | yes | |
lock_id | integer (int64) | yes | |
owner_id | integer (int64) | yes | |
priority | string | yes | Priority name |
priority_id | integer (int64) | yes | |
queue | string | yes | Queue name |
queue_id | integer (int64) | yes | |
responsible_id | integer (int64) | yes | |
state | string | yes | State name |
state_id | integer (int64) | yes | |
state_type | string | yes | State type name |
title | string | yes | |
tn | string | yes | Ticket number |
type_id | integer (int64), nullable | yes | |
updated_at | string (date-time) | yes | |
TicketCreateRequest
| Field | Type | Required | Description |
|---|
body | string | no | Body of the initial article; HTML is sanitised |
customer_email | string | no | When set, a “Ticket Created” email is queued to this address |
customer_id | string | no | Customer company ID |
customer_user_id | string | no | Customer login |
priority_id | integer | no | Omitted or 0 = service default |
queue_id | integer | yes | Target queue; caller needs create permission on it |
state_id | integer | no | Omitted or 0 = service default |
title | string | yes | |
type_id | integer | no | Omitted or 0 = none/default |
TicketCreateResponse
| Field | Type | Required | Description |
|---|
data | object | yes | |
success | boolean, one of: true | yes | |
TicketGetResponse
| Field | Type | Required | Description |
|---|
data | object | yes | |
success | boolean, one of: true | yes | |
TicketListItem
| Field | Type | Required | Description |
|---|
article_count | integer | no | Only with include=article_count |
create_time | string | yes | Same as created_at |
created_at | string | yes | Creation time as returned by the database driver |
customer_id | string | yes | Customer company ID; empty string when unset |
customer_user_id | string | yes | Customer login; empty string when unset |
id | integer (int64) | yes | |
last_article | object, nullable | no | Only with include=last_article; null when the ticket has no article |
priority_id | integer | yes | |
priority_name | string | yes | |
queue_id | integer | yes | |
queue_name | string | yes | |
responsible_user_id | integer, nullable | yes | |
state_id | integer | yes | |
state_name | string | yes | |
ticket_number | string | yes | Same as tn |
title | string | yes | |
tn | string | yes | Ticket number |
update_time | string | yes | Same as updated_at |
updated_at | string | yes | Last change time as returned by the database driver |
user_id | integer | yes | Owner user ID |
TicketListResponse
| Field | Type | Required | Description |
|---|
data | array of TicketListItem | yes | |
pagination | object | yes | |
success | boolean, one of: true | yes | |
TicketRecord
| Field | Type | Required | Description |
|---|
change_by | integer | yes | |
change_time | string (date-time) | yes | |
create_by | integer | yes | |
create_time | string (date-time) | yes | |
customer_id | string | yes | Empty string when unset |
customer_user_id | string | yes | Empty string when unset |
id | integer (int64) | yes | |
priority_id | integer | yes | |
queue_id | integer | yes | |
responsible_user_id | integer | yes | 0 when unset |
state_id | integer | yes | |
ticket_lock_id | integer | yes | |
title | string | yes | |
tn | string | yes | |
type_id | integer | yes | 0 when unset |
user_id | integer | yes | Owner; 0 when unset |
TicketReopenRequest
| Field | Type | Required | Description |
|---|
reason | string | yes | Stored in the “Ticket Reopened” article |
TicketReopenResponse
| Field | Type | Required | Description |
|---|
id | integer | yes | |
reason | string | yes | |
reopened_at | string (date-time) | yes | |
state | string, one of: open | yes | |
state_id | integer | yes | |
success | boolean, one of: true | yes | |
TicketUpdateRequest
At least one field. Integer fields must be positive whole numbers.
| Field | Type | Required | Description |
|---|
customer_id | string | no | |
customer_user_id | string | no | |
priority_id | integer | no | Needs priority permission |
queue_id | integer | no | Valid queue; needs move_into on it |
responsible_user_id | integer | no | |
state_id | integer | no | |
ticket_lock_id | integer | no | 1 = unlock, 2 = lock, 3 = tmp_lock |
title | string | no | Must not be blank |
type_id | integer | no | |
user_id | integer | no | New owner (valid user); needs owner permission |
TicketUpdateResponse
| Field | Type | Required | Description |
|---|
data | TicketRecord | yes | |
success | boolean, one of: true | yes | |
UserGroupRef
| Field | Type | Required | Description |
|---|
id | integer | yes | |
name | string | yes | |
UserMe
| Field | Type | Required | Description |
|---|
active | boolean | yes | valid_id == 1 |
email | string | yes | Same as login |
first_name | string | yes | |
groups | array of UserGroupRef, nullable | yes | |
id | integer | yes | |
last_name | string | yes | |
login | string | yes | |
Webhook
| Field | Type | Required | Description |
|---|
created_at | string (date-time) | yes | |
created_by | integer | yes | |
events | array of WebhookEventName | yes | |
has_secret | boolean | yes | |
header_hints | object | yes | Custom header name -> masked hint of its value ({} when none). Values are never returned. |
id | integer (int64) | yes | |
is_active | boolean | yes | |
name | string | yes | |
retry_count | integer | yes | |
secret_hint | string | no | Masked hint of the secret; omitted when there is none |
timeout_seconds | integer | yes | |
updated_at | string (date-time) | yes | |
updated_by | integer | yes | |
url | string | yes | |
WebhookCreateRequest
| Field | Type | Required | Description |
|---|
events | array of WebhookEventName | yes | |
headers | WebhookHeadersInput | no | |
is_active | boolean | no | |
name | string | yes | Unique name (trimmed, non-empty); duplicate is 409 |
retry_count | integer | no | |
secret | string | no | HMAC signing secret, 16-512 characters; empty or omitted = unsigned |
timeout_seconds | integer | no | |
url | string | yes | 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). |
WebhookDelivery
| Field | Type | Required | Description |
|---|
attempts | integer | yes | |
created_at | string (date-time) | yes | |
delivered_at | string (date-time) | no | Omitted until delivered |
duration_ms | integer, nullable | yes | |
error | string | no | Error of the last attempt; omitted when empty |
event | string | yes | Event name (one of the subscribable events, or webhook.test) |
id | integer (int64) | yes | |
next_attempt_at | string (date-time) | no | Next retry time; omitted when none |
payload | string | no | JSON envelope sent; omitted in delivery lists and when empty |
response | string | no | Response body of the last attempt (truncated to 4096 bytes); omitted in lists and when empty |
status | string, one of: pending, delivering, delivered, failed | yes | |
status_code | integer, nullable | yes | HTTP status of the last attempt; null if no response |
success | boolean | yes | |
updated_at | string (date-time) | yes | |
webhook_id | integer (int64) | yes | |
WebhookDeliveryResponse
| Field | Type | Required | Description |
|---|
data | WebhookDelivery | yes | |
success | boolean, one of: true | yes | |
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
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
| Field | Type | Required | Description |
|---|
data | array of Webhook | yes | |
success | boolean, one of: true | yes | |
WebhookResponse
| Field | Type | Required | Description |
|---|
data | Webhook | yes | |
success | boolean, one of: true | yes | |
WebhookUpdateRequest
Any subset of the create fields; same constraints.
secret "" removes the secret. Omitting
headers keeps all stored headers.
| Field | Type | Required | Description |
|---|
events | array of WebhookEventName | no | |
headers | WebhookHeadersInput | no | |
is_active | boolean | no | |
name | string | no | |
retry_count | integer | no | |
secret | string | no | |
timeout_seconds | integer | no | |
url | string | no | Same 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). |