API ReferenceAgents
Attach Agent Integration
Attach a workspace integration to an agent.
Attach a workspace integration to an agent.
Idempotent: re-attaching an already-attached integration is a no-op and returns the existing link. Attaching an excluded integration clears the exclusion — recorded as an explicit attachment, so the grant survives turning workspace-wide access off later. The integration must belong to the same workspace as the agent.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
agent_id*Agent Id
integration_id*Integration Id
Format
uuidHeader Parameters
X-API-Key?string|null
Response Body
application/json
application/json
curl -X POST "https://api.levainlabs.com/api/v1/agents/string/integrations/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"integration_id": "string",
"provider": "string",
"kind": "string",
"display_name": "string",
"status": "string",
"scopes": [
"string"
],
"tool_allowlist": [
"string"
],
"attached_at": "string",
"source": "attached"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}