Middesk subpackage_threads API

The subpackage_threads API from Middesk — 2 operation(s) for subpackage_threads.

Operations 3

GET /v1/threads List agent threads #
POST /v1/threads Create an agent thread #
GET /v1/threads/{id} Retrieve an agent thread #

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/middesk-subpackage-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

middesk-subpackage-threads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Middesk subpackage_actions Subpackage Threads API
  version: 1.0.0
servers:
- url: https://api.middesk.com
  description: Default
tags:
- name: subpackage_threads
paths:
  /v1/threads:
    get:
      operationId: list-agent-threads
      summary: List agent threads
      description: Returns a paginated list of agent threads
      tags:
      - subpackage_threads
      parameters:
      - name: page
        in: query
        description: Page number
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        description: Items per page
        required: false
        schema:
          type: integer
      - name: business_id
        in: query
        description: Optional business ID filter
        required: false
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: agent threads list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_threads_ListAgentThreadsResponse'
    post:
      operationId: create-agent-thread
      summary: Create an agent thread
      description: Creates a new agent thread for running agent workflows
      tags:
      - subpackage_threads
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '201':
          description: agent thread created with context_type and context_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__AgentsThread'
        '404':
          description: agent type not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: The agent type to use for this agent thread
                business_id:
                  type: string
                  format: uuid
                  description: Business to use as context for the thread. Shorthand for context_type=business. Required unless context_type and context_id are provided.
                context_type:
                  type: string
                  description: The type of context resource (e.g., "business")
                context_id:
                  type: string
                  format: uuid
                  description: The ID of the context resource. Must be provided with context_type.
              required:
              - type
  /v1/threads/{id}:
    get:
      operationId: get-agent-thread
      summary: Retrieve an agent thread
      description: Retrieves details of a specific agent thread
      tags:
      - subpackage_threads
      parameters:
      - name: id
        in: path
        description: Agent thread ID
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '200':
          description: agent thread found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__AgentsThread'
        '404':
          description: agent thread not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
components:
  schemas:
    type__ErrorResponseErrorsItem:
      type: object
      properties:
        message:
          type: string
      required:
      - message
      title: ErrorResponseErrorsItem
    type__ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/type__ErrorResponseErrorsItem'
      required:
      - errors
      title: ErrorResponse
    type__AgentsStepResultResolution:
      type: string
      enum:
      - auto_approve
      - skip
      description: How the interrupt was resolved. Present only on completed interrupt steps when an interrupt policy auto-approved or skipped the interrupt. Absent for manual resolutions.
      title: AgentsStepResultResolution
    type__AgentsStepResult:
      type: object
      properties:
        resolution:
          $ref: '#/components/schemas/type__AgentsStepResultResolution'
          description: How the interrupt was resolved. Present only on completed interrupt steps when an interrupt policy auto-approved or skipped the interrupt. Absent for manual resolutions.
      description: Structured result payload for the step.
      title: AgentsStepResult
    type__AgentsStepType:
      type: string
      enum:
      - activity
      - output
      - interrupt
      - error
      description: Category of step output.
      title: AgentsStepType
    type_threads_ListAgentThreadsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/type__AgentsThread'
        object:
          type: string
        has_more:
          type: boolean
        total_count:
          type: integer
      required:
      - object
      - has_more
      title: ListAgentThreadsResponse
    type__AgentsStepStatus:
      type: string
      enum:
      - running
      - completed
      - error
      description: Current execution status for the step.
      title: AgentsStepStatus
    type__AgentsStep:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the step.
        run_id:
          type: string
          format: uuid
          description: Identifier of the agent run that produced the step.
        agent:
          type: string
          description: Agent identifier that generated this step.
        type:
          $ref: '#/components/schemas/type__AgentsStepType'
          description: Category of step output.
        name:
          type: string
          description: Internal step name.
        label:
          type: string
          description: Human-readable step label.
        parent_step_id:
          type:
          - string
          - 'null'
          format: uuid
          description: Parent step identifier for nested steps.
        status:
          $ref: '#/components/schemas/type__AgentsStepStatus'
          description: Current execution status for the step.
        started_at:
          type: string
          format: date-time
          description: Timestamp when the step started.
        completed_at:
          type:
          - string
          - 'null'
          format: date-time
          description: Timestamp when the step completed.
        steps:
          type: array
          items:
            $ref: '#/components/schemas/type__AgentsStep'
          description: Nested child steps.
        result:
          $ref: '#/components/schemas/type__AgentsStepResult'
          description: Structured result payload for the step.
        artifacts:
          type: array
          items:
            $ref: '#/components/schemas/type__AgentsArtifact'
          description: Artifacts produced by the step.
      required:
      - id
      - run_id
      - type
      - name
      - label
      - status
      - started_at
      description: A step in an agent workflow execution timeline.
      title: AgentsStep
    type__AgentsThreadStatus:
      type: string
      enum:
      - running
      - completed
      - error
      - interrupted
      description: Current lifecycle status of the agent thread.
      title: AgentsThreadStatus
    type__AgentsSource:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: Canonical source URL.
        source_name:
          type: string
          description: Human-readable source name.
        source_tier:
          type: string
          description: Source quality or trust tier.
        source_type:
          type: string
          description: Source category.
      required:
      - url
      description: A source reference used by an agent artifact.
      title: AgentsSource
    type__AgentsThread:
      type: object
      properties:
        object:
          type: string
          description: Object type identifier.
        id:
          type: string
          format: uuid
          description: Unique identifier for the agent thread.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the agent thread was created.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the agent thread was last updated.
        status:
          $ref: '#/components/schemas/type__AgentsThreadStatus'
          description: Current lifecycle status of the agent thread.
        metadata:
          type:
          - object
          - 'null'
          additionalProperties:
            description: Any type
          description: Internal metadata associated with the agent thread.
        requester:
          type:
          - object
          - 'null'
          additionalProperties:
            description: Any type
          description: Requester context associated with the agent thread.
        steps:
          type: array
          items:
            $ref: '#/components/schemas/type__AgentsStep'
          description: Execution steps emitted by the underlying agent state
      required:
      - object
      - id
      - created_at
      - updated_at
      - status
      description: A conversation thread for agent workflows.
      title: AgentsThread
    type__AgentsArtifact:
      type: object
      properties:
        title:
          type: string
          description: Human-readable title for the artifact.
        type:
          type: string
          description: Artifact type identifier.
        confidence:
          type:
          - string
          - 'null'
          description: Optional confidence label for artifact quality.
        summary:
          type:
          - string
          - 'null'
          description: Optional summary of the artifact contents.
        sources:
          type: array
          items:
            $ref: '#/components/schemas/type__AgentsSource'
          description: Source references used to produce the artifact.
      required:
      - title
      - type
      description: A structured artifact produced by an agent step.
      title: AgentsArtifact
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer