Webhooks

Get Delivery

Returns one delivery with the body that is sent.

GET
/v1/webhooks/{id}/deliveries/{deliveryId}

Authorization

Bearer
headerAuthorizationBearer <op_>

Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.

Path Parameters

id*string
Length1 <= length
deliveryId*string
Length1 <= length

Response Body

Delivery

application/json
  1. response
id*string
webhookId*string
eventId*string

The event's id, also sent as the Onepostly-Event-Id header.

eventType*string
status*|

pending while attempts remain, then success or failed. New values can be added, so handle a value you do not know.

attempts*integer

Times the event was sent to your endpoint so far.

responseStatus*|

HTTP status your endpoint last answered with.

lastError*|

Why the last attempt failed. Null after a success.

createdAt*string

When the event was created.

Formatdate-time
deliveredAt*|

When your endpoint accepted the event. Null until it does.

Formatdate-time
payload?unknown

The JSON body that is sent, exactly as it is signed.

Example Request
import { Configuration, WebhooksApi } from "@onepostly/sdk";const webhooksApi = new WebhooksApi(  new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await webhooksApi.getWebhookDelivery({  id: "whk_e5c7a3f18b2d4e69a04c3f9d1b7e2c58",  deliveryId: "dlv_9f3e6b2a4c1d4a8eb7f51d2c8e0a6b49",});console.log(response);
Example Response
{  "id": "dlv_9f3e6b2a4c1d4a8eb7f51d2c8e0a6b49",  "webhookId": "whk_e5c7a3f18b2d4e69a04c3f9d1b7e2c58",  "eventId": "evt_7c41e09a5b3d4f2e8a6c1b9d0e3f5a72",  "eventType": "post.published",  "status": "success",  "attempts": 1,  "responseStatus": 200,  "lastError": null,  "createdAt": "2027-03-15T09:00:04.412Z",  "deliveredAt": "2027-03-15T09:00:04.987Z",  "payload": {    "id": "evt_7c41e09a5b3d4f2e8a6c1b9d0e3f5a72",    "type": "post.published",    "createdAt": "2027-03-15T09:00:04.412Z",    "organizationId": "5b0e7c1a-2f4d-4c8e-9a3b-6d1f0e2c4a7b",    "data": {      "object": {        "id": "pst_3c8a2d6e91b44f7a8e250d6b4c1f9a73",        "groupId": "grp_7d2e5b1a9c4f4a68b3e07f1c2d9a6e45",        "accountId": "acc_YOUR_X_ACCOUNT_ID",        "platform": "x",        "source": "onepostly",        "status": "published",        "text": "New release notes are up.",        "mediaKind": "text",        "media": [],        "thread": [],        "scheduledFor": null,        "timezone": null,        "options": {},        "platformPostId": "1900876543210987654",        "url": "https://x.com/i/web/status/1900876543210987654",        "error": null,        "publishedAt": "2027-03-15T09:00:04.000Z",        "metrics": null,        "createdAt": "2027-03-15T09:00:00.000Z",        "updatedAt": "2027-03-15T09:00:04.000Z"      }    }  }}