Faraatarjomeh API
Pages

For AI agents: this page as Markdown at https://faraatarjomeh.com/api/v1/docs/reference/webhooks.md; all docs in one file at llms-full.txt.

API reference: Webhooks

The Webhooks endpoints (10 operations), generated from the OpenAPI document (https://faraatarjomeh.com/api/v1/openapi.json). For task-level walkthroughs use the guides; for error handling use /api/v1/docs/errors. The full reference: /api/v1/docs/reference.

At a glance#

Index#

Webhooks#

Get told when a job changes status.

GET /api/v1/webhook-endpoints/event-types#

List webhook event types

Response 200

WebhookEventTypes

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/webhook-endpoints/event-types" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/webhook-endpoints#

List webhook endpoints

All endpoints of the account (there are only a few, so no pagination).

Response 200

WebhookEndpointList

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/webhook-endpoints#

Add a webhook endpoint

The answer contains the signing secret. It is shown only once.

Parameters

Name In Type Required Notes
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json (required)

WebhookEndpointCreateRequest

Response 201

WebhookEndpointWithSecret

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url":"string"}'

GET /api/v1/webhook-endpoints/{id}#

Get a webhook endpoint

Parameters

Name In Type Required Notes
id path string yes Webhook endpoint id.

Response 200

WebhookEndpoint

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/webhook-endpoints/$ID" \
  -H "Authorization: Bearer $FARA_API_KEY"

PATCH /api/v1/webhook-endpoints/{id}#

Change a webhook endpoint

Parameters

Name In Type Required Notes
id path string yes Webhook endpoint id.
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json (required)

WebhookEndpointUpdateRequest

Response 200

WebhookEndpoint

Responses

Example

curl
curl -sS -X PATCH "https://faraatarjomeh.com/api/v1/webhook-endpoints/$ID" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/v1/webhook-endpoints/{id}#

Delete a webhook endpoint

Parameters

Name In Type Required Notes
id path string yes Webhook endpoint id.
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/webhook-endpoints/$ID" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

POST /api/v1/webhook-endpoints/{id}/rotate-secret#

Replace the signing secret

The old secret stops working at once. The new one is shown only in this answer.

Parameters

Name In Type Required Notes
id path string yes Webhook endpoint id.
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

WebhookEndpointWithSecret

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/webhook-endpoints/$ID/rotate-secret" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

POST /api/v1/webhook-endpoints/{id}/test#

Send a test event

Sends one webhook.test event now and reports what your endpoint answered. Not retried.

Parameters

Name In Type Required Notes
id path string yes Webhook endpoint id.
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

WebhookTestResult

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/webhook-endpoints/$ID/test" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

GET /api/v1/webhook-endpoints/{id}/deliveries#

List deliveries to an endpoint

Parameters

Name In Type Required Notes
id path string yes Webhook endpoint id.
limit query integer no Items per page (1-100). — default: 20; min 1; max 100
startingAfter query string no Cursor: the nextCursor (or last id) of the previous page.

Response 200

WebhookDeliveryPage

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/webhook-endpoints/$ID/deliveries" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/webhook-endpoints/{id}/deliveries/{deliveryId}/retry#

Send a failed delivery again

Parameters

Name In Type Required Notes
id path string yes Webhook endpoint id.
deliveryId path string yes Webhook delivery id.
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 202

WebhookDelivery

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/webhook-endpoints/$ID/deliveries/$DELIVERY_ID/retry" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Schemas#

Named request and response objects used above. Nested objects are flattened as parent.child; arrays as parent[].child.

WebhookDelivery#

Field Type Required Notes
id string yes Delivery id. Also the pagination cursor.
eventId string yes Same as the webhook-id header.
eventType string yes
status string yes pending, succeeded, or failed.
attempts integer no
nextAttemptAt string | null no may be null
lastAttemptAt string | null no may be null
lastResponseStatus integer | null no may be null
lastError string | null no may be null
createdAt string | null no may be null

WebhookDeliveryPage#

One page of deliveries, newest first. Kept for 30 days.

Field Type Required Notes
data object[] yes
data[].id string yes Delivery id. Also the pagination cursor.
data[].eventId string yes Same as the webhook-id header.
data[].eventType string yes
data[].status string yes pending, succeeded, or failed.
data[].attempts integer no
data[].nextAttemptAt string | null no may be null
data[].lastAttemptAt string | null no may be null
data[].lastResponseStatus integer | null no may be null
data[].lastError string | null no may be null
data[].createdAt string | null no may be null
hasMore boolean yes True when there are more items after this page.
nextCursor string | null yes Pass as startingAfter to get the next page. Null on the last page. — may be null

WebhookEndpoint#

Field Type Required Notes
id string yes
url string yes
description string no
events string[] yes Event types sent to this endpoint. ["*"] means all.
enabled boolean yes
disabledReason string | null no disabled_by_user, endpoint_gone (answered 410), or failing_for_days. — may be null
createdAt string | null no may be null
updatedAt string | null no may be null
lastSuccessAt string | null no may be null
lastFailureAt string | null no may be null

WebhookEndpointCreateRequest#

Field Type Required Notes
url string yes Public https URL that will receive events.
events string[] no Event types to send. Default ["*"] (all).
description string no Up to 200 characters.

WebhookEndpointList#

Field Type Required Notes
data object[] yes
data[].id string yes
data[].url string yes
data[].description string no
data[].events string[] yes Event types sent to this endpoint. ["*"] means all.
data[].enabled boolean yes
data[].disabledReason string | null no disabled_by_user, endpoint_gone (answered 410), or failing_for_days. — may be null
data[].createdAt string | null no may be null
data[].updatedAt string | null no may be null
data[].lastSuccessAt string | null no may be null
data[].lastFailureAt string | null no may be null

WebhookEndpointUpdateRequest#

Field Type Required Notes
url string no
events string[] no
description string no
enabled boolean no Turn the endpoint off or back on. Turning it on clears the failure count.

WebhookEndpointWithSecret#

Field Type Required Notes
id string yes
url string yes
description string no
events string[] yes Event types sent to this endpoint. ["*"] means all.
enabled boolean yes
disabledReason string | null no disabled_by_user, endpoint_gone (answered 410), or failing_for_days. — may be null
createdAt string | null no may be null
updatedAt string | null no may be null
lastSuccessAt string | null no may be null
lastFailureAt string | null no may be null
secret string yes Signing secret, whsec_ + base64. Shown only in this response. Store it safely.

WebhookEventTypes#

Field Type Required Notes
data string[] yes

WebhookTestResult#

Field Type Required Notes
deliveryId string no
eventId string no
delivered boolean no True when your endpoint answered 2xx.
responseStatus integer | null no may be null
error string | null no may be null