API reference

Webhook endpoints

Register https endpoints for generation.completed, generation.failed, social_post.published, social_post.failed, credits.low. See the webhooks guide for payloads, retries and signature verification.

The webhook endpoint object

  • idstring

    whk_ + 32 hex characters.

  • urlstring

    Destination.

  • eventsstring[]

    Subscribed events.

  • descriptionstring

    Your label.

  • enabledboolean

    Whether deliveries are sent.

  • created_atinteger

    Unix ms.

  • secretstring

    Signing secret (whsec_…). Returned only when created.

POST/v1/webhooks
Scope: webhooksIdempotency-Key requiredReturns 201

The URL must be public https. Store secret — it is shown once.

  • urlstringrequired

    Public https URL.

  • eventsstring[]default: all events

    generation.completed, generation.failed, social_post.published, social_post.failed, credits.low

  • descriptionstring

    Up to 200 characters.

CodeWhen
LIMIT_REACHEDPlan allows 5 (Influencer) / 20 (Agency) endpoints.
VALIDATION_ERRORNot a public https URL, or no valid event.
curl -X POST https://api.oriorai.com/v1/webhooks \
  -H "Authorization: Bearer $ORIOR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/orior/webhooks",
  "events": [
    "generation.completed",
    "generation.failed"
  ],
  "description": "Production"
}'
Response
{
  "id": "whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
  "url": "https://example.com/orior/webhooks",
  "events": [
    "generation.completed",
    "generation.failed"
  ],
  "description": "Production",
  "enabled": true,
  "created_at": 1758620000000,
  "secret": "whsec_Zm9vYmFyYmF6cXV4cXV1eGNvcmdl"
}
GET/v1/webhooks
Scope: webhooksReturns 200

All endpoints.

curl https://api.oriorai.com/v1/webhooks \
  -H "Authorization: Bearer $ORIOR_API_KEY"
Response
{
  "data": [
    {
      "id": "whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
      "url": "https://example.com/orior/webhooks",
      "events": [
        "generation.completed",
        "generation.failed"
      ],
      "description": "Production",
      "enabled": true,
      "created_at": 1758620000000
    }
  ]
}
GET/v1/webhooks/{id}
Scope: webhooksReturns 200

One endpoint (without its secret).

  • idstringrequired

    Webhook ID.

curl https://api.oriorai.com/v1/webhooks/whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9 \
  -H "Authorization: Bearer $ORIOR_API_KEY"
Response
{
  "id": "whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
  "url": "https://example.com/orior/webhooks",
  "events": [
    "generation.completed",
    "generation.failed"
  ],
  "description": "Production",
  "enabled": true,
  "created_at": 1758620000000
}
DELETE/v1/webhooks/{id}
Scope: webhooksIdempotency-Key requiredReturns 200

Stops deliveries; pending retries are dropped.

  • idstringrequired

    Webhook ID.

curl -X DELETE https://api.oriorai.com/v1/webhooks/whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9 \
  -H "Authorization: Bearer $ORIOR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "id": "whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
  "object": "webhook",
  "deleted": true
}
POST/v1/webhooks/{id}/test
Scope: webhooksIdempotency-Key requiredReturns 200

Delivers a signed event with data.test: true to the endpoint, using its first subscribed event type.

  • idstringrequired

    Webhook ID.

curl -X POST https://api.oriorai.com/v1/webhooks/whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9/test \
  -H "Authorization: Bearer $ORIOR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response
{
  "object": "webhook_test",
  "webhook_id": "whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9",
  "event": "generation.completed",
  "sent": true
}
GET/v1/webhooks/{id}/deliveries
Scope: webhooksReturns 200

The last 50 deliveries (kept 30 days) with their outcome — useful when debugging an endpoint.

  • idstringrequired

    Webhook ID.

curl https://api.oriorai.com/v1/webhooks/whk_0a1b2c3d4e5f60718293a4b5c6d7e8f9/deliveries \
  -H "Authorization: Bearer $ORIOR_API_KEY"
Response
{
  "data": [
    {
      "id": "dlv_3a9f…",
      "event_id": "evt_gen_7f3c9a1e2b4d4c8f9a0b1c2d3e4f5a6b_completed",
      "type": "generation.completed",
      "status": "delivered",
      "attempts": 1,
      "last_status": 200,
      "last_error": null,
      "next_attempt_at": null,
      "created_at": 1758620000000
    }
  ]
}