Webhooks
Get Delivery
Returns one delivery with the body that is sent.
GET
Bearerheader
AuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
id*stringLength
1 <= lengthdeliveryId*stringLength
1 <= lengthDelivery
application/json- response
id*stringwebhookId*stringeventId*stringThe event's id, also sent as the Onepostly-Event-Id header.
eventType*stringstatus*|pending while attempts remain, then success or failed. New values can be added, so handle a value you do not know.
attempts*integerTimes 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*stringWhen the event was created.
Format
date-timedeliveredAt*|When your endpoint accepted the event. Null until it does.
Format
date-timepayload?unknownThe 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" } } }}