Skip to main content

Documentation Index

Fetch the complete documentation index at: https://dev.magicpost.in/llms.txt

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

These endpoints let you manage the full lifecycle of a LinkedIn post — from draft creation through content updates. To schedule or publish a post, see Scheduling.

GET /api/v1/posts

List your posts filtered by lifecycle status. Query parameters
ParameterTypeDefaultDescription
statusstringscheduledFilter by status: draft, scheduled, or published
limitinteger20Number of posts to return. Clamped to 1–100.
offsetinteger0Number of posts to skip for pagination.
curl "https://api.magicpost.in/api/v1/posts?status=scheduled&limit=10" \
  -H "Authorization: Bearer mp_xxx"
Response
{
  "status": "scheduled",
  "limit": 10,
  "offset": 0,
  "posts": [
    {
      "id": "uuid",
      "post_content": "Multiple\n\nline post.",
      "created_at": "2026-05-12T10:00:00Z",
      "date_post": "2026-05-20",
      "hour_post": "14:00",
      "schedule_date": "2026-05-20T12:00:00Z",
      "schedule_timezone": "Europe/Paris",
      "planified_post": true,
      "published_post": false,
      "linked_in_url_post": null,
      "word_count": 152,
      "type": "Actionable",
      "category": "Education",
      "approved": null
    }
  ]
}

GET /api/v1/posts/<post_id>

Fetch a single post in full. Returns 404 if the post doesn’t exist or isn’t owned by you.
curl https://api.magicpost.in/api/v1/posts/uuid \
  -H "Authorization: Bearer mp_xxx"
The response shape matches a single object from the posts array in GET /api/v1/posts.

POST /api/v1/posts

Create a new draft post. Request body
{ "content": "Hello LinkedIn world\n\nThis is line 2." }
FieldTypeRequiredDescription
contentstringYesThe text of your post. Line breaks (\n) are preserved and rendered on LinkedIn.
The API accepts text only in v1. To add images, videos, polls, or @mentions, use the MagicPost web app after creating the draft.
Response (HTTP 201)
{ "success": true, "post_id": "new-uuid", "created": true }

PATCH /api/v1/posts/<post_id>

Update the text content of an existing post. Request body
{ "content": "Updated text." }
FieldTypeRequiredDescription
contentstringYesThe replacement text for the post.
curl -X PATCH https://api.magicpost.in/api/v1/posts/uuid \
  -H "Authorization: Bearer mp_xxx" \
  -H "Content-Type: application/json" \
  -d '{"content": "Updated text."}'
Response
{ "success": true, "post_id": "uuid", "created": false }
Returns 404 if the post doesn’t exist or isn’t owned by you. Both cases surface as 404 to avoid leaking ownership information (IDOR guard).