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

# List Discord channels

> Lists the channels of a Discord account's server that TryPost's bot can post in, read from Discord and kept for 5 minutes per server. Use a channel `id` as `meta.channel_id` on a Discord destination. This endpoint also counts against a limit of 60 requests per minute per user, shared with the other Pinterest, Discord, TikTok and Instagram lookup endpoints and with the same user's channel lookups in the TryPost app.



## OpenAPI

````yaml /openapi.json get /social-accounts/{account}/channels
openapi: 3.1.0
info:
  title: TryPost API
  version: 2.0.0
  description: >-
    REST API for TryPost. Authenticate with a workspace API key as a Bearer
    token.
servers:
  - url: https://app.trypost.it/api
    description: TryPost Cloud
security:
  - bearerAuth: []
tags:
  - name: Posts
    description: Create, read, update, delete and preview posts.
  - name: Post notes
    description: Internal notes on a post, visible to workspace members.
  - name: Approvals
    description: Approve or reject posts waiting for approval.
  - name: Recurrence
    description: Make a post repeat on a schedule.
  - name: Media and uploads
    description: Upload files and attach media to posts.
  - name: Social accounts
    description: Connected social accounts and their network-specific options.
  - name: Channels
    description: A channel's posting schedule and queue.
  - name: Ideas
    description: Ideas on the Create board.
  - name: Idea stages
    description: The groups (columns) of the ideas board.
  - name: Analytics
    description: Workspace and channel insights.
  - name: Labels
    description: Labels to organize posts and ideas.
  - name: Signatures
    description: Reusable text to append to posts.
  - name: Workspace
    description: The workspace the API key belongs to.
  - name: API keys
    description: Personal API keys for this workspace.
  - name: Webhooks
    description: Outgoing webhooks and their delivery logs.
  - name: Repurposes
    description: Automations that republish videos posted outside TryPost.
  - name: Platform
    description: Platform capabilities and content types.
paths:
  /social-accounts/{account}/channels:
    parameters:
      - $ref: '#/components/parameters/AccountId'
    get:
      tags:
        - Social accounts
      summary: List Discord channels
      description: >-
        Lists the channels of a Discord account's server that TryPost's bot can
        post in, read from Discord and kept for 5 minutes per server. Use a
        channel `id` as `meta.channel_id` on a Discord destination. This
        endpoint also counts against a limit of 60 requests per minute per user,
        shared with the other Pinterest, Discord, TikTok and Instagram lookup
        endpoints and with the same user's channel lookups in the TryPost app.
      operationId: listDiscordChannels
      responses:
        '200':
          description: The server's channels.
          content:
            application/json:
              schema:
                type: object
                properties:
                  channels:
                    type: array
                    items:
                      $ref: '#/components/schemas/DiscordChannel'
              example:
                channels:
                  - id: '1123456789012345678'
                    name: announcements
                  - id: '1123456789012345679'
                    name: general
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: The account is not a Discord account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
              example:
                message: Channels are only available for Discord accounts.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          description: Discord could not be reached (timeout).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
              example:
                message: Server Error
        '502':
          description: Discord did not answer as expected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
              example:
                message: Discord channel lookup failed (503).
components:
  parameters:
    AccountId:
      name: account
      in: path
      required: true
      description: >-
        Social account (channel) id. An account of another workspace returns
        `404`.
      schema:
        type: string
        format: uuid
      example: 9c8b7a65-4d3e-4f2a-8b1c-0d9e8f7a6b54
  schemas:
    DiscordChannel:
      type: object
      properties:
        id:
          type: string
          description: >-
            Discord channel id. Send it as `meta.channel_id` on a Discord
            destination.
        name:
          type: string
    ErrorBody:
      type: object
      properties:
        message:
          type: string
    RateLimitErrorBody:
      type: object
      properties:
        name:
          type: string
          const: rate_limit_exceeded
        message:
          type: string
          examples:
            - Rate limit exceeded. Please retry after 30 seconds.
  responses:
    Unauthorized:
      description: >-
        Missing, invalid, revoked or expired API key. Bodies: `Unauthenticated.`
        (no key, or a key that is invalid or revoked), `Token expired.` (past
        its `expires_at`), `Token not found.` and `No workspace selected.` (the
        key is no longer bound to a workspace).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            message: Unauthenticated.
    PaymentRequired:
      description: >-
        TryPost Cloud only: the workspace's account has no active subscription
        or trial. Body: `{"message": "Active subscription required."}`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            message: Active subscription required.
    Forbidden:
      description: >-
        The request is not allowed. API keys work only for workspace admins (the
        account owner or a member marked as admin): otherwise every request
        returns `Insufficient workspace permissions.`. Other bodies: `Workspace
        access denied.` (the key's user left the workspace) and `Personal access
        token required.` (an MCP OAuth token was sent) and `This action is
        unauthorized.` (the note belongs to another member).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
    NotFound:
      description: The resource does not exist in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
    TooManyRequests:
      description: 'Rate limit exceeded. Limits: 60 requests per minute per workspace.'
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorBody'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Workspace API key from Settings → API Keys.

````

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