/api/v1/post
Overview
This endpoint allows users to create posts and upload files for multiple social media platforms.
Authentication
To authenticate, include the following headers in your request:
x-api-key
: Your API key (found in PostFaster.io > Profile > Settings)user-id
: Your unique user ID (found in PostFaster.io > Profile > Settings)
Request
Method: POST
URL
https://postfaster.io/api/v1/post
Headers
{
"x-api-key": "your-api-key",
"user-id": "your-user-id"
}
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
title | string | No | The title of the post. |
description | string | No | A description for the post. |
schedule | boolean | No | Flag if post is scheduled |
scheduleDate | string | No | Date ISO 8601 format in string |
files | array | No | List of files to be uploaded. |
socials | object | Yes | Social media configuration. |
Request Example (JSON)
{
"title": "New Post",
"description": "This is a test post",
"schedule": true,
"scheduleDate": "2025-03-02T16:38:30Z",
"files": [
{
"name": "image.png",
"url": "https://example.com/image.png"
}
],
"socials": {
"facebook": { "isEnabled": true },
"instagram": { "isEnabled": true }
}
}
Responses
Success Response
{
"status": "OK",
"data": {
"title": "New Post",
"description": "This is a test post",
"facebook": { "link": "https://facebook.com/post/123" },
"instagram": { "link": "https://instagram.com/p/456" }
}
}
Error Responses
Missing API Key
{
"error": "No api key found"
}
Invalid API Key
{
"error": "API key is not correct"
}
Missing User ID
{
"error": "No user ID found"
}
Invalid User ID
{
"error": "Invalid user ID Key"
}
Unauthorized Social Media Access
{
"error": "Please authorize Facebook before posting it, you can do this on www.postfaster.io"
}
File Download Error
{
"status": "ERROR",
"ErrorMessages": [
"Unable to download file image.png from: https://example.com/image.png"
]
}
Additional Notes
- Ensure that your API key is valid and linked to your account.
- If your API key is missing, generate one from PostFaster.io > Profile > Settings.
- For support, contact our helpdesk at support@postfaster.io.
Last updated on