Langbase Threads API

The Threads API from Langbase — 3 operation(s) for threads.

Operations 8

POST /v1/threads V1 threads create #
POST /v1/threads/{threadId} V1 threads update #
GET /v1/threads/{threadId} V1 threads retrieve #
DELETE /v1/threads/{threadId} V1 threads delete #
POST /v1/threads/{threadId}/messages V1 threads message create #
GET /v1/threads/{threadId}/messages V1 threads message list #
POST /v1/threads/{threadId}/messages/{messageId} V1 threads message update #
DELETE /v1/threads/{threadId}/messages/{messageId} V1 threads message delete #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/langbase:langbase-threads-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

langbase-threads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Langbase Threads API
  version: 1.0.0
servers:
- url: https://api.langbase.com
  description: Production
tags:
- name: Threads
paths:
  /v1/threads:
    post:
      operationId: v1ThreadsCreate
      security:
      - bearerAuth: []
      responses:
        '200':
          description: 'Langbase: Create thread v1'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  object:
                    type: string
                    enum:
                    - thread
                  created_at:
                    type: string
                    format: date
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                      maxLength: 2048
                    default: {}
                required:
                - id
                - object
                - created_at
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads create
      x-summary-source: derived
  /v1/threads/{threadId}:
    post:
      operationId: v1ThreadsUpdate
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: threadId
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                    maxLength: 2048
                  default: {}
      responses:
        '200':
          description: 'Langbase: Update thread v1'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  object:
                    type: string
                    enum:
                    - thread
                  created_at:
                    type: string
                    format: date
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                      maxLength: 2048
                    default: {}
                required:
                - id
                - object
                - created_at
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads update
      x-summary-source: derived
    get:
      operationId: v1ThreadsRetrieve
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: threadId
        in: path
      responses:
        '200':
          description: 'Langbase: Retrieve thread v1'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  object:
                    type: string
                    enum:
                    - thread
                  created_at:
                    type: string
                    format: date
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                      maxLength: 2048
                    default: {}
                required:
                - id
                - object
                - created_at
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads retrieve
      x-summary-source: derived
    delete:
      operationId: v1ThreadsDelete
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: threadId
        in: path
      responses:
        '200':
          description: 'Langbase: Delete thread v1'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                - success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads delete
      x-summary-source: derived
  /v1/threads/{threadId}/messages:
    post:
      operationId: v1ThreadsMessageCreate
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: threadId
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  role:
                    type: string
                    enum:
                    - system
                    - user
                    - assistant
                    - function
                    - tool
                  content:
                    type: string
                    default: ''
                  tool_calls:
                    type: array
                    items: {}
                    default: []
                  tool_call_id:
                    type:
                    - string
                    - 'null'
                    default: ''
                  name:
                    type:
                    - string
                    - 'null'
                    default: ''
                  attachments:
                    type: array
                    items: {}
                    default: []
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                      maxLength: 2048
                    default: {}
                required:
                - role
      responses:
        '200':
          description: 'Langbase: Create thread messages v1'
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    created_at:
                      type: number
                    thread_id:
                      type: string
                      format: uuid
                    content:
                      type: string
                      default: ''
                    role:
                      type: string
                      enum:
                      - system
                      - user
                      - assistant
                      - function
                      - tool
                    tool_call_id:
                      type:
                      - string
                      - 'null'
                      default: null
                    tool_calls:
                      type: array
                      items: {}
                      default: []
                    name:
                      type:
                      - string
                      - 'null'
                      default: null
                    attachments:
                      type: array
                      items: {}
                      default: []
                    metadata:
                      type: object
                      additionalProperties:
                        type: string
                        maxLength: 2048
                      default: {}
                  required:
                  - id
                  - created_at
                  - thread_id
                  - role
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads message create
      x-summary-source: derived
    get:
      operationId: v1ThreadsMessageList
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: threadId
        in: path
      responses:
        '200':
          description: 'Langbase: List thread messages v1'
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    created_at:
                      type: number
                    thread_id:
                      type: string
                      format: uuid
                    content:
                      type: string
                      default: ''
                    role:
                      type: string
                      enum:
                      - system
                      - user
                      - assistant
                      - function
                      - tool
                    tool_call_id:
                      type:
                      - string
                      - 'null'
                      default: null
                    tool_calls:
                      type: array
                      items: {}
                      default: []
                    name:
                      type:
                      - string
                      - 'null'
                      default: null
                    attachments:
                      type: array
                      items: {}
                      default: []
                    metadata:
                      type: object
                      additionalProperties:
                        type: string
                        maxLength: 2048
                      default: {}
                  required:
                  - id
                  - created_at
                  - thread_id
                  - role
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads message list
      x-summary-source: derived
  /v1/threads/{threadId}/messages/{messageId}:
    post:
      operationId: v1ThreadsMessageUpdate
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: threadId
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                    maxLength: 2048
      responses:
        '200':
          description: 'Langbase: Update thread messages v1'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  created_at:
                    type: number
                  thread_id:
                    type: string
                    format: uuid
                  content:
                    type: string
                    default: ''
                  role:
                    type: string
                    enum:
                    - system
                    - user
                    - assistant
                    - function
                    - tool
                  tool_call_id:
                    type:
                    - string
                    - 'null'
                    default: null
                  tool_calls:
                    type: array
                    items: {}
                    default: []
                  name:
                    type:
                    - string
                    - 'null'
                    default: null
                  attachments:
                    type: array
                    items: {}
                    default: []
                  metadata:
                    type: object
                    additionalProperties:
                      type: string
                      maxLength: 2048
                    default: {}
                required:
                - id
                - created_at
                - thread_id
                - role
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads message update
      x-summary-source: derived
    delete:
      operationId: v1ThreadsMessageDelete
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: threadId
        in: path
      - schema:
          type: string
          format: uuid
        required: true
        name: messageId
        in: path
      responses:
        '200':
          description: 'Langbase: Delete thread messages v1'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                - success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                      docs:
                        type: string
                    required:
                    - code
                    - status
                    - message
                    - docs
                required:
                - success
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                - success
                - error
                - code
      tags:
      - Threads
      summary: V1 threads message delete
      x-summary-source: derived
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: Langbase-API-Key
      type: http
      scheme: bearer
      description: 'Enter your Langbase API key with format: Bearer Langbase-API-Key'
x-provenance:
  method: harvested
  publisher: Langbase
  source: https://api.langbase.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)