Skip to main content

Webhooks & Notifications

Upload-Post allows you to receive real-time notifications about your upload statuses. This is particularly useful for asynchronous uploads or scheduled posts where you don't receive an immediate confirmation of the final publish status in the API response.

Configuration

You can configure notifications in the Upload-Post Dashboard:

Configure Notifications

You can choose to receive notifications via:

  • Webhook: A POST request sent to your server with a JSON payload.
  • Telegram: A message sent to a configured Telegram chat.

Configuration via API

You can also configure your notification preferences programmatically using the API.

Endpoint: POST https://app.upload-post.com/api/uploadposts/users/notifications

Authentication: Requires a valid API Key.

Request Body:

{
"channels": {
"webhook": true,
"telegram": false
},
"webhook_url": "https://your-server.com/webhook-endpoint",
"telegram_chat_id": "123456789"
}

Response:

{
"success": true,
"notifications": {
"channels": { "webhook": true, ... },
"webhook_url": "...",
...
}
}

Webhook Payload

When an upload process completes (whether successfully or with a failure), Upload-Post sends a POST request to your configured webhook URL. The request body is a JSON object containing details about the event.

Example Payload

{
"event": "upload_completed",
"user_email": "[email protected]",
"profile_username": "your_profile_username",
"platform": "instagram",
"media_type": "video",
"title": "My Awesome Video",
"caption": "Check this out! #cool",
"result": {
"success": true,
"url": "https://www.instagram.com/p/C1234567890/",
"publish_id": "17987654321098765",
"post_id": "17987654321098765",
"error": null
},
"created_at": "2024-03-15T14:30:00.000000"
}

Field Descriptions

FieldTypeDescription
eventstringThe type of event. Currently, upload_completed.
user_emailstringThe email address of the user who initiated the upload.
profile_usernamestringThe username of the profile associated with the upload.
platformstringThe social platform where the post was uploaded (e.g., instagram, youtube, tiktok).
media_typestringThe type of media uploaded (video, photo, or text).
titlestringThe title provided for the post.
captionstringThe caption or description of the post.
resultobjectAn object containing the outcome of the upload attempt.
result.successbooleantrue if the upload was successful, false otherwise.
result.urlstringThe direct URL to the published post (if available and successful).
result.publish_idstringThe ID assigned to the post by the platform.
result.errorstringA description of the error if the upload failed.
created_atstringThe timestamp of the event in ISO 8601 format.

Usage Notes

  • Idempotency: While we strive to deliver each notification exactly once, you should handle potential duplicate events based on your own unique identifiers if necessary (though post_id or publish_id can serve this purpose for successful posts).
  • Security: Ensure your webhook endpoint is secure (HTTPS) and verify the data as needed for your application logic.