Skip to main content

Content Style API

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

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. Create Content Style

Endpoint: POST /:workspaceId

Description: Creates a new content style for the specified workspace.

Parameters:

  • workspaceId (path, required): The ID of the workspace.

Request Body:

{
"name": "My New Style",
"description": "Optional description for the style"
}

Response (201 Created):

{
"success": true,
"data": {
"_id": "style_id_here",
"name": "My New Style",
"description": "Optional description for the style",
"workspaceId": "workspace_id_here",
"userId": "user_id_here",
"posts": [],
"createdAt": "2023-10-27T10:00:00.000Z",
"updatedAt": "2023-10-27T10:00:00.000Z"
}
}

Error Response (400 Bad Request):

{
"success": false,
"message": "Content style name is required"
}

2. Get All Content Styles

Endpoint: GET /:workspaceId

Description: Retrieves all content styles associated with a workspace.

Parameters:

  • workspaceId (path, required): The ID of the workspace.

Response (200 OK):

{
"success": true,
"count": 2,
"data": [
{
"_id": "style_id_1",
"name": "Style 1",
"description": "Description 1",
"posts": [...]
},
{
"_id": "style_id_2",
"name": "Style 2",
"description": "Description 2",
"posts": [...]
}
]
}

3. Get Single Content Style

Endpoint: GET /:workspaceId/:styleId

Description: Retrieves a specific content style by its ID.

Parameters:

  • workspaceId (path, required): The ID of the workspace.
  • styleId (path, required): The ID of the content style.

Response (200 OK):

{
"success": true,
"data": {
"_id": "style_id_here",
"name": "My Style",
...
}
}

Error Response (404 Not Found):

{
"success": false,
"message": "Content style not found"
}

4. Update Content Style

Endpoint: PUT /:workspaceId/:styleId

Description: Updates the name and description of a content style.

Parameters:

  • workspaceId (path, required): The ID of the workspace.
  • styleId (path, required): The ID of the content style.

Request Body:

{
"name": "Updated Style Name",
"description": "Updated description"
}

Response (200 OK):

{
"success": true,
"data": {
"_id": "style_id_here",
"name": "Updated Style Name",
"description": "Updated description",
...
}
}

5. Delete Content Style

Endpoint: DELETE /:workspaceId/:styleId

Description: Deletes a content style permanently.

Parameters:

  • workspaceId (path, required): The ID of the workspace.
  • styleId (path, required): The ID of the content style.

Response (200 OK):

{
"success": true,
"data": {}
}

6. Add Posts to Content Style

Endpoint: POST /:workspaceId/:styleId/posts

Description: Adds one or more example posts to a content style to help train the AI on the style. Maximum 5 posts at a time.

Parameters:

  • workspaceId (path, required): The ID of the workspace.
  • styleId (path, required): The ID of the content style.

Request Body:

{
"posts": [
"Example post content 1...",
"Example post content 2..."
]
}

Response (201 Created):

{
"success": true,
"count": 2,
"data": [
{
"_id": "post_id_1",
"content": "Example post content 1...",
...
},
...
]
}

7. Update Post in Content Style

Endpoint: PUT /:workspaceId/:styleId/posts/:postId

Description: Updates the content of a specific post within a content style.

Parameters:

  • workspaceId (path, required): The ID of the workspace.
  • styleId (path, required): The ID of the content style.
  • postId (path, required): The ID of the post to update.

Request Body:

{
"content": "Updated post content..."
}

Response (200 OK):

{
"success": true,
"data": {
"_id": "post_id_here",
"content": "Updated post content...",
...
}
}

8. Delete Post from Content Style

Endpoint: DELETE /:workspaceId/:styleId/posts/:postId

Description: Removes a post from a content style.

Parameters:

  • workspaceId (path, required): The ID of the workspace.
  • styleId (path, required): The ID of the content style.
  • postId (path, required): The ID of the post.

Response (200 OK):

{
"success": true,
"data": {}
}

9. Scrape LinkedIn Profile

Endpoint: GET /:workspaceId/get-posts-from-linkedin-profile

Description: Instantly scrapes posts from a provided LinkedIn profile URL.

Parameters:

  • workspaceId (path, required): The ID of the workspace.

Query Parameters:

  • profileUrl (required): The full URL of the LinkedIn profile to scrape.

Response (200 OK):

{
"success": true,
"data": [
{
"content": "Scraped post content...",
"date": "2023-10-25"
},
...
]
}

Error Response (400 Bad Request):

{
"success": false,
"message": "LinkedIn profile URL is required as query parameter"
}