Reference · 03 · all methods
Eight methods, one contract.
The control plane is a small, boring JSON API. Ingest is the only method your producers need; everything else is for operators: listing deliveries, reading attempt logs, replaying a failed envelope and maintaining endpoints.
00Conventions
Five rules apply to every method below. They are not repeated on the individual pages.
Authentication
All requests carry a bearer token. Tokens are created per environment and carry explicit scopes; a request without the required scope fails with 403 insufficient_scope. Tokens beginning with gx_test_ are sandbox-only, tokens beginning with gx_live_ operate on production data, and they are never interchangeable.
GET /v1/meta HTTP/1.1
Host: gateway.gitiox.com
Authorization: Bearer gx_live_7c1e0a94d2b6f8e3
Accept: application/json
x-request-id: req_client_9f3a81
An x-request-id may be supplied by the client; when it is absent Gateway generates one. Every response echoes the identifier used, in the same header and in the body.
Identifiers
Identifiers are prefixed ULIDs: lexicographically sortable, 26 characters, no leading zeros. Do not parse them for meaning beyond the prefix.
| Prefix | Resource | Example |
|---|---|---|
| evt_ | Canonical event envelope | evt_01JCA1M4Q7T3XK9Z2P8R5V6WNE |
| dlv_ | Delivery of one event to one endpoint | dlv_01JCA1M4Q7T3XK9Z2P8R5V6WNE |
| ep_ | Registered consumer endpoint | ep_01JC9Z4T7M2XQP6VF3K8N1RAWD |
| src_ | Gitiox event source | src_01J9K3M8YVQ2 |
| rpl_ | Replay of a delivery | rpl_01JCB7N2C5W8Q3M6T0V4X9Y1ZAD |
| req_ | Request correlation id | req_01JCA1M4R2D8K7N3Q5V0W6X9YZ |
Table 1 — identifier prefixes in API v1.
Timestamps and pagination
All timestamps are RFC 3339 in UTC with a trailing Z, second precision. Cursor pagination is used everywhere: pass limit and optionally starting_after, then follow next_cursor while has_more is true. Cursors are opaque and expire after 24 hours; a stale cursor returns 422 invalid_cursor and requires restarting the listing.
Idempotency and errors
Unsafe methods accept an Idempotency-Key header, valid for 24 hours. Repeating the same key with the same body returns the original response and the original identifiers; reusing a key with a different body returns 409 idempotency_reuse. Error bodies are always an object with an error.code — see errors & retries for the complete table.
Event type catalogue
Endpoints subscribe to event types by name. Wildcards are limited to one trailing .* segment, for example ci.*. The catalogue is additive; new types are announced in the changelog and never change meaning.
repository.pushrepository.branch.createdrepository.tag.deletedci.run.startedci.run.finishedrelease.publishedidentity.user.invitedidentity.user.removedaudit.export.readyservice.alert
01POST/v1/events
Publish one event to Gateway. The edge validates the token, the source binding, the optional source signature and the size limit before queueing a delivery.
Headers
| Header | Value | Description |
|---|---|---|
| Authorizationrequired | Bearer <token> | Token with the ingest:write scope, bound to the source. |
| X-Gitiox-Sourcerequired | src_… | Source the event belongs to. Must match the token binding. |
| Idempotency-Keyrecommended | 1–255 chars | Deduplicates retries for 24 hours. Returns the original delivery on repeat. |
| X-Gitiox-Signatureconditional | t=…,v1=… | Required when the source has a signing secret. HMAC-SHA256 over the raw body. |
| Content-Typerequired | application/json | UTF-8 JSON. Other media types are rejected with 415. |
Body
| Field | Type | Description |
|---|---|---|
| typerequired | string | Event type from the catalogue, e.g. repository.push. |
| occurred_atrequired | timestamp | When the event happened. Sandbox tolerance ±7 days; live tolerance ±300 s for future values. |
| actorrequired | object | Who caused the event: id, login, optional email. Service actors use login: "system". |
| targetrequired | object | The affected resource: kind, id, optional name. |
| datarequired | object | Type-specific payload. Maximum 64 KiB after serialisation; unknown keys are preserved under data.raw. |
| metadataoptional | object | Up to 20 string pairs, at most 256 characters each. Stored with the envelope and returned verbatim. |
{
"delivery_id": "dlv_01JCA1M4Q7T3XK9Z2P8R5V6WNE",
"event_id": "evt_01JCA1M4Q7T3XK9Z2P8R5V6WNE",
"status": "queued",
"endpoint_count": 2,
"accepted_at": "2026-11-24T09:42:18Z",
"request_id": "req_01JCA1M4R2D8K7N3Q5V0W6X9YZ"
}
endpoint_count is the number of endpoints subscribed to the event type at intake. When it is 0 the event is still persisted and visible for 24 hours, but no delivery is created.
02GET/v1/deliveries
List deliveries newest first, filtered by status, endpoint or event type. Each item is the same resource returned by the single-delivery method, without the attempt array.
Query parameters
| Parameter | Type | Description |
|---|---|---|
| statusoptional | enum | queued, delivering, delivered, failed or dead_letter. |
| endpoint_idoptional | string | Only deliveries to this endpoint. Prefix ep_ required. |
| event_typeoptional | string | Exact event type, no wildcards. |
| created_afteroptional | timestamp | Inclusive lower bound on created_at. Maximum window: 30 days. |
| limitoptional | integer | Page size, 1–100. Default 25. |
| starting_afteroptional | string | Opaque cursor from next_cursor. Do not construct cursors by hand. |
curl -sS -G "https://gateway.gitiox.com/v1/deliveries" \
-H "Authorization: Bearer $GITIOX_TOKEN" \
--data-urlencode "status=dead_letter" \
--data-urlencode "endpoint_id=ep_01JC9Z4T7M2XQP6VF3K8N1RAWD" \
--data-urlencode "limit=25"
{
"object": "list",
"data": [
{
"id": "dlv_01JCB2P6R8V4M1Q7T3X9Z5W0NEC",
"status": "dead_letter",
"event_type": "ci.run.finished",
"endpoint_id": "ep_01JC9Z4T7M2XQP6VF3K8N1RAWD",
"attempts": 8,
"created_at": "2026-11-21T18:03:41Z",
"last_attempt_at": "2026-11-22T00:03:52Z",
"purge_at": "2026-11-29T00:03:52Z"
}
],
"has_more": false,
"next_cursor": null,
"request_id": "req_01JCB2P7A1C3E5G7J9L1N3P5Q7R"
}
03GET/v1/deliveries/{id}
Read one delivery including every attempt: response code, latency, error class and the request id used at the consumer. This is the object to attach to a support ticket.
Path and query parameters
| Parameter | Type | Description |
|---|---|---|
| idrequired | string | Delivery identifier with the dlv_ prefix. |
| include_headersoptional | boolean | Include the first 2 KiB of the consumer response headers. Default false. |
| include_bodyoptional | boolean | Include up to 4 KiB of the consumer response body. Default false; may contain sensitive data. |
{
"id": "dlv_01JCA1M4Q7T3XK9Z2P8R5V6WNE",
"status": "delivered",
"event": {
"id": "evt_01JCA1M4Q7T3XK9Z2P8R5V6WNE",
"type": "repository.push",
"occurred_at": "2026-11-24T09:42:18Z"
},
"endpoint": {
"id": "ep_01JC9Z4T7M2XQP6VF3K8N1RAWD",
"url": "https://ops.example.net/hooks/gitiox"
},
"created_at": "2026-11-24T09:42:18Z",
"delivered_at": "2026-11-24T09:42:19Z",
"next_retry_at": null,
"attempts": [
{
"n": 1,
"at": "2026-11-24T09:42:19Z",
"status_code": 200,
"latency_ms": 184,
"outcome": "delivered",
"request_id": "req_01JCA1M4R2D8K7N3Q5V0W6X9YZ"
}
]
}
Response capture
include_body returns consumer data to the caller. It is disabled for tokens without the deliveries:read_raw scope, and every use is written to the audit log.
04POST/v1/deliveries/{id}/replay
Queue a fresh delivery of an existing envelope. Replay re-signs with a current timestamp, starts a new attempt counter and accepts an optional endpoint override introduced in 1.8.
Body
| Field | Type | Description |
|---|---|---|
| reasonrequired | string | 3–200 characters. Stored on the replay record and visible in the audit log. |
| endpoint_idoptional | string | Deliver to another endpoint instead of the original. The envelope is unchanged. |
| max_attemptsoptional | integer | Override the retry budget for this replay, 1–8. Defaults to the original delivery budget. |
curl -sS -X POST \
"https://gateway.gitiox.com/v1/deliveries/dlv_01JCA1M4Q7T3XK9Z2P8R5V6WNE/replay" \
-H "Authorization: Bearer $GITIOX_TOKEN" \
-H "Idempotency-Key: replay-drain-4471" \
-H "Content-Type: application/json" \
-d '{
"reason": "drain backlog to the new consumer",
"endpoint_id": "ep_01JCC3Q8S2V7M4T1R6X9Z0W5NEQ",
"max_attempts": 4
}'
The response is 202 with replay_id, scheduled_at and the resolved endpoint_id. Replay is refused with 409 not_replayable when the delivery is already queued or delivering, and with 410 delivery_purged after the seven-day retention window.
05GET/v1/endpoints
List registered consumers with their subscription filter, health and concurrency cap. Secrets are never included.
| Parameter | Type | Description |
|---|---|---|
| activeoptional | boolean | Filter paused endpoints in or out. Omit for both. |
| limitoptional | integer | Page size, 1–100. Default 25. |
| starting_afteroptional | string | Opaque cursor from a previous page. |
06POST/v1/endpoints
Register a consumer URL. The signing secret is generated server-side and returned exactly once in the 201 response.
| Field | Type | Description |
|---|---|---|
| urlrequired | string | Absolute HTTPS URL, no query string, no fragment. HTTP and loopback addresses are refused. |
| eventsrequired | string[] | One or more event types, or ["*"] for the whole catalogue. Wildcards only as a trailing .*. |
| descriptionoptional | string | Free text up to 120 characters, shown in the console. |
| activeoptional | boolean | Start delivering immediately. Default true. |
| max_concurrencyoptional | integer | Parallel deliveries to this endpoint, 1–50. Default 8. Added in 1.8. |
| metadataoptional | object | Up to 20 string pairs for your own inventory tooling. |
Secret handling
The response field signing_secret appears once. Store it in the consumer's secret manager before the deploy that starts receiving traffic; rotate later with PATCH /v1/endpoints/{id} and a 24-hour overlap.
07PATCH/v1/endpoints/{id}
Update the URL, filter, description, concurrency cap or active flag, and rotate the signing secret. Omitted fields are left untouched; null is never accepted.
| Field | Type | Description |
|---|---|---|
| urloptional | string | New HTTPS URL. In-flight attempts continue to the old URL and are not re-delivered. |
| eventsoptional | string[] | Replaces the whole filter. Removed types stop receiving deliveries immediately. |
| activeoptional | boolean | Pausing keeps queued deliveries and stops new attempts. |
| rotate_secretoptional | boolean | When true, returns a new signing_secret. The old secret stays valid for 24 hours. |
curl -sS -X PATCH \
"https://gateway.gitiox.com/v1/endpoints/ep_01JC9Z4T7M2XQP6VF3K8N1RAWD" \
-H "Authorization: Bearer $GITIOX_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "rotate_secret": true }'
08GET/v1/meta
Service discovery for the region: API version, manual edition, retry schedule and current server time. The only method that does not require a token.
{
"service": "gitiox-gateway",
"api_version": "v1",
"release": "1.8.3",
"region": "eu-north-1",
"server_time": "2026-11-26T14:02:11Z",
"retry_schedule_seconds": [0, 30, 120, 600, 1800, 3600, 5400, 7200],
"signature_tolerance_seconds": 300,
"limits": {
"ingest_per_minute": 3000,
"control_requests_per_minute": 600,
"replays_per_minute": 60,
"max_payload_bytes": 1048576
}
}
09Headers & rate limits
Request headers
| Header | Used by | Notes |
|---|---|---|
| Authorization | all except /v1/meta | Bearer token. Never send it from a browser. |
| Idempotency-Key | POST, PATCH | 24-hour window; key scope is the token, not the resource. |
| x-request-id | all | Optional client id, echoed in response header and body. Max 64 chars. |
| Accept-Encoding | all | gzip supported. Payload limits apply after decompression. |
Response headers
| Header | Example | Meaning |
|---|---|---|
| x-request-id | req_01JCA1M4R2D8K7N3Q5V0W6X9YZ | Correlation id for this request. Quote it in tickets. |
| x-ratelimit-limit | 600 | Requests allowed in the current window. |
| x-ratelimit-remaining | 571 | Remaining requests in the window. |
| x-ratelimit-reset | 38 | Seconds until the window resets. |
| retry-after | 12 | Present on 429 and 503. Seconds to wait before retrying. |
| x-gateway-region | eu-north-1 | Region that served the request. |
Rate limit classes
| Class | Limit | Burst | Applies to |
|---|---|---|---|
| ingest | 3,000 / min | 500 | POST /v1/events, per source |
| control | 600 / min | 120 | All GET and POST control-plane methods, per token |
| replay | 60 / min | 10 | POST /v1/deliveries/{id}/replay, per token |
Table 2 — rate-limit classes. Windows are fixed 60-second windows aligned to the minute.
Next
The complete error table, retry schedule and dead-letter semantics are on the errors & retries page. If you are integrating for the first time, start with the quickstart.