ArchFindrالمطوّرون
مرجع واجهة البرمجة

Webhooks

إدارة نقاط نهاية Webhook وعمليات التسليم.

GET
/api/v1/key/webhooks

The vendor's endpoints with their last delivery status.

Requires the webhooks:read scope.

التفويض

apiKey webhooks:read
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:read

جسم الاستجابة

Success

application/json
  1. response
data*array<>
curl -X GET "https://example.com/api/v1/key/webhooks"
{  "data": [    {      "createdAt": "string",      "description": "string",      "id": "string",      "url": "string",      "events": [        "request.created"      ],      "secret": "string",      "enabled": true,      "lastStatus": "pending"    }  ]}
POST
/api/v1/key/webhooks

Adds an endpoint for request.created, request.updated, product.published or product.unpublished. The response carries the signing secret once.

Requires the webhooks:write scope.

التفويض

apiKey webhooks:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:write

جسم الطلب

application/json
  1. body
url*string
الطولlength <= 1024
events*array<>
الطول1 <= length
description?string|null
enabled?boolean

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X POST "https://example.com/api/v1/key/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "string",    "events": [      "request.created"    ]  }'
{  "data": {    "createdAt": "string",    "description": "string",    "id": "string",    "url": "string",    "events": [      "request.created"    ],    "secret": "string",    "enabled": true,    "lastStatus": "pending"  }}

One endpoint

GET
/api/v1/key/webhooks/{id}

One endpoint.

Requires the webhooks:read scope.

التفويض

apiKey webhooks:read
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:read

معاملات المسار

id*string

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X GET "https://example.com/api/v1/key/webhooks/string"
{  "data": {    "createdAt": "string",    "description": "string",    "id": "string",    "url": "string",    "events": [      "request.created"    ],    "secret": "string",    "enabled": true,    "lastStatus": "pending"  }}

Removes an endpoint and its delivery log

DELETE
/api/v1/key/webhooks/{id}

Removes an endpoint and its delivery log.

Requires the webhooks:write scope.

التفويض

apiKey webhooks:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:write

معاملات المسار

id*string

جسم الاستجابة

No content

curl -X DELETE "https://example.com/api/v1/key/webhooks/string"
فارغ

Changes the URL, events or enabled flag

PUT
/api/v1/key/webhooks/{id}

Changes the URL, events or enabled flag.

Requires the webhooks:write scope.

التفويض

apiKey webhooks:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:write

معاملات المسار

id*string

جسم الطلب

application/json
  1. body
url?string
الطولlength <= 1024
events?array<>
الطول1 <= length
description?string|null
enabled?boolean

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X PUT "https://example.com/api/v1/key/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "createdAt": "string",    "description": "string",    "id": "string",    "url": "string",    "events": [      "request.created"    ],    "secret": "string",    "enabled": true,    "lastStatus": "pending"  }}

The delivery log of an endpoint

GET
/api/v1/key/webhooks/{id}/deliveries

The delivery log of an endpoint.

Requires the webhooks:read scope.

التفويض

apiKey webhooks:read
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:read

معاملات المسار

id*string

معاملات الاستعلام

page?integer
المدى1 <= value
perPage?integer
المدى1 <= value <= 50

جسم الاستجابة

Success

application/json
  1. response
data*array<>
metadata*
curl -X GET "https://example.com/api/v1/key/webhooks/string/deliveries"
{  "data": [    {      "createdAt": "string",      "id": "string",      "status": "pending",      "payload": {},      "attempts": 0,      "deliveredAt": "string",      "durationMs": 0,      "error": "string",      "event": "string",      "responseBody": "string",      "responseStatus": 0    }  ],  "metadata": {    "total": 0,    "perPage": 0,    "currentPage": 0,    "lastPage": 0,    "firstPage": 0,    "firstPageUrl": "string",    "lastPageUrl": "string",    "nextPageUrl": "string",    "previousPageUrl": "string"  }}

Re-sends a failed delivery

POST
/api/v1/key/webhooks/{id}/deliveries/{deliveryId}/retry

Re-sends a failed delivery.

Requires the webhooks:write scope.

التفويض

apiKey webhooks:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:write

معاملات المسار

id*string
deliveryId*string

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X POST "https://example.com/api/v1/key/webhooks/string/deliveries/string/retry"
{  "data": {    "createdAt": "string",    "id": "string",    "status": "pending",    "payload": {},    "attempts": 0,    "deliveredAt": "string",    "durationMs": 0,    "error": "string",    "event": "string",    "responseBody": "string",    "responseStatus": 0  }}

Issues a new signing secret, shown once

POST
/api/v1/key/webhooks/{id}/rotate-secret

Issues a new signing secret, shown once.

Requires the webhooks:write scope.

التفويض

apiKey webhooks:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:write

معاملات المسار

id*string

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X POST "https://example.com/api/v1/key/webhooks/string/rotate-secret"
{  "data": {    "createdAt": "string",    "description": "string",    "id": "string",    "url": "string",    "events": [      "request.created"    ],    "secret": "string",    "enabled": true,    "lastStatus": "pending"  }}

Queues a test event to the endpoint

POST
/api/v1/key/webhooks/{id}/test

Queues a test event to the endpoint.

Requires the webhooks:write scope.

التفويض

apiKey webhooks:write
headerالتفويضBearer <token>

An API key created in the vendor workspace. Send it as Authorization: Bearer afk_....

النطاق: webhooks:write

معاملات المسار

id*string

جسم الاستجابة

Success

application/json
  1. response
data*
curl -X POST "https://example.com/api/v1/key/webhooks/string/test"
{  "data": {    "createdAt": "string",    "id": "string",    "status": "pending",    "payload": {},    "attempts": 0,    "deliveredAt": "string",    "durationMs": 0,    "error": "string",    "event": "string",    "responseBody": "string",    "responseStatus": 0  }}