> For the complete documentation index, see [llms.txt](https://docs.shoplift.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shoplift.ai/api-reference/public-api/end-test.md).

# End test

Ends an active, paused, suspended, or incompatible test by transitioning it to cancelled.

```json
{"openapi":"3.1.1","info":{"title":"Shoplift Public API","version":"1.0.0"},"tags":[{"name":"Public API"}],"servers":[{"url":"https://app.shoplift.ai"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"http","description":"All requests require `Authorization: Bearer sl_live_<your_api_key>`. Generate a key from the Shoplift admin's API Keys settings page.","scheme":"bearer"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}}}},"paths":{"/api/public/v1/tests/{id}/end":{"post":{"tags":["Public API"],"summary":"End test","description":"Ends an active, paused, suspended, or incompatible test by transitioning it to cancelled.","operationId":"endTest","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"},"404":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```
