Skip to main content
POST
/
posts
curl -X POST https://app.trypost.it/api/posts \
  -H "Authorization: Bearer tp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platforms": [
      {
        "social_account_id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
        "content_type": "linkedin_post",
        "content": "Hello from the TryPost API!"
      }
    ],
    "scheduled_at": "2025-01-15 10:00:00",
    "status": "scheduled"
  }'
{
  "data": {
    "id": "9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "status": "scheduled",
    "synced": false,
    "scheduled_at": "2025-01-15 10:00:00",
    "published_at": null,
    "platforms": [
      {
        "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
        "platform": "linkedin",
        "content": "Hello from the TryPost API!",
        "content_type": "linkedin_post",
        "status": "pending",
        "enabled": true,
        "social_account": {
          "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
          "platform": "linkedin",
          "display_name": "John Doe",
          "username": "johndoe",
          "is_active": true,
          "status": "connected"
        }
      }
    ],
    "labels": [],
    "created_at": "2025-01-14 09:00:00",
    "updated_at": "2025-01-14 09:00:00"
  }
}

Request

platforms
array
required
An array of platform entries. Each entry specifies a social account and the content to publish.
scheduled_at
string
Schedule the post for a future date and time. Format: Y-m-d H:i:s. Must be in the future.
status
string
The post status. One of: draft, scheduled, publishing. Defaults to draft.

Response

Returns the created post with its platform entries.
curl -X POST https://app.trypost.it/api/posts \
  -H "Authorization: Bearer tp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "platforms": [
      {
        "social_account_id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
        "content_type": "linkedin_post",
        "content": "Hello from the TryPost API!"
      }
    ],
    "scheduled_at": "2025-01-15 10:00:00",
    "status": "scheduled"
  }'
{
  "data": {
    "id": "9f1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
    "status": "scheduled",
    "synced": false,
    "scheduled_at": "2025-01-15 10:00:00",
    "published_at": null,
    "platforms": [
      {
        "id": "a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
        "platform": "linkedin",
        "content": "Hello from the TryPost API!",
        "content_type": "linkedin_post",
        "status": "pending",
        "enabled": true,
        "social_account": {
          "id": "b2c3d4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e",
          "platform": "linkedin",
          "display_name": "John Doe",
          "username": "johndoe",
          "is_active": true,
          "status": "connected"
        }
      }
    ],
    "labels": [],
    "created_at": "2025-01-14 09:00:00",
    "updated_at": "2025-01-14 09:00:00"
  }
}