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

# List network capabilities

> Character limits, media specs, post types and options for every network.



## OpenAPI

````yaml /openapi.yaml get /v1/networks
openapi: 3.1.0
info:
  title: Nylon API
  version: 1.0.0
  description: |
    One API for publishing to twelve social networks.

    You address a post to connected profile ids; Nylon knows which network each
    one belongs to, what that network accepts, and how to get the media there.
    Character limits, media specs, upload protocols and threading rules are
    normalised before the request reaches a platform, and every failure comes
    back in one error taxonomy.

    ## Conventions

    - Request and response fields are `snake_case`.
    - Successful responses wrap the payload in `data`. List responses add
      `meta.pagination`.
    - Failures return `{ "error": { "code", "message", "details?" } }`.
      Branch on `code`; `message` is written for humans and may change.
    - Times are ISO 8601 with a `Z` offset.
    - Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and
      `RateLimit-Reset`. A `429` carries those plus `Retry-After`.
servers:
  - url: https://api.nylon.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Posts
    description: Create, schedule, inspect, edit and retry posts.
  - name: Profiles
    description: Social profiles connected to the authenticated Nylon account.
  - name: Connections
    description: Start a connection and see which networks are available.
  - name: Networks
    description: What each network accepts, as data.
  - name: Validation
    description: Dry-run a post without publishing it.
  - name: Webhooks
    description: Endpoints Nylon calls when a post finishes or a profile stops working.
paths:
  /v1/networks:
    get:
      tags:
        - Networks
      summary: List network capabilities
      description: |
        Every network's publishing rules, as data.

        This is what makes `POST /v1/posts` predictable: the character limits,
        media counts and sizes, post types and per-network options below come
        from the same table the validator enforces, so a client can check a
        post before sending it and get the same answer.

        Two text limits, and the distinction matters. `per_post` is what one
        post on the network may carry; `max` is what one request may carry. On
        the four networks that thread — X, Threads, Bluesky, Mastodon — `max`
        is much larger, because a long caption becomes a chain of replies
        rather than an error.
      operationId: listNetworks
      parameters:
        - name: network
          in: query
          description: >-
            Return one network instead of all twelve. Common aliases such as
            `twitter` resolve to `x`.
          schema:
            type: string
            example: x
      responses:
        '200':
          description: Capabilities per network.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkListResponse'
              examples:
                singleNetwork:
                  summary: GET /v1/networks?network=x
                  value:
                    data:
                      - network: x
                        label: X
                        text:
                          max: 5000
                          per_post: 280
                          max_hashtags: null
                        threads: true
                        post_types:
                          - post
                        requires_media: false
                        supports_link_only: true
                        allows_mixed_media: false
                        media:
                          image:
                            max: 4
                            max_bytes: 5242880
                          video:
                            max: 1
                            max_bytes: 536870912
                            duration_ms:
                              max: 140000
                          gif:
                            max: 1
                            max_bytes: 15728640
                        title: null
                        options:
                          - reply_settings
        '400':
          description: The `network` parameter is not a network Nylon publishes to.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    NetworkListResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/NetworkCapabilities'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    NetworkCapabilities:
      type: object
      required:
        - network
        - label
        - text
        - threads
        - post_types
        - media
      properties:
        network:
          $ref: '#/components/schemas/Network'
        label:
          type: string
          example: X
        text:
          type: object
          properties:
            max:
              type: integer
              description: Ceiling for the whole request.
              example: 5000
            per_post:
              type: integer
              description: >-
                Ceiling for a single published post. Equals `max` where there is
                no threading.
              example: 280
            max_hashtags:
              type:
                - integer
                - 'null'
              example: null
        threads:
          type: boolean
          description: Whether a long caption is published as a chain of replies.
          example: true
        post_types:
          type: array
          items:
            type: string
            enum:
              - post
              - reel
              - story
        requires_media:
          type: boolean
          description: >-
            True where a text-only post is impossible — Instagram, Pinterest,
            TikTok, YouTube.
        supports_link_only:
          type: boolean
          description: Whether a bare link with no media is a usable post.
        allows_mixed_media:
          type: boolean
          description: Whether images and videos may be mixed in one post.
        media:
          type: object
          properties:
            image:
              $ref: '#/components/schemas/MediaLimit'
            video:
              $ref: '#/components/schemas/MediaLimit'
            gif:
              $ref: '#/components/schemas/MediaLimit'
        title:
          type:
            - object
            - 'null'
          description: Length bounds for `title`, or null where the network has no title.
          properties:
            min:
              type: integer
            max:
              type: integer
        options:
          type: array
          description: >-
            The keys this network reads from `networks.<network>` on a publish
            request.
          items:
            type: string
          example:
            - reply_settings
        connectable:
          type: boolean
          description: |
            Whether this account could connect one right now. Present when
            listing all networks; availability is app credentials, not a
            static list.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: The stable identifier to branch on.
          enum:
            - invalid_request
            - unauthorized
            - payment_required
            - forbidden
            - not_found
            - conflict
            - rate_limited
            - unsupported
            - publish_failed
            - internal_error
          example: unauthorized
        message:
          type: string
          description: Written for humans. Do not match on it.
          example: A valid Nylon API key is required.
        details:
          type: array
          description: Present when the failure has a per-field or per-network breakdown.
          items:
            $ref: '#/components/schemas/ErrorDetail'
    Network:
      type: string
      description: A network Nylon publishes to.
      enum:
        - facebook
        - instagram
        - x
        - linkedin
        - pinterest
        - bluesky
        - threads
        - tiktok
        - youtube
        - google_business
        - mastodon
        - discord
      example: instagram
    MediaLimit:
      type: object
      required:
        - max
        - max_bytes
      properties:
        max:
          type: integer
          description: >-
            How many of this kind one post may carry. Zero means the network
            does not accept it.
          example: 4
        max_bytes:
          type:
            - integer
            - 'null'
          description: >-
            Per-file ceiling in bytes. Bytes, not megabytes, to avoid the MB/MiB
            ambiguity.
          example: 5242880
        duration_ms:
          type:
            - object
            - 'null'
          description: >-
            Video duration bounds in milliseconds, where the network states
            them.
          properties:
            min:
              type: integer
              example: 3000
            max:
              type: integer
              example: 140000
    ErrorDetail:
      type: object
      required:
        - message
      properties:
        field:
          type: string
          description: The request field the problem is about.
          example: profile_ids
        network:
          type: string
          description: The network the problem is about.
          example: instagram
        code:
          type: string
          description: |
            Machine-readable identifier for this problem. On a per-network
            detail this is a publishing code: `invalid_request`,
            `unsupported`, `media_error`, `reauthentication_required`,
            `rejected_by_network`, `network_error`, `timeout`,
            `profile_unavailable` or `internal_error`.
          example: invalid_request
        message:
          type: string
          example: >-
            Instagram requires at least 1 media item — text-only posts are not
            supported.
  responses:
    Unauthorized:
      description: The bearer API key is missing, malformed or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingKey:
              value:
                error:
                  code: unauthorized
                  message: A valid Nylon API key is required.
    RateLimited:
      description: |
        Too many requests for this API key. Reads allow 120 requests a minute;
        publishing endpoints allow 30, because each one costs real upstream
        calls. The limit is per key, not per IP.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            throttled:
              value:
                error:
                  code: rate_limited
                  message: Too many requests. Retry after the window resets.
    InternalError:
      description: Nylon encountered an unexpected error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  headers:
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        example: 47
    RateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
        example: 120
    RateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
        example: 119
    RateLimitReset:
      description: Seconds until the window resets.
      schema:
        type: integer
        example: 47
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Nylon API key
      description: An API key beginning with `nylon_live_`.

````