> For the complete documentation index, see [llms.txt](https://developers.make.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.make.com/api-documentation/api-reference/ai-agents/context.md).

# Context

The following endpoints allow you to get, create, and delete Context for AI Agents. These endpoints are available in **open beta** to all users. As beta endpoints, both functionality and availability may change.

## List Context

> Retrieve a list of all context for an agent

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"AI Agents / Context","description":"The following endpoints allow you to get, create, and delete Context for AI Agents. These endpoints are available in **open beta** to all users. As beta endpoints, both functionality and availability may change."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["ai-agents:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/ai-agents/v1/contexts":{"get":{"summary":"List Context","description":"Retrieve a list of all context for an agent","tags":["AI Agents / Context"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"agentId","in":"query"},{"schema":{"type":"number","exclusiveMinimum":0},"required":true,"name":"teamId","in":"query"}],"responses":{"200":{"description":"List of context retrieved successfully","content":{}}}}}}}
```

## Create Context

> Create a new context with an optional file upload

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"AI Agents / Context","description":"The following endpoints allow you to get, create, and delete Context for AI Agents. These endpoints are available in **open beta** to all users. As beta endpoints, both functionality and availability may change."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["ai-agents:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/ai-agents/v1/contexts":{"post":{"summary":"Create Context","description":"Create a new context with an optional file upload","tags":["AI Agents / Context"],"parameters":[{"schema":{"type":"number","exclusiveMinimum":0},"required":true,"name":"teamId","in":"query"}],"requestBody":{"description":"Request body for creating a new context.","required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"},"file":{"nullable":true}},"required":["agentId"],"description":"Schema for uploading a file."}},"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"},"content":{"type":"string"},"name":{"type":"string","maxLength":120,"pattern":"^[\\p{L}\\p{N}\\s\\-_.()]*$"},"autosave":{"type":"string","default":"true"}},"required":["agentId"],"description":"Request body for creating a new context."}}}},"responses":{"201":{"description":"Context created successfully","content":{}}}}}}}
```

## Delete Context

> Delete a context by its ID

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"AI Agents / Context","description":"The following endpoints allow you to get, create, and delete Context for AI Agents. These endpoints are available in **open beta** to all users. As beta endpoints, both functionality and availability may change."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["ai-agents:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/ai-agents/v1/contexts/{contextId}":{"delete":{"summary":"Delete Context","description":"Delete a context by its ID","tags":["AI Agents / Context"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"contextId","in":"path"},{"schema":{"type":"number","exclusiveMinimum":0},"required":true,"name":"teamId","in":"query"}],"responses":{"204":{"description":"Context deleted successfully"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.make.com/api-documentation/api-reference/ai-agents/context.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
