Skip to content

Posts

Posts API

Create, retrieve, and manage scheduled posts.

Create Post

POST /v1/posts

Create a new scheduled post.

Request Body

FieldTypeRequiredDescription
channelstringYesChannel ID to post to
contentstringYesPost content (max 280 chars for Twitter)
scheduledForstringYesISO 8601 timestamp or "now"
mediaIdsstring[]NoArray of uploaded media IDs

Example Request

Terminal window
curl -X POST https://api.flowsocial.app/v1/posts \
-H "Authorization: Bearer flow_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"channel": "ch_abc123",
"content": "Hello from Flow!",
"scheduledFor": "2024-01-15T10:00:00Z"
}'

Example Response

{
"id": "post_xyz789",
"channel": "ch_abc123",
"content": "Hello from Flow!",
"status": "scheduled",
"scheduledFor": "2024-01-15T10:00:00Z",
"createdAt": "2024-01-14T15:30:00Z"
}

Get Post

GET /v1/posts/:id

Retrieve a specific post by ID.

Example Response

{
"id": "post_xyz789",
"channel": "ch_abc123",
"content": "Hello from Flow!",
"status": "published",
"scheduledFor": "2024-01-15T10:00:00Z",
"publishedAt": "2024-01-15T10:00:05Z",
"platformPostId": "1234567890",
"createdAt": "2024-01-14T15:30:00Z"
}

List Posts

GET /v1/posts

List posts with optional filters.

Query Parameters

ParameterTypeDescription
channelstringFilter by channel ID
statusstringFilter by status: scheduled, published, failed
limitnumberResults per page (default: 20, max: 100)
cursorstringPagination cursor

Example Response

{
"data": [
{
"id": "post_xyz789",
"channel": "ch_abc123",
"content": "Hello from Flow!",
"status": "scheduled",
"scheduledFor": "2024-01-15T10:00:00Z",
"createdAt": "2024-01-14T15:30:00Z"
}
],
"hasMore": true,
"nextCursor": "eyJpZCI6InBvc3RfeHl6Nzg5In0"
}

Delete Post

DELETE /v1/posts/:id

Delete a scheduled post. Only posts with status scheduled can be deleted.

Example Response

{
"deleted": true
}

Post Statuses

StatusDescription
scheduledPost is queued for publishing
publishingPost is being published
publishedPost was successfully published
failedPost failed to publish