Create a new role for a workspace
curl --request POST \
--url https://api.wacht.dev/workspaces/{workspace_id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"permissions": [
"<string>"
]
}'
{
"id": "<string>",
"name": "Admin",
"description": "<string>",
"permissions": [
"workspace.manage",
"members.invite",
"members.remove"
],
"is_default": false,
"created_at": "2023-11-07T05:31:56Z"
}
JWT Bearer token authentication using the Authorization header
(i64 formatted as string)
Role created successfully
The response is of type object
.
curl --request POST \
--url https://api.wacht.dev/workspaces/{workspace_id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"description": "<string>",
"permissions": [
"<string>"
]
}'
{
"id": "<string>",
"name": "Admin",
"description": "<string>",
"permissions": [
"workspace.manage",
"members.invite",
"members.remove"
],
"is_default": false,
"created_at": "2023-11-07T05:31:56Z"
}