Docs home
ChannelDesk docs

Content drafts

Create, edit, list, and configure per-network content drafts.


Content drafts

The content record is the shared container; social post drafts hold each selected network target.

  • GET /api/v1/contents lists brand content with pagination.
  • GET /api/v1/contents/by-status filters post or Story targets by status.
  • POST /api/v1/contents/create-draft creates or reuses an empty brand draft.
  • GET /api/v1/contents/{id} restores details, attachments, and social drafts.
  • PATCH /api/v1/contents/{id}/update partially updates basic fields.
  • PUT /api/v1/contents/{id}/social-posts replaces the selected per-network drafts.

1. Create a draft

POST /api/v1/contents/create-draft

Request

{
  "brand_id": 42
}

Response - 200 OK

{
  "content_id": 1496
}

2. Update shared content fields

PATCH /api/v1/contents/1496/update. Only included fields are changed; use null to clear a field.

Request

{
  "title": "Summer offer",
  "subtitle": "Book directly",
  "description": "Save 15% this week.",
  "link": "https://example.com/summer"
}

3. Select networks and save their drafts

PUT /api/v1/contents/1496/social-posts. The targets array replaces the current selection and must contain every intended target.

Request

{
  "targets": [
    {
      "network_connection_id": 81,
      "content_type": "post",
      "image_type": "post",
      "text": "Summer offer - save 15%.",
      "title": null,
      "first_comment": "Details in the link.",
      "post_as_link": false,
      "link": "https://example.com/summer",
      "template_id": 12,
      "template_inputs": {
        "headline": "Summer offer",
        "discount": "15%"
      },
      "options": {}
    }
  ]
}

Target field rules

  • network_connection_id is required, positive, and unique in the request.
  • content_type: post, reel, story, or short.
  • image_type: post or story.
  • text max 5000, title max 255, first_comment max 2000, and link max 2048 characters.
  • template_id may be null; template_inputs and options are JSON objects.

4. Restore the editor

GET /api/v1/contents/1496 returns shared fields, attached media, and saved social post drafts.

5. List drafts

GET /api/v1/contents?brandId=42&page=1&perPage=20

For a status feed use GET /api/v1/contents/by-status?brandId=42&status=draft,scheduled&type=post&page=1&perPage=20.