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

> ## Agent Instructions
> Postploy's MCP server for posting is https://api.postploy.com/mcp and signs in with OAuth. The REST API base URL is https://api.postploy.com/public/v1 and takes an API key as a Bearer token. The API calls channels accounts.

# List channels

> The social accounts connected to your team that you can post to. Use an account's `id` as `socialAccountId` when you create posts.



## OpenAPI

````yaml /openapi.yaml get /accounts
openapi: 3.1.0
info:
  title: Postploy API
  version: '1'
  description: Schedule and manage social media posts in your Postploy team.
  contact:
    name: Postploy support
    email: support@postploy.com
servers:
  - url: https://api.postploy.com/public/v1
security:
  - apiKey: []
tags:
  - name: Channels
  - name: Posts
  - name: Approvals
  - name: Media
  - name: Trash
  - name: Webhooks
paths:
  /accounts:
    get:
      tags:
        - Channels
      summary: List channels
      description: >-
        The social accounts connected to your team that you can post to. Use an
        account's `id` as `socialAccountId` when you create posts.
      operationId: listAccounts
      responses:
        '200':
          description: Your channels.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Account'
              example:
                data:
                  - id: 5b0f4c3e-8a2d-4c51-9e7a-1d2f3a4b5c6d
                    platform: linkedin
                    name: Halo Coffee
                    username: halo-coffee
                    profileImage: https://cdn.example.com/halo.png
                    needsReconnect: false
                    lastError: null
                  - id: 0c9e8d7f-6a5b-4c3d-8e2f-1a0b9c8d7e6f
                    platform: twitter
                    name: Halo Coffee
                    username: halocoffee
                    profileImage: https://cdn.example.com/halo.png
                    needsReconnect: false
                    lastError: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    Account:
      type: object
      description: A channel, meaning a social account connected to your team.
      required:
        - id
        - platform
        - name
        - username
        - profileImage
        - needsReconnect
        - lastError
      properties:
        id:
          type: string
          format: uuid
          description: Use this as `socialAccountId` on posts.
        platform:
          $ref: '#/components/schemas/Platform'
        name:
          type: string
          description: The account's display name.
        username:
          type:
            - string
            - 'null'
        profileImage:
          type:
            - string
            - 'null'
          format: uri
        needsReconnect:
          type: boolean
          description: >-
            `true` when the platform took back Postploy's access. Someone must
            reconnect the channel in Postploy; its posts wait until then.
        lastError:
          type:
            - string
            - 'null'
          description: Why the channel last stopped working, in plain words.
    Platform:
      type: string
      description: '`twitter` is X.'
      enum:
        - linkedin
        - twitter
        - instagram
        - facebook
        - tiktok
        - youtube
    Error:
      type: object
      required:
        - statusCode
        - message
        - errors
        - timestamp
        - route
      properties:
        statusCode:
          type: integer
        message:
          type: string
          description: What went wrong, in plain words. Safe to show to people.
        errors:
          type:
            - array
            - 'null'
          description: Every problem, when there's more than one place to look.
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                description: Where the problem is, such as `["posts", 0, "scheduledAt"]`.
                items:
                  type:
                    - string
                    - integer
              cause:
                type: string
              code:
                type: string
                description: >-
                  On plan limits, `PLATFORM_LIMIT_REACHED` or
                  `TOTAL_LIMIT_REACHED`.
              platform:
                type: string
        timestamp:
          type: string
          format: date-time
        route:
          type: string
  responses:
    Unauthorized:
      description: The API key is missing, unknown or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 401
            message: Invalid API key
            errors: null
            timestamp: '2030-01-10T12:00:00.000Z'
            route: /public/v1/accounts
    Forbidden:
      description: Your role in the team doesn't allow this.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: >-
        More than 120 requests a minute to this endpoint. All of a person's keys
        count together. Wait the number of seconds in `Retry-After-caller`, then
        try again.
      headers:
        Retry-After-caller:
          description: Seconds to wait before trying again.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from **Settings › AI apps & API** in Postploy. Keys start
        with `ppk_`.

````

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