Contentio API

Draft, schedule, publish and analyse LinkedIn and X content in a Contentio account, from your own app or your AI agent.

Quickstart

From nothing to your first API call in four requests.

  1. 1Register your app

    Register once with dynamic client registration (RFC 7591). Public clients use PKCE and no secret.

    Terminal
    curl -X POST https://contentio.io/oauth/register \
      -H "Content-Type: application/json" \
      -d '{
        "client_name": "My app",
        "redirect_uris": ["https://myapp.example/callback"],
        "token_endpoint_auth_method": "none",
        "grant_types": ["authorization_code", "refresh_token"],
        "response_types": ["code"]
      }'
  2. 2Send the user to sign in

    Open the authorize URL with a PKCE S256 challenge. The user signs in to Contentio and approves your app.

    URL
    https://contentio.io/oauth/authorize
      ?response_type=code
      &client_id=CLIENT_ID
      &redirect_uri=https://myapp.example/callback
      &code_challenge=CHALLENGE
      &code_challenge_method=S256
      &scope=email%20offline_access
      &state=STATE
  3. 3Exchange the code for tokens

    Your redirect URI receives code and state query parameters. Exchange the code using the PKCE verifier.

    Terminal
    curl -X POST https://contentio.io/oauth/token \
      -d grant_type=authorization_code -d code=CODE \
      -d redirect_uri=https://myapp.example/callback \
      -d client_id=CLIENT_ID -d code_verifier=VERIFIER
  4. 4Call an operation

    Every operation is a POST with a JSON body, acting as the signed-in user.

    Terminal
    curl -X POST https://contentio.io/api/v1/list_scheduled \
      -H "Authorization: Bearer ACCESS_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{}'

Operations

Every operation is POST https://contentio.io/api/v1/{operation}. Full request and response schemas are in the OpenAPI spec.

OperationWhat it does
POST /api/v1/search_contentSearch your posts, tweets, articles, ideas and series.
POST /api/v1/fetch_itemOpen one item in full by its id.
POST /api/v1/list_scheduledList what is scheduled in a date range.
POST /api/v1/get_profile_contextRead your voice, niche, traits and connected accounts.
POST /api/v1/get_analyticsRead your growth, consistency, pillar and credit analytics.
POST /api/v1/generate_postWrite a LinkedIn post draft in your voice (uses AI credits).
POST /api/v1/generate_tweetWrite a single X post (tweet) draft in your voice (uses AI credits).
POST /api/v1/create_draftSave a post or tweet draft you wrote together.
POST /api/v1/update_draftEdit an existing draft.
POST /api/v1/delete_draftDelete a draft.Needs user confirmation
POST /api/v1/schedule_contentSchedule a draft to publish to LinkedIn or X.Needs user confirmation
POST /api/v1/unschedule_contentTake a draft off the schedule.
POST /api/v1/publish_nowPublish a draft to LinkedIn or X right now.Needs user confirmation
POST /api/v1/list_seriesList your content series and their progress.
POST /api/v1/manage_seriesCreate or update a content series and its topics.

Authentication

OAuth 2.1 authorization code flow with PKCE (S256). Register with dynamic client registration, send the user to /oauth/authorize, exchange the code at /oauth/token, then send Authorization: Bearer <token>. Tokens act as the user who approved your app.

Scopes

  • email: Identify the signed-in account (the default).
  • profile: Read the account name and picture.
  • offline_access: Receive a refresh token.

Discovery

  • OpenAPI 3.1 spec

    https://contentio.io/openapi.json

    Every operation, with typed request and response schemas.

  • API index

    https://contentio.io/api/v1

    JSON list of operations.

  • Authorization server metadata

    https://contentio.io/.well-known/oauth-authorization-server

    RFC 8414: authorize, token and registration endpoints.

  • Protected resource metadata

    https://contentio.io/.well-known/oauth-protected-resource/api/v1

    RFC 9728: where to sign in and which scopes exist.

  • MCP server

    https://contentio.io/mcp

    The same actions as MCP tools for AI apps.

  • llms.txt

    https://contentio.io/llms.txt

    A guide to Contentio for language models.

Errors

Every error is JSON with a stable code, a plain-language message and, when there is a known fix, a hint.

Example
{
  "error": {
    "code": "invalid_request",
    "message": "The request body does not match this operation's schema.",
    "hint": "See the operation's requestBody schema in https://contentio.io/openapi.json.",
    "docs": "https://contentio.io/developers#errors",
    "details": [{ "path": "type", "message": "Invalid option: expected one of \"post\"|\"tweet\"" }]
  }
}
StatusCodeMeaning
400invalid_jsonThe body is not valid JSON.
400invalid_requestThe body does not match the schema; details lists each problem.
401unauthorizedMissing, invalid or expired token. The WWW-Authenticate header says where to sign in.
403plan_requiredThe account has no active paid plan.
403account_incompleteThe account has not finished setup in Contentio.
403publishing_not_allowedPublish, schedule, delete or editing a scheduled draft, before the account owner allowed connected apps to do that.
404unknown_operationNo operation at this path.
404not_foundNo API endpoint at this address.
405method_not_allowedOperations only accept POST.
422action_failedThe action could not be completed; message explains why and what to do.
429rate_limitedToo many requests; wait for Retry-After.
500internal_errorUnexpected error on our side.
503temporarily_unavailableTry again shortly with backoff.

Plans, limits and versioning

  • Every call acts as the signed-in user, inside their own account, and requires a paid Contentio plan (Plus, Premium or Creator).
  • Generation operations use the account's normal AI credits and plan limits.
  • Requests are rate limited per user, shared across the REST API and the MCP server: about 30 per minute on Plus and 60 per minute on Premium and Creator. A 429 carries Retry-After.
  • Publish, schedule and delete affect the user's real LinkedIn and X accounts or remove their work. They answer 403 publishing_not_allowed until the account owner allows them in Settings > Connections > AI apps, and even then only call them after the user confirmed that exact action.
  • Users see and disconnect connected apps in Settings > Connections; disconnecting revokes your tokens immediately.

v1 is stable: operations and fields are only ever added. Anything that would break an existing integration ships as /api/v2, announced in advance.

Questions? Email support@contentio.io or visit Support.