> 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/create-execution.md).

# Create Execution

Run agent.

Users can only trigger agents within their organisation, and only while that organisation still has credits: a non-positive balance is refused with 402 and no execution is created.

```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":{"CreateExecutionPayloadSchema":{"properties":{"agent_id":{"type":"integer","title":"Agent Id","description":"Agent ID to run"},"args":{"additionalProperties":true,"type":"object","title":"Args","description":"Optional args to pass to the agent during execution"}},"type":"object","required":["agent_id"],"title":"CreateExecutionPayloadSchema","description":"Pydantic schema for agent run request."},"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/":{"post":{"tags":["executions","public"],"summary":"Create Execution","description":"Run agent.\n\nUsers can only trigger agents within their organisation, and only while that\norganisation still has credits: a non-positive balance is refused with 402 and\nno execution is created.","operationId":"executions-create_execution","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExecutionPayloadSchema"}}}},"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":{}}}}}}}}
```
