---
title: "Stop an AI Agent Task"
method: POST
path: "/v1/ai/agents/tasks/{taskId}/stop"
tags: ["AI Agent Tasks"]
---

# Stop an AI Agent Task

`POST /v1/ai/agents/tasks/{taskId}/stop`

## Request

- Base URL: `https://eu1.api.matillion.com/dpc`
- URL: `https://eu1.api.matillion.com/dpc/v1/ai/agents/tasks/{taskId}/stop`
- Auth: HTTP bearer

Requests that a running task be stopped gracefully.

## Path parameters

- `taskId` string, uuid, required

## Response `204`

Task stop request accepted

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication token
- `403`: Insufficient permissions to stop the task
- `404`: Task not found
- `409`: Task is not in a running state
- `502`: Upstream service error
- `504`: Upstream service timeout

---

[API](https://skmtc.dev/maia/apis/maia-public-rest-api.md) - [All operations](https://skmtc.dev/maia/apis/maia-public-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/maia/apis/maia-public-rest-api/revisions/6239825f68eb?raw)
