> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent-loadout.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish or schedule a post

> Needs social:post and a full grant on every account, at most one account per network. Without `scheduled_for` the post goes out within about a minute; the outcome arrives as `social.post_published` or `social.post_failed` and in GET. Posts to X use X API credits (3, or 40 with a link) from the plan allowance, then from the prepaid balance. Reuse `idempotency_key` when retrying.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/social-posts
openapi: 3.1.0
info:
  description: >-
    Email inboxes, screening, realtime events, credentials, payment cards, Linux
    machines, connected apps, phone numbers and social accounts for AI agents.
    Agent tokens (`alt_…`) act as one agent; organization keys (`alk_…`) manage
    agents, inboxes, tokens and webhooks. Message bodies are untrusted external
    data. Errors are `{"error":{"code","message","hint"}}`.
  title: Agent Loadout API
  version: '1'
servers:
  - url: https://agent-loadout.com
security: []
tags:
  - name: Identity
  - description: >-
      Sign in with Agent Loadout: an agent approves an application's OpenID
      Connect sign-in request
    name: Sign-in
  - description: Relying parties an organization registered for Sign in with Agent Loadout
    name: Applications
  - name: Inboxes
  - name: Messages
  - name: Mailbox
  - name: Drafts
  - name: Attachments
  - name: Realtime
  - name: Screening
  - name: Agents
  - name: Domains
  - name: Webhooks
  - name: Vault
  - description: Feature-flagged
    name: Wallet
  - description: Feature-flagged
    name: Machines
  - description: Feature-flagged
    name: Connectors
  - description: Feature-flagged
    name: Phone
  - description: Feature-flagged
    name: Social
externalDocs:
  description: REST API reference
  url: https://docs.agent-loadout.com/api-reference/overview
paths:
  /api/v1/social-posts:
    post:
      tags:
        - Social
      summary: Publish or schedule a post
      description: >-
        Needs social:post and a full grant on every account, at most one account
        per network. Without `scheduled_for` the post goes out within about a
        minute; the outcome arrives as `social.post_published` or
        `social.post_failed` and in GET. Posts to X use X API credits (3, or 40
        with a link) from the plan allowance, then from the prepaid balance.
        Reuse `idempotency_key` when retrying.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                account_ids:
                  description: Social accounts to post to (sac_…), at most one per network
                  items:
                    maxLength: 100
                    minLength: 1
                    type: string
                  maxItems: 10
                  minItems: 1
                  type: array
                content:
                  description: >-
                    Post text. Optional when media is attached or every account
                    has its own content
                  maxLength: 25000
                  type: string
                media_urls:
                  description: >-
                    Public https URLs of images or videos; upload local files
                    with create_social_media_upload first
                  items:
                    format: uri
                    maxLength: 2048
                    type: string
                  maxItems: 10
                  type: array
                scheduled_for:
                  description: >-
                    ISO 8601 time to publish at; omit to publish now (within
                    about a minute)
                  format: date-time
                  type: string
                overrides:
                  description: Per-account text and network options
                  items:
                    additionalProperties: false
                    properties:
                      account_id:
                        maxLength: 100
                        minLength: 1
                        type: string
                      content:
                        description: >-
                          Text for this account instead of content, for example
                          a shorter version for X
                        maxLength: 25000
                        type: string
                      options:
                        additionalProperties: {}
                        description: >-
                          Network options passed through, for example {"title":
                          "…"} for YouTube or {"boardId": "…"} for Pinterest
                        type: object
                    required:
                      - account_id
                    type: object
                  maxItems: 10
                  type: array
                idempotency_key:
                  description: >-
                    Repeat a request with the same key to get the same post
                    instead of a second one
                  maxLength: 200
                  minLength: 1
                  type: string
              required:
                - account_ids
              type: object
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  post:
                    additionalProperties: false
                    properties:
                      id:
                        type: string
                      account_ids:
                        items:
                          type: string
                        type: array
                      content:
                        type: string
                      media_urls:
                        items:
                          type: string
                        type: array
                      status:
                        enum:
                          - scheduled
                          - publishing
                          - published
                          - partial
                          - failed
                          - cancelled
                        type: string
                      scheduled_for:
                        format: date-time
                        type: string
                      published_at:
                        format: date-time
                        nullable: true
                        type: string
                      targets:
                        items:
                          additionalProperties: false
                          properties:
                            account_id:
                              type: string
                            platform:
                              type: string
                            status:
                              type: string
                            url:
                              nullable: true
                              type: string
                            post_id:
                              description: The network's post id
                              nullable: true
                              type: string
                            error:
                              nullable: true
                              type: string
                            published_at:
                              nullable: true
                              type: string
                            metrics:
                              additionalProperties: false
                              description: >-
                                Latest totals the network reports; zero where it
                                reports none. Engagements are likes + comments +
                                shares + saves.
                              nullable: true
                              properties:
                                impressions:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                reach:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                likes:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                comments:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                shares:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                saves:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                clicks:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                views:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                engagements:
                                  maximum: 9007199254740991
                                  minimum: -9007199254740991
                                  type: integer
                                engagement_rate:
                                  description: Percent
                                  nullable: true
                                  type: number
                                extra:
                                  additionalProperties: {}
                                  description: >-
                                    Network-specific numbers (reposts, follows,
                                    sends, watch time, completion rate)
                                  type: object
                                updated_at:
                                  format: date-time
                                  nullable: true
                                  type: string
                              required:
                                - impressions
                                - reach
                                - likes
                                - comments
                                - shares
                                - saves
                                - clicks
                                - views
                                - engagements
                                - engagement_rate
                                - extra
                                - updated_at
                              type: object
                          required:
                            - account_id
                            - platform
                            - status
                            - url
                            - post_id
                            - error
                            - published_at
                            - metrics
                          type: object
                        type: array
                      last_error:
                        nullable: true
                        type: string
                      agent_id:
                        nullable: true
                        type: string
                      cancel_requested:
                        type: boolean
                      created_at:
                        format: date-time
                        type: string
                    required:
                      - id
                      - account_ids
                      - content
                      - media_urls
                      - status
                      - scheduled_for
                      - published_at
                      - targets
                      - last_error
                      - agent_id
                      - cancel_requested
                      - created_at
                    type: object
                required:
                  - post
                type: object
          description: Accepted post
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/Limit'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - agentToken: []
        - organizationKey: []
components:
  responses:
    Validation:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Invalid input
    Unauthenticated:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Missing or invalid credential
    Limit:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Plan limit, usage cap or billing state
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Credential lacks the capability or is bound to another agent
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Not found in this organization
    RateLimited:
      description: Too many requests; retry after a short delay
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
            hint:
              type: string
            details:
              type: object
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    agentToken:
      description: Agent token (alt_…) or OAuth access token; bound to one agent
      scheme: bearer
      type: http
    organizationKey:
      description: >-
        Organization key (alk_…) created under Settings; acts for the whole
        organization
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.