Generate Posts

This endpoint generates AI-powered social media post content based on the provided parameters. The AI processes the specified post_type and input to create engaging and relevant content.


Endpoint

Method: POST URL:

https://app.marketingblocks.ai/api/v1/social-sparks/create-post-generation

Authorization

All requests must include a Bearer Token with the social-post-generation permission:

Authorization: Bearer <token>

Request Body

The request body must be in JSON format and include the following parameters:

Field
Type
Required
Description

post_type

string

Yes

The type of post to generate. Determines the style and format of the content.

input

string

Yes

The main theme, topic, or subject matter for the post.

web_hook

string

No

Optional webhook URL for receiving async results.


Supported post_type values

  • text_only – A simple text-based post (e.g., updates, announcements).

  • ai_image_post – A post that includes AI-generated images.

  • ai_banner_post – A banner-style graphic post, ideal for promotions or ads.

  • breel – A dynamic video + text format, good for showcasing products.

  • talking_reel – A video featuring a speaker discussing a topic.

  • faceless_reel – A video with visuals + voiceover, without showing a person.


Example Request

curl

curl --location 'https://app.marketingblocks.ai/api/v1/social-sparks/create-post-generation' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "post_type":"breel", 
    "input": "flower sales"
    // "web_hook": "https://web-hook-url" // optional
}'

Example Response

200 OK

{
  "id": "842c8151-8f9d-4eab-ae81-6690730b8b02",
  "status": "queued",
  "message": "post generation is in queued.",
  "request_body": {
    "post_type": "breel",
    "input": "flower sales",
    "brand_id": null,
    "web_hook": null
  }
}

Response Structure

Field
Type
Description

id

string

Unique identifier for the generated post.

status

string

Status of the request (queued, success, failed).

message

string

Message with details about the outcome.

request_body

object

Echoes back the original request parameters.

brand_id

string

(Optional) Brand identifier if provided.

web_hook

string

(Optional) Webhook URL if provided.

Last updated