Webhook Events
PostPulse sends webhook events to notify your application about important changes in media imports and posting operations. Configure webhook endpoints at https://post-pulse.com/app/portal/webhooks to receive real-time notifications.
Overview
Webhooks are HTTP POST requests sent to your configured endpoints when specific events occur. Each webhook contains a JSON payload with event details and metadata.
Common Event Structure
{
"id": "unique-event-id",
"type": "event.type.name",
"occurredAt": "2024-01-15T10:30:00",
"data": {
// Event-specific payload
}
}Media Events
Events related to media library files: importing them from a URL and deleting them.
media.import.queued
Triggered when a media import task is created and queued for processing.
Data Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique identifier for the import task |
state | string | Current state: QUEUED, DOWNLOADING, VALIDATING, UPLOADING, READY, FAILED_TEMPORARY, FAILED_PERMANENT |
sourceUrl | string | URL of the media file being imported |
Example Payload
{
"id": "evt_123456789",
"type": "media.import.queued",
"occurredAt": "2024-01-15T10:30:00",
"data": {
"taskId": "12345",
"state": "QUEUED",
"sourceUrl": "https://example.com/video.mp4"
}
}media.import.progress
Triggered during media import processing to report progress updates.
Data Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique identifier for the import task |
state | string | Current state: DOWNLOADING, VALIDATING, UPLOADING |
bytesDownloaded | number | Number of bytes downloaded so far |
totalBytes | number | Total file size in bytes (-1 if unknown) |
detectedMime | string | Detected MIME type of the file |
Example Payload
{
"id": "evt_123456790",
"type": "media.import.progress",
"occurredAt": "2024-01-15T10:30:15",
"data": {
"taskId": "12345",
"state": "DOWNLOADING",
"bytesDownloaded": 1048576,
"totalBytes": 5242880,
"detectedMime": "video/mp4"
}
}media.import.ready
Triggered when media import completes successfully.
Data Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique identifier for the import task |
state | string | Final state of the task ("READY") |
s3Key | string | S3 key where the imported file is stored |
detectedMime | string | Detected MIME type of the file |
bytesDownloaded | number | Total bytes downloaded |
Example Payload
{
"id": "evt_123456791",
"type": "media.import.ready",
"occurredAt": "2024-01-15T10:31:00",
"data": {
"taskId": "12345",
"state": "READY",
"s3Key": "media/user123/video_12345.mp4",
"detectedMime": "video/mp4",
"bytesDownloaded": 5242880
}
}media.import.failed.temporary
Triggered when media import fails temporarily and will be retried.
Data Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique identifier for the import task |
state | string | Current state ("FAILED_TEMPORARY") |
attempts | number | Number of retry attempts made |
errorCode | string | Error code identifying the failure type |
errorMessage | string | Human-readable error description |
Example Payload
{
"id": "evt_123456792",
"type": "media.import.failed.temporary",
"occurredAt": "2024-01-15T10:30:45",
"data": {
"taskId": "12345",
"state": "FAILED_TEMPORARY",
"attempts": 2,
"errorCode": "TIMEOUT",
"errorMessage": "Connection timeout while downloading media"
}
}media.import.failed.permanent
Triggered when media import fails permanently and will not be retried.
Data Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique identifier for the import task |
state | string | Final state ("FAILED_PERMANENT") |
attempts | number | Total number of attempts made |
errorCode | string | Error code identifying the failure type |
errorMessage | string | Human-readable error description |
Example Payload
{
"id": "evt_123456793",
"type": "media.import.failed.permanent",
"occurredAt": "2024-01-15T10:35:00",
"data": {
"taskId": "12345",
"state": "FAILED_PERMANENT",
"attempts": 5,
"errorCode": "UNSUPPORTED_MIME",
"errorMessage": "File format not supported"
}
}media.deleted
Triggered when a file is deleted from the media library with DELETE /v1/media/{key}. Sent to the app whose token deleted the file. Posts deleted with the file send publication.deleted and schedule.deleted.
Data Fields
| Field | Type | Description |
|---|---|---|
s3Key | string | Path of the deleted file, as used in attachmentPaths |
Example Payload
{
"id": "evt_123456794",
"type": "media.deleted",
"occurredAt": "2026-10-30T10:47:23",
"data": {
"s3Key": "6354d8d2-e0f1-702b-af6c-62e28e377ec7/e1992700-96f5-4f0b-bd48-45d902ffbb0c.jpeg"
}
}Posting Events
Events related to social media posting operations and their lifecycle.
Post Events
post.completed
Triggered when an individual post to a social media platform completes successfully.
- scheduleId:
- publicationId:
- postId:
- status: COMPLETED
- platform:
- accountId:
- platformPostIdentifier:
post.failed
Triggered when an individual post to a social media platform fails.
- scheduleId:
- publicationId:
- postId:
- status: FAILED
- platform:
- accountId:
- errorMessage:
- errorKind: why the post failed, see Post Error Kinds below
post.partially_completed
Triggered when a WhatsApp broadcast post reaches only part of its recipients: WhatsApp refused some messages, some were not sent in time, or an error stopped the broadcast after some messages went out. Recipients who opted out are not counted.
- scheduleId:
- publicationId:
- postId:
- status: PARTIALLY_COMPLETED
- platform:
- accountId:
- errorMessage: how many messages failed and the most frequent errors, or why the broadcast stopped
- errorKind: the kind of the most frequent error or of the error that stopped the broadcast, see Post Error Kinds below
post.media_import_failed
Triggered when an attachment given as a public URL could not be imported, or the imported file does not meet the platform's requirements, so the post will not be published. This is not final: replace the attachment with an edit (PATCH /v1/posts/{id}) and the post is scheduled again. Sent once, when its posting schedule stops waiting for media; another failed import of the same schedule sends no new events. Drafts send none.
- scheduleId:
- publicationId:
- postId:
- status: MEDIA_IMPORT_FAILED
- platform:
- accountId:
- errorMessage: why the import or the media check failed; absent on a post whose own attachments imported fine and that waits for the rest of its schedule
- errorKind: MEDIA
Post Event Example
{
"id": "evt_post_123",
"type": "post.completed",
"occurredAt": "2024-01-15T14:30:00",
"data": {
"scheduleId": "schedule_456",
"publicationId": "pub_789",
"postId": "post_101112",
"status": "COMPLETED",
"platform": "TWITTER",
"accountId": "acc_twitter_123",
"platformPostIdentifier": "1234567890123456789",
"errorMessage": null
}
}Publication Events
publication.scheduled
Triggered when a platform publication is created with a scheduled time, before anything is published. Also sent when an edit (PATCH /v1/posts/{id}) brings it back to SCHEDULED, for example after the attachment whose import failed is replaced.
- scheduleId:
- publicationId:
- status: SCHEDULED
- platform:
- accountId:
publication.draft
Triggered when a platform publication is saved as a draft.
- scheduleId:
- publicationId:
- status: DRAFT
- platform:
- accountId:
publication.awaiting_media
Triggered when a platform publication is created while its media is still being imported from a URL, or when an edit (PATCH /v1/posts/{id}) adds a URL to import; it becomes scheduled once the import finishes.
- scheduleId:
- publicationId:
- status: AWAITING_MEDIA
- platform:
- accountId:
publication.media_import_failed
Triggered when a platform publication will not be published because an attachment of its posting schedule could not be imported or does not meet a platform's requirements. After an edit (PATCH /v1/posts/{id}) replaces the attachment, it moves on with publication.awaiting_media, or publication.scheduled when the new attachment is already in the media library.
- scheduleId:
- publicationId:
- status: MEDIA_IMPORT_FAILED
- platform:
- accountId:
publication.completed
Triggered when all posts in a platform publication complete successfully.
publication.failed
Triggered when all posts in a platform publication fail.
publication.partially_completed
Triggered when some posts in a platform publication succeed while others fail, or a post of it is partially completed.
publication.deleted
Triggered when a platform publication is deleted: on its own, with its whole posting schedule, or because deleting a media file left it without required media. A published publication stays on the platform unless it was deleted with deleteFromPlatform=true. Sent to the app that created the posting schedule, whoever deletes it.
- scheduleId:
- publicationId:
- status: the status at the moment of deletion
- platform:
- accountId:
- deletedFromPlatform: true when its published posts were deleted on the platform too (deleteFromPlatform=true), false when they were deleted in PostPulse only or nothing was published
Publication Deleted Event Example
{
"id": "evt_publication_127",
"type": "publication.deleted",
"occurredAt": "2026-11-03T16:16:51",
"data": {
"scheduleId": 20110,
"publicationId": 23124,
"status": "COMPLETED",
"platform": "X_TWITTER",
"accountId": 2161,
"deletedFromPlatform": true
}
}Schedule Events
schedule.completed
Triggered when all publications in a posting schedule complete successfully.
schedule.failed
Triggered when all publications in a posting schedule fail.
schedule.partially_completed
Triggered when some publications in a posting schedule succeed while others fail, or a publication of it is partially completed.
schedule.media_import_failed
Triggered when a posting schedule waiting for media from public URLs cannot be published: an import failed permanently, or an imported file does not meet a platform's requirements. Follows post.media_import_failed for each of its posts and publication.media_import_failed for each publication. Sent once; another failed import of the same schedule sends no second event, while a new failure after an edit sends it again.
- scheduleId:
- status: MEDIA_IMPORT_FAILED
schedule.deleted
Triggered when a posting schedule is deleted: by DELETE /v1/posts/{id}, by removing its last publication, or because deleting a media file left it with no publications. Follows a publication.deleted for each of its publications.
- scheduleId:
- status: the status at the moment of deletion
Schedule Event Example
{
"id": "evt_schedule_126",
"type": "schedule.completed",
"occurredAt": "2024-01-15T15:00:00",
"data": {
"scheduleId": "schedule_456",
"status": "COMPLETED"
}
}Post Error Kinds
post.failed, post.partially_completed and post.media_import_failed carry errorKind, a stable value derived from the platform's error codes, so you can handle failures without parsing errorMessage, which platforms may localize. The field is absent when a failure could not be classified. New values may be added: treat any value you do not recognize as UNKNOWN.
| Error Kind | Description | Resolution |
|---|---|---|
AUTH | The platform rejected the account's authorization (expired or revoked) | Reconnect the account |
PERMISSION | A permission the post needs was not granted or was removed | Reconnect the account and grant every requested permission |
RATE_LIMIT | The platform throttled the request or a daily publishing cap was reached | Retry later |
ACCOUNT_RESTRICTED | The platform restricted or suspended the account, or temporarily blocked it for posting too often or as spam | Wait for a temporary block to lift and post less often, or resolve it on the platform; reconnecting does not help |
MEDIA | The platform rejected the media (format, size, aspect ratio, duration, or could not fetch it), or an attachment given as a public URL could not be imported or failed the platform's media check (post.media_import_failed) | Replace the media to meet the platform's requirements |
CONTENT | The platform rejected the text or the post settings (too long, duplicate, invalid link) | Edit the post |
DESTINATION | The target page, board or chat does not exist or is not accessible | Check the destination and the account's access to it |
PLATFORM_UNAVAILABLE | The platform failed on its side | Retry later |
INTERNAL | PostPulse failed to publish the post | Retry; contact support if it persists |
BILLING | The user has no active subscription and not enough credits for the schedule's publications, so none of them was sent to the platform | Top up credits or renew the subscription |
UNKNOWN | The platform returned an error PostPulse does not classify yet | See errorMessage |
Media Import Error Codes
When media import events fail, they include specific error codes to help you understand and handle different failure scenarios.
Permanent Failure Codes
These errors indicate permanent failures that will not be retried:
| Error Code | Description | Resolution |
|---|---|---|
UNSUPPORTED_MIME | File extension is not supported or file is not image/video | Use supported image or video formats only |
FILE_TOO_LARGE | File exceeds the size limit for its type | Reduce file size or use a smaller file |
SECURITY | Security validation failed | Ensure the file and source URL are safe |
SOURCE_ERROR | HTTP 4xx error from source host or too many redirects | Check source URL accessibility and redirect chains |
Temporary Failure Codes
These errors indicate temporary failures that will be automatically retried:
| Error Code | Description | Resolution |
|---|---|---|
TIMEOUT | Socket timeout during download | Wait for automatic retry or check network connectivity |
UNEXPECTED | Unexpected error during processing | Wait for automatic retry or contact support if persistent |
Webhook Configuration
Configure webhook endpoints at PostPulse Developer Portal to receive these events. You can filter which event types you want to receive for each endpoint.
Authorization header. Compare it with your stored value (use a constant-time comparison) and reject requests that don't match before processing the event.2xx status. Any other status (including 4xx), a timeout or a connection error is retried with exponential backoff: the delay starts at the endpoint's retry backoff (1 second by default) and doubles on every attempt, and pending retries are picked up every 30 seconds. After the maximum number of attempts (8 by default) the delivery is marked as failed. You can change both values under Advanced settings when you create the endpoint. Return 2xx quickly and do slow work asynchronously.A retried event keeps its id, so deduplicate on it: if your endpoint times out after processing an event, the same event arrives again. Every attempt, with its HTTP status and response body, is listed under Deliveries for the endpoint in the Developer Portal.
Webhook Request
POST https://your-domain.com/webhooks
Content-Type: application/json
Authorization: <the API key you set on the endpoint, sent as-is>Event Types Summary
| Category | Event Types | Count |
|---|---|---|
| Media Events | import.queued, import.progress, import.ready, import.failed.temporary, import.failed.permanent, deleted | 6 |
| Post Events | completed, failed, partially_completed | 3 |
| Publication Events | scheduled, draft, awaiting_media, completed, failed, partially_completed, deleted | 7 |
| Schedule Events | completed, failed, partially_completed, deleted | 4 |
| Total | All webhook event types | 20 |
New event types are added over time. An endpoint subscribed to all events receives them as soon as they appear, so ignore any type you don't handle and still answer 2xx.