> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/executions/retry-execution.md).

# Retry Execution

Retry a failed or cancelled execution.

Runs the agent again with the same args as a new execution and returns the new execution ID; the original execution is left as it is. Only executions that ended in FAILURE or CANCELED can be retried.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"CreateExecutionResponseSchema":{"properties":{"id":{"type":"integer","title":"Id","description":"Execution ID"}},"type":"object","required":["id"],"title":"CreateExecutionResponseSchema","description":"Pydantic schema for agent trigger response."}}},"paths":{"/api/v1/executions/{execution_id}/retry":{"post":{"tags":["executions","public"],"summary":"Retry Execution","description":"Retry a failed or cancelled execution.\n\nRuns the agent again with the same args as a new execution and returns the\nnew execution ID; the original execution is left as it is. Only executions\nthat ended in FAILURE or CANCELED can be retried.","operationId":"executions-retry_execution","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"integer","title":"Execution Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExecutionResponseSchema"}}}},"400":{"description":"Invalid request payload or parameters","content":{"application/json":{}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"402":{"description":"The organisation has no credits left; top up before running the agent","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}},"404":{"description":"Resource not found or user has no permission to access it","content":{"application/json":{}}}}}}}}
```
