Create an agent group (name, slug and optional workspace scope)
const url = 'https://example.com/v1/agent-groups';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"description":"example","metadata":{},"name":"example","slug":"example","status":"active","workspace_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/agent-groups \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "metadata": {}, "name": "example", "slug": "example", "status": "active", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Creates an agent group from a name and a slug ([a-z0-9][a-z0-9-]*, max 63), with an optional workspace scope that is deny-closed against unknown workspaces.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “ Header Parameters ”Target tenant id; required when the principal can act in more than one tenant.
Request Body required
Section titled “ Request Body required ”object
object
Responses
Section titled “ Responses ”Created
object
object
The stable scope handle ([a-z0-9][a-z0-9-]*, max 63).
The group’s workspace scope; absent when tenant-wide.
Example
{ "status": "active"}Bad request
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Unauthenticated
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Forbidden
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Not found
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Conflict / setup required
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Rate limited
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}