> 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/agents/unlink-sub-agent.md).

# Unlink Sub Agent

Unlink a sub-agent from a parent agent.

Users can only unlink sub-agents from agents they created. This operation is idempotent - unlinking a non-existent link is not an error.

```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"}}}}},"paths":{"/api/v1/agents/{agent_id}/sub-agents/{sub_agent_id}":{"delete":{"tags":["agents","public"],"summary":"Unlink Sub Agent","description":"Unlink a sub-agent from a parent agent.\n\nUsers can only unlink sub-agents from agents they created.\nThis operation is idempotent - unlinking a non-existent link is not an error.","operationId":"agents-unlink_sub_agent","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Agent Id"}},{"name":"sub_agent_id","in":"path","required":true,"schema":{"type":"integer","title":"Sub Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"User not authenticated","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":{}}}}}}}}
```
