Skip to main content
PUT
/
posts
/
{post}
curl -X PUT https://app.trypost.it/api/posts/9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "publishing",
    "content": "Launching now!",
    "platforms": [
      { "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", "content_type": "linkedin_post" }
    ],
    "label_ids": ["c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f"]
  }'
{
  "id": "9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
  "content": "Launching now!",
  "media": [],
  "status": "publishing",
  "scheduled_at": "2025-01-15 10:30:00",
  "published_at": null,
  "platforms": [
    {
      "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
      "platform": "linkedin",
      "content_type": "linkedin_post",
      "status": "publishing",
      "enabled": true,
      "platform_url": null,
      "published_at": null,
      "error_message": null,
      "display_name": "John Doe",
      "display_username": "johndoe",
      "display_avatar": "https://media.licdn.com/.../avatar.jpg",
      "social_account": {
        "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
        "platform": "linkedin",
        "display_name": "John Doe",
        "username": "johndoe",
        "is_active": true,
        "status": "connected"
      }
    }
  ],
  "labels": [
    {
      "id": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f",
      "name": "Product Launch",
      "color": "#4f46e5",
      "created_at": "2025-01-10 08:00:00",
      "updated_at": "2025-01-10 08:00:00"
    }
  ],
  "created_at": "2025-01-14 09:00:00",
  "updated_at": "2025-01-14 09:30:00"
}

Documentation Index

Fetch the complete documentation index at: https://docs.trypost.it/llms.txt

Use this file to discover all available pages before exploring further.

Request

post
string
required
The post ID.
status
string
required
The post status. One of:
  • draft — keep as draft
  • scheduled — schedule for the time given in scheduled_at (must be in the future)
  • publishingpublish immediately: dispatches the publish job to all enabled platforms
Cross-validated: scheduled requires a scheduled_at in the future.
content
string
The post caption/text body.
media
array
Media items to associate with the post. Most callers upload first via POST /posts/{post}/media (file) or POST /posts/{post}/media/from-url (URL) and let those endpoints append to media[] directly.
platforms
array
An array of platform entries to enable. Any platform NOT listed here will be disabled. Pass an empty array to disable all.
scheduled_at
string
ISO 8601 datetime. Required when status=scheduled.
label_ids
array
An array of label UUIDs to assign to the post. Replaces existing labels.

Response

Returns the updated post. Returns 422 with { "message": "Cannot edit a published post." } if the post has already been published.
curl -X PUT https://app.trypost.it/api/posts/9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "publishing",
    "content": "Launching now!",
    "platforms": [
      { "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", "content_type": "linkedin_post" }
    ],
    "label_ids": ["c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f"]
  }'
{
  "id": "9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
  "content": "Launching now!",
  "media": [],
  "status": "publishing",
  "scheduled_at": "2025-01-15 10:30:00",
  "published_at": null,
  "platforms": [
    {
      "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
      "platform": "linkedin",
      "content_type": "linkedin_post",
      "status": "publishing",
      "enabled": true,
      "platform_url": null,
      "published_at": null,
      "error_message": null,
      "display_name": "John Doe",
      "display_username": "johndoe",
      "display_avatar": "https://media.licdn.com/.../avatar.jpg",
      "social_account": {
        "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
        "platform": "linkedin",
        "display_name": "John Doe",
        "username": "johndoe",
        "is_active": true,
        "status": "connected"
      }
    }
  ],
  "labels": [
    {
      "id": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f",
      "name": "Product Launch",
      "color": "#4f46e5",
      "created_at": "2025-01-10 08:00:00",
      "updated_at": "2025-01-10 08:00:00"
    }
  ],
  "created_at": "2025-01-14 09:00:00",
  "updated_at": "2025-01-14 09:30:00"
}

Tips

  • To publish an existing draft, send only { "status": "publishing" } — content/platforms already saved are kept.
  • To schedule, send { "status": "scheduled", "scheduled_at": "2025-12-31T15:30:00Z" }.
  • To toggle which platforms are active without changing content, send only the platforms[] array.