Core

Webhooks

Configure webhooks to receive real-time notifications about post status changes and account events. **Available Events:** - `post.scheduled` - When a post is successfully scheduled - `post.published` - When a post is successfully published - `post.failed` - When a post fails to publish on all platforms - `post.partial` - When a post publishes to some platforms but fails on others - `account.disconnected` - When a social account is disconnected (token expired/revoked) **Security:** - Optional HMAC-SHA256 signature sent in `X-Late-Signature` header - Configure a secret key in webhook settings to enable signature verification - Custom headers can be added to webhook requests for additional authentication

Get webhook settings

Retrieve current webhook configuration including URL, events, and status.

GET
/v1/webhooks/settings
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Response Body

application/json

application/json

curl -X GET "https://getlate.dev/api/v1/webhooks/settings"
{
  "webhookSettings": {
    "url": "https://example.com/webhook",
    "events": [
      "post.published",
      "post.failed"
    ],
    "isActive": true,
    "lastFiredAt": "2024-01-15T10:30:00Z",
    "failureCount": 0
  }
}
{
  "error": "Unauthorized"
}

Update webhook settings

Update webhook configuration. All fields are optional - only provided fields will be updated.

Note: Webhooks are automatically disabled after 10 consecutive delivery failures.

PUT
/v1/webhooks/settings
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

url?string

Webhook endpoint URL (must be HTTPS in production)

Formaturi
secret?string

Secret key for HMAC-SHA256 signature verification

events?array<string>

Events to subscribe to

isActive?boolean

Enable or disable webhook delivery

customHeaders?

Custom headers to include in webhook requests

Response Body

application/json

application/json

curl -X PUT "https://getlate.dev/api/v1/webhooks/settings" \  -H "Content-Type: application/json" \  -d '{    "url": "https://example.com/webhook",    "secret": "your-secret-key",    "events": [      "post.scheduled",      "post.published",      "post.failed",      "post.partial",      "account.disconnected"    ],    "isActive": true  }'
{
  "success": true,
  "webhookSettings": {
    "url": "http://example.com",
    "secret": "string",
    "events": [
      "post.scheduled"
    ],
    "isActive": true,
    "lastFiredAt": "2019-08-24T14:15:22Z",
    "failureCount": 0,
    "customHeaders": {
      "property1": "string",
      "property2": "string"
    }
  }
}
Empty
{
  "error": "Unauthorized"
}

Send test webhook

Send a test webhook to verify your endpoint is configured correctly. The test payload includes event: "webhook.test" to distinguish it from real events.

POST
/v1/webhooks/test
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Response Body

application/json

application/json

application/json

curl -X POST "https://getlate.dev/api/v1/webhooks/test"
{
  "success": true,
  "message": "Test webhook sent successfully"
}
{
  "error": "Unauthorized"
}
{
  "success": false,
  "message": "Test webhook failed"
}

Get webhook delivery logs

Retrieve webhook delivery history. Logs are automatically deleted after 7 days.

GET
/v1/webhooks/logs
AuthorizationBearer <token>

API key authentication - use your Late API key as a Bearer token

In: header

Query Parameters

limit?integer

Maximum number of logs to return (max 100)

Default50
Range1 <= value <= 100
status?string

Filter by delivery status

Value in"success" | "failed"
event?string

Filter by event type

Value in"post.scheduled" | "post.published" | "post.failed" | "post.partial" | "account.disconnected" | "webhook.test"

Response Body

application/json

application/json

curl -X GET "https://getlate.dev/api/v1/webhooks/logs"
{
  "logs": [
    {
      "_id": "string",
      "event": "post.scheduled",
      "url": "http://example.com",
      "status": "success",
      "statusCode": 0,
      "requestPayload": {},
      "responseBody": "string",
      "errorMessage": "string",
      "attemptNumber": 0,
      "responseTime": 0,
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": "Unauthorized"
}