Postly
  1. Posts
Postly
  • Overview
  • Workspaces
    • Fetch workspaces
      GET
  • Social Accounts
    • Fetch social accounts
      GET
  • Files
    • Upload a file
      POST
    • Fetch files
      GET
    • Delete a file
      DELETE
  • Posts
    • Create a post
      POST
    • Update a post
      PUT
    • Fetch a post
      GET
    • Fetch posts
      GET
    • Delete a post
      DELETE
  1. Posts

Create a post

POST
/posts
Publishes a post with optional text and media to specified target platforms
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.postly.ai/v2/posts' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY;' \
--data-raw '{
    "text": "string",
    "timezone": "string",
    "media": [
        {
            "url": "string",
            "type": "string"
        }
    ],
    "target_platforms": [
        {
            "identifier": "string",
            "id": "string"
        }
    ],
    "workspace": "string",
    "one_off_schedule": {
        "one_off_date": "string",
        "time": "string",
        "timezone": "string"
    },
    "recurring_schedule": {
        "expression": "string",
        "start_date": "string",
        "end_date": "string",
        "time": "string",
        "timezone": "string",
        "week_days": [
            {
                "num": "string",
                "value": true
            }
        ],
        "day_of_month": 0,
        "rate_value": 0,
        "rate_unit": "string"
    },
    "platform_posts": [
        {
            "identifier": "string",
            "text_override": "string",
            "media_override": [
                {
                    "url": "string",
                    "type": "string"
                }
            ],
            "settings": {
                "identifier": "string",
                "tags": [
                    "string"
                ],
                "language_tags": "string",
                "one_off_schedule": {
                    "one_off_date": "string",
                    "time": "string",
                    "timezone": "string"
                },
                "recurring_schedule": {
                    "expression": "string",
                    "start_date": "string",
                    "end_date": "string",
                    "time": "string",
                    "timezone": "string",
                    "week_days": [
                        {
                            "num": "string",
                            "value": true
                        }
                    ],
                    "day_of_month": 0,
                    "rate_value": 0,
                    "rate_unit": "string"
                }
            }
        }
    ]
}'
Response Response Example
200 - PostEnqueueSuccess
{
    "code": 200,
    "message": "Post enqueued successfully",
    "data": {
        "_id": "683594f9d6bb51f6b3000000",
        "text": "Concido terror utroque ultra vado abeo. Turbo adiuvo deinde. Arbitro terebro ducimus ubi hic ipsum vilitas viridis.",
        "media": [
            {
                "url": "https://ideal-digestive.net/",
                "type": "image/png"
            },
            {
                "url": "https://fussy-acquaintance.com/",
                "type": "video/mp4"
            }
        ],
        "timezone": "Europe/Zurich",
        "one_off_schedule": {
            "one_off_date": "2026-02-21",
            "time": "2025-05-11T04:12:10.979Z",
            "timezone": "America/Inuvik"
        },
        "recurring_schedule": {
            "expression": "cron(*)",
            "start_date": "2025-06-22",
            "end_date": "2025-04-23",
            "time": "2025-04-20T16:37:54.216Z",
            "timezone": "Arctic/Longyearbyen",
            "week_days": [
                {
                    "num": 0,
                    "value": true
                },
                {
                    "num": 2,
                    "value": true
                },
                {
                    "num": 1,
                    "value": true
                }
            ],
            "day_of_month": 10,
            "rate_value": 10,
            "rate_unit": "minute"
        },
        "created_at": "2025-05-29T07:40:45.530Z",
        "updated_at": "2025-12-29"
    }
}

Request

Authorization
API Key
Add parameter in header
X-API-KEY
Example:
X-API-KEY: ********************
or
Body Params application/json

Examples

Responses

🟢200PostCreateSuccess
application/json
Body

🟠400BadRequestResponse
🟠401UnAuthorizedResponse
Modified at 2025-05-29 23:51:42
Previous
Delete a file
Next
Update a post
Built with