Skip to content
Docs

Add a department

POST
/api/workspaces/{ws}/departments

monthlyHours null means no limit. A name is unique in the workspace; a parent can't be the department itself or inside it.

Authorization

session
cookiebetter-auth.session_token<token>

Set by POST /api/auth/sign-in/email.

Path Parameters

ws*string

The workspace id (from GET /api/me).

Request Body

application/json
  1. body
name*string
Length1 <= length <= 80
mission?string
Lengthlength <= 2000
Default""
parentId?|
Defaultnull
channel?|
Defaultnull
monthlyHours?|
Defaultnull
maxAgentTurns?|
Defaultnull

Response Body

The department.

Example Request
curl -X POST 'https://app.useroster.work/api/workspaces/string/departments' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
Empty