Skip to content

Create group

Viewing v2— current version

POST
/v2/workspaces/{workspace_id}/groups
curl --request POST \
--url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"role": "admin"
}'

Unchanged from v1. This endpoint’s documented request and response schemas are identical in v1 and v2 — change the /v1 prefix to /v2. Schema equality is not a promise about behaviour, so keep your usual smoke tests.

workspace_id
required
Workspace Id

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

Media typeapplication/json
CreateGroupBody
object
name
required
Name

The group’s name. Must be unique within the workspace.

string
>= 1 characters
role
Any of:
Role
string
Allowed values: admin editor settings_admin art_director artist member

Successful Response

Media typeapplication/json
GroupOut
object
group_id
required
Group Id

The group’s unique identifier.

string format: uuid
name
required
Name

The group’s name.

string
role
Any of:
Role
string
Allowed values: admin editor settings_admin art_director artist member
Example
{
"role": "admin"
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Forbidden — insufficient permissions.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Invalid input parameters.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Rate limited — too many concurrent requests.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}