# 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"}}}}}}
```
