Microsoft Azure AI Foundry Threads API

The Threads API from Microsoft Azure AI Foundry — 11 operation(s) for threads.

GitHub OpenAPI
Business capability
Agent Infrastructure & Agentic Commerce AE-100

Operations 19

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /threads List my agent threads · Threads list threads #
Ask an LLM
“Which agent threads have I created?”
“Can I page through my threads?”
Tell an agent
List my agent threads.
Show {limit} threads ordered {order}.
POST /threads Create an agent thread · Threads create thread #
Ask an LLM
“How do I start a new agent thread?”
“Can I attach initial messages and tools to a thread?”
Tell an agent
Create a new agent thread.
Create a thread with initial messages {messages}.
GET /threads/{threadId} Get an agent thread · Threads get thread #
Ask an LLM
“What is stored in a particular agent thread?”
“Can I fetch one thread by ID?”
Tell an agent
Get thread {threadId}.
Show the messages and metadata on thread {threadId}.
POST /threads/{threadId} Update an agent thread · Threads update thread #
Ask an LLM
“Can I change the tools a thread uses?”
“How do I update a thread's metadata?”
Tell an agent
Update thread {threadId} with tool resources {tool_resources}.
Set metadata {metadata} on thread {threadId}.
DELETE /threads/{threadId} Delete an agent thread · Threads delete thread #
Ask an LLM
“How do I delete an agent thread?”
“Can I remove a thread I no longer need?”
Tell an agent destructive · confirm first
Delete thread {threadId}.
Remove agent thread {threadId}.
GET /threads/{threadId}/messages List messages on a thread · Messages list messages #
Ask an LLM
“What messages are in a particular thread?”
“Can I list only the messages a run produced?”
Tell an agent
List messages on thread {threadId}.
Show messages from run {run_id} on thread {threadId}.
POST /threads/{threadId}/messages Add a message to a thread · Messages create message #
Ask an LLM
“How do I post a new message to an agent thread?”
“Can I attach files to a thread message?”
Tell an agent
Add a {role} message {content} to thread {threadId}.
Post {content} as a {role} message on thread {threadId} with attachments {attachments}.
GET /threads/{threadId}/messages/{messageId} Get a message in a thread · Messages get message #
Ask an LLM
“How do I read one message from an Assistant thread?”
“Can I fetch a single message by its message ID?”
Tell an agent
Get message {messageId} from thread {threadId}.
Show the message I sent in thread {threadId}.
POST /threads/{threadId}/messages/{messageId} Update a message on a thread · Messages update message #
Ask an LLM
“Can I edit a message that was already posted to a thread?”
“How do I change the metadata on a thread message?”
Tell an agent
Update message {messageId} on thread {threadId}.
Set metadata {metadata} on message {messageId} of thread {threadId}.
DELETE /threads/{threadId}/messages/{messageId} Delete a message from a thread · Messages delete #
Ask an LLM
“How do I remove a message from an agent thread?”
“Can I delete a single thread message?”
Tell an agent destructive · confirm first
Delete message {messageId} from thread {threadId}.
Remove the message {messageId} on thread {threadId}.
GET /threads/{threadId}/runs List runs on a thread · Runs list runs #
Ask an LLM
“Which runs have been run on a thread?”
“Can I see the run history of a thread?”
Tell an agent
List runs on thread {threadId}.
Show the last {limit} runs for thread {threadId}.
POST /threads/{threadId}/runs Run an agent on a thread · Runs create run #
Ask an LLM
“How do I start an agent running on a thread?”
“Can I override the agent's model or instructions for one run?”
Tell an agent
Run agent {assistant_id} on thread {threadId}.
Run agent {assistant_id} on thread {threadId} with model {model} and instructions {instructions}.
GET /threads/{threadId}/runs/{runId} Get a run in a thread · Runs get run #
Ask an LLM
“How do I check the status of a run on a thread?”
“What did my thread's run do after I submitted it?”
Tell an agent
Get run {runId} from thread {threadId}.
Check the status of run {runId} on thread {threadId}.
POST /threads/{threadId}/runs/{runId} Update a run on a thread · Runs update run #
Ask an LLM
“Can I change the metadata on a run?”
“How do I update a thread run?”
Tell an agent
Update run {runId} on thread {threadId}.
Set metadata {metadata} on run {runId} of thread {threadId}.
POST /threads/{threadId}/runs/{runId}/cancel Cancel a run on a thread · Runs cancel run #
Ask an LLM
“How do I stop an agent run that is still in progress?”
“Can I cancel a thread run?”
Tell an agent destructive · confirm first
Cancel run {runId} on thread {threadId}.
Stop the in-progress run {runId} for thread {threadId}.
GET /threads/{threadId}/runs/{runId}/steps List steps of a run · Run steps list run steps #
Ask an LLM
“What steps did a run go through?”
“Can I see the step details of a thread run?”
Tell an agent
List steps of run {runId} on thread {threadId}.
Show the first {limit} steps for run {runId} on thread {threadId}.
GET /threads/{threadId}/runs/{runId}/steps/{stepId} Get one step of a run · Run steps get run step #
Ask an LLM
“What happened in a specific step of a run?”
“Can I fetch a single run step by ID?”
Tell an agent
Get step {stepId} of run {runId} on thread {threadId}.
Show the details of step {stepId} for run {runId} on thread {threadId}.
POST /threads/{threadId}/runs/{runId}/submit_tool_outputs Submit tool outputs for a run · Runs submit tool outputs to run #
Ask an LLM
“How do I give an agent the output of a tool it called?”
“Can I submit tool outputs for a run and stream the result?”
Tell an agent
Submit tool outputs {tool_outputs} for run {runId} on thread {threadId}.
Submit {tool_outputs} to run {runId} on thread {threadId} with stream {stream}.
POST /threads/runs Create a thread and run an agent on it · Create thread and run #
Ask an LLM
“Can I create a thread and start an agent on it in one call?”
“How do I kick off a new agent thread right away?”
Tell an agent
Create a thread and run agent {assistant_id} on it.
Create a thread with {thread} and run agent {assistant_id} on it with model {model}.

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/azure-ai-foundry:azure-ai-foundry-threads-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

azure-ai-foundry-threads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure AI Threads API
  version: v1
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
security:
- OAuth2Auth:
  - https://ai.azure.com/.default
tags:


# --- truncated at 32 KB (84 KB total) ---
# Full source: https://artifacts.apis.io/azure-ai-foundry/openapi/azure-ai-foundry-threads-api-openapi.yml