Skip to main content

Post Generation API

Base URL: https://server.feedboss.ai/api/v1/ai-conversation

Authentication

All endpoints require authentication. You can authenticate using a Service API Key.

Service API Key

Add your Service API Key to the x-api-key header.

x-api-key: fb_live_xxxxxxxxxxxxxxxxxxxxxxxx

1. Generate Single Post

Generates a single LinkedIn post based on user input. This endpoint uses Server-Sent Events (SSE) to stream the generation progress and results.

Endpoint: POST /generate-post/:workspaceId

Path Parameters

ParameterTypeDescription
workspaceIdstringThe distinct ID of the workspace.

Request Body

FieldTypeRequiredDescription
userInputstringYesThe main topic, prompt, or context for the post.
conversationIdstringNoID of an existing conversation. If provided, the AI generates context-aware content based on history.
postIdstringNoID of an existing post. If provided and conversationId is missing, the system will look up the linked conversation.
contentStyleIdstringNoID of a predefined content style to guide the tone and format.

Response (Streaming)

The server responds with a text/event-stream. Listen for the following named events:

Event: post_ids

Sent when the post and conversation entries are successfully created/retrieved.

{
"conversationId": "60d5ecb8b5c9...",
"postId": "60d5ecb8b5c9...",
"refinementQuestions": []
}

Other Events

  • URL Processing: Updates if the input contained URLs that were scraped.
  • Chat Delta: Streaming text tokens if the AI generates a conversational response alongside the post.

2. Generate Batch Posts

Generates 5 distinctive variations of LinkedIn posts based on a single prompt. Variations include styles like "Story-driven", "Educational", "Thought-provoking", "Actionable", and "Conversational". This endpoint also supports regeneration of specific posts.

Endpoint: POST /generate-batch-posts/:workspaceId

Path Parameters

ParameterTypeDescription
workspaceIdstringThe distinct ID of the workspace.

Request Body

FieldTypeRequiredDescription
userInputstringYesThe main topic/prompt. Used as base context for all variations.
contentStyleIdstringNoOptional style ID to apply.
postIdsstring[]NoRegeneration Mode: If provided, the system will ONLY regenerate the specified drafts instead of creating 5 new variations. Usage counts against the quota based on the number of IDs.

Response (Streaming)

The server responds with a text/event-stream.

Event: batch_progress

Sent effectively before and after each post in the batch is processed.

{
"current": 1, // Current post number (1-5)
"total": 5, // Total posts in batch
"variationName": "Story-driven",
"status": "generating", // "generating", "completed", or "failed"
"postId": "..." // (Only on completion)
}

Event: post_{N}_post_ids (e.g., post_1_post_ids)

Sent for each individual post generation index (1-based) containing the specific post/conversation IDs.

Event: batch_complete

Sent when the entire batch is finished.

{
"success": true,
"originalPrompt": "User input text...",
"isRegeneration": false,
"posts": [
{
"index": 1,
"postId": "...",
"conversationId": "...",
"content": "Generated post content...",
"variationName": "Story-driven",
"status": "draft"
}
// ... up to 5 items
],
"errors": [],
"summary": {
"total": 5,
"generated": 5,
"failed": 0
}
}

Event: chat_delta

A message summarizing the result (e.g., "I've created 5 different variations...").

Common Errors (HTTP & Stream)

  • 400 Bad Request: missing userInput, invalid API key.
  • 403 Forbidden: Usage limit exceeded (e.g., not enough posts remaining in quota).

3. Update Post Content

Updates the text content of a post. This operation updates both the LinkedInPost record and the associated Conversation's current content.

[!NOTE] Only posts with status draft or scheduled can be updated.

Endpoint: PUT /post/:workspaceId/:postId

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesThe ID of the workspace.
postIdstringYesThe ID of the post to update.

Request Body

FieldTypeRequiredDescription
contentstringYesThe new text content. Max 3000 characters. Cannot be empty.

Headers

HeaderValueRequiredDescription
AuthorizationBearer <token>YesUser authentication token. Requires owner, admin, or member role.
x-api-key<api-key>YesService API key.

Response

Success (200 OK)

{
"success": true,
"data": {
"postId": "672...",
"content": "Updated content string"
},
"message": "Post content updated successfully"
}

Error Responses

  • 400 Bad Request:
    • Content is required
    • Content exceeds LinkedIn's character limit (3000 characters)
    • Cannot edit post with status: <status>. Only draft and scheduled posts can be edited.
  • 404 Not Found: Post not found
  • 500 Internal Server Error: Failed to update post content

4. Delete Post

Deletes a specific post and its associated conversation history. Use this to remove drafts or scheduled posts.

[!WARNING] This action is irreversible. The post and all its versions will be permanently deleted.

Endpoint: DELETE /post/:workspaceId/:postId

Status Constraints

  • Published Posts: Cannot be deleted via this API. You must delete published posts directly on LinkedIn.
  • Draft/Scheduled Posts: Can be deleted.

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesThe ID of the workspace.
postIdstringYesThe ID of the post to delete.

Headers

HeaderValueRequiredDescription
AuthorizationBearer <token>YesUser authentication token. Requires owner, admin, or member role.
x-api-key<api-key>YesService API key.

Response

Success (200 OK)

{
"success": true,
"message": "Post and conversation deleted successfully",
"data": {
"deletedPostId": "672...",
"deletedConversationId": "672...",
"postType": "text",
"status": "draft"
}
}

Error Responses

  • 400 Bad Request:
    • Cannot delete published post. Please delete it from LinkedIn directly.
  • 404 Not Found:
    • Post not found
  • 500 Internal Server Error:
    • Failed to delete post