Threads API

Publish and manage content on Threads, Meta's text-based social platform. Create posts and carousels, retrieve and moderate replies, access insights, and manage creator profiles at scale.

OpenAPI Specification

facebook-threads-api.yaml Raw ↑
openapi: 3.0.3
info:
  title: Facebook Threads API
  description: >-
    Publish and manage content on Threads, Meta's text-based social platform.
    Create posts and carousels, retrieve and moderate replies, access insights,
    and manage creator profiles.
  version: '1.0'
  contact:
    name: Meta Platforms
    url: https://developers.facebook.com
  x-generated-from: documentation
  x-last-validated: '2026-04-18'
servers:
  - url: https://graph.threads.net/v1.0
    description: Threads API v1.0
security:
  - BearerAuth: []
paths:
  /{threads-user-id}:
    get:
      operationId: getThreadsUser
      summary: Facebook Get Threads User
      description: Retrieve a Threads user profile.
      tags:
        - Users
      parameters:
        - name: threads-user-id
          in: path
          required: true
          description: The Threads user ID.
          schema:
            type: string
          example: '12345678901234567'
        - name: fields
          in: query
          description: Comma-separated list of fields.
          schema:
            type: string
          example: id,username,threads_profile_picture_url,threads_biography
      responses:
        '200':
          description: Threads user retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadsUser'
              examples:
                GetThreadsUser200Example:
                  summary: Default getThreadsUser 200 response
                  x-microcks-default: true
                  value:
                    id: '12345678901234567'
                    username: examplebrand
                    threads_biography: Sharing ideas and updates
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /{threads-user-id}/threads:
    post:
      operationId: createThreadsMedia
      summary: Facebook Create Threads Media
      description: Create a media container for a Threads post.
      tags:
        - Publishing
      parameters:
        - name: threads-user-id
          in: path
          required: true
          description: The Threads user ID.
          schema:
            type: string
          example: '12345678901234567'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThreadsPostRequest'
            examples:
              CreateThreadsMediaRequestExample:
                summary: Default createThreadsMedia request
                x-microcks-default: true
                value:
                  media_type: TEXT
                  text: Hello Threads! This is my first post.
      responses:
        '200':
          description: Media container created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /{threads-user-id}/threads_publish:
    post:
      operationId: publishThreadsMedia
      summary: Facebook Publish Threads Media
      description: Publish a previously created Threads media container.
      tags:
        - Publishing
      parameters:
        - name: threads-user-id
          in: path
          required: true
          description: The Threads user ID.
          schema:
            type: string
          example: '12345678901234567'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                creation_id:
                  type: string
                  description: ID of the media container to publish.
              required:
                - creation_id
      responses:
        '200':
          description: Thread published successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /{threads-media-id}:
    get:
      operationId: getThreadsMedia
      summary: Facebook Get Threads Media
      description: Retrieve a specific Threads post.
      tags:
        - Media
      parameters:
        - name: threads-media-id
          in: path
          required: true
          description: The Threads media ID.
          schema:
            type: string
          example: '98765432101234567'
      responses:
        '200':
          description: Threads media retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadsMedia'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /{threads-media-id}/replies:
    get:
      operationId: getThreadsReplies
      summary: Facebook Get Threads Replies
      description: Retrieve replies to a Threads post.
      tags:
        - Replies
      parameters:
        - name: threads-media-id
          in: path
          required: true
          description: The Threads media ID.
          schema:
            type: string
          example: '98765432101234567'
      responses:
        '200':
          description: Replies retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadsMediaList'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /{threads-user-id}/insights:
    get:
      operationId: getThreadsInsights
      summary: Facebook Get Threads Insights
      description: Retrieve insights for a Threads user.
      tags:
        - Insights
      parameters:
        - name: threads-user-id
          in: path
          required: true
          description: The Threads user ID.
          schema:
            type: string
          example: '12345678901234567'
        - name: metric
          in: query
          required: true
          description: Comma-separated list of metrics.
          schema:
            type: string
          example: views,likes,replies
      responses:
        '200':
          description: Insights retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadsInsightList'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Threads OAuth 2.0 access token.
  schemas:
    ThreadsUser:
      type: object
      description: A Threads user profile.
      properties:
        id:
          type: string
          description: Threads user ID.
          example: '12345678901234567'
        username:
          type: string
          description: Threads username.
          example: examplebrand
        threads_profile_picture_url:
          type: string
          format: uri
          description: Profile picture URL.
        threads_biography:
          type: string
          description: User biography.
          example: Sharing ideas and updates
    ThreadsPostRequest:
      type: object
      description: Request to create a Threads post.
      properties:
        media_type:
          type: string
          description: Media type.
          enum:
            - TEXT
            - IMAGE
            - VIDEO
            - CAROUSEL
          example: TEXT
        text:
          type: string
          description: Post text content.
          example: Hello Threads! This is my first post.
        image_url:
          type: string
          format: uri
          description: URL of the image.
        video_url:
          type: string
          format: uri
          description: URL of the video.
      required:
        - media_type
    ThreadsMedia:
      type: object
      description: A Threads post.
      properties:
        id:
          type: string
          description: Media ID.
          example: '98765432101234567'
        media_type:
          type: string
          description: Media type.
          enum:
            - TEXT_POST
            - IMAGE
            - VIDEO
            - CAROUSEL_ALBUM
          example: TEXT_POST
        text:
          type: string
          description: Post text content.
          example: Hello Threads!
        permalink:
          type: string
          format: uri
          description: Permanent URL to the post.
        timestamp:
          type: string
          format: date-time
          description: Publishing timestamp.
        username:
          type: string
          description: Author username.
          example: examplebrand
        is_quote_post:
          type: boolean
          description: Whether this is a quote post.
          example: false
    ThreadsMediaList:
      type: object
      description: List of Threads media.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ThreadsMedia'
    ThreadsInsight:
      type: object
      description: A Threads insight metric.
      properties:
        name:
          type: string
          description: Metric name.
          example: views
        period:
          type: string
          description: Aggregation period.
        values:
          type: array
          items:
            type: object
            properties:
              value:
                type: integer
    ThreadsInsightList:
      type: object
      description: List of Threads insights.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ThreadsInsight'