Create Team via API
This method allows you to create a new team.
Tip: You can explore and test this endpoint interactively using our OpenAPI documentation.
URL
/teams
HTTP Method
POST
Supported Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
team[name] |
String | Yes | The team name |
team[is_admin] |
Boolean | No | Whether the team has account administrator privileges. When enabled, all other permissions are automatically set to true. |
team[can_manage_users] |
Boolean | No | Whether members can manage users |
team[can_manage_billing] |
Boolean | No | Whether members can manage billing |
team[can_manage_agents] |
Boolean | No | Whether members can manage network agents |
team[can_create_projects] |
Boolean | No | Whether members can create projects |
team[all_projects_allowed] |
Boolean | No | Whether members can access all projects |
Example cURL Request
curl -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
-d '{"team": {"name": "Engineering", "can_create_projects": true, "all_projects_allowed": true}}' \
https://test.deployhq.com/teams
Example Response
{
"identifier": "abc123-def456",
"name": "Engineering",
"is_admin": false,
"can_manage_users": false,
"can_manage_billing": false,
"can_manage_agents": false,
"can_create_projects": true,
"all_projects_allowed": true,
"members": [],
"project_assignments": []
}
Notes
- Returns the created team with a
201 Createdstatus - Returns
422 Unprocessable Entityif validation fails (e.g., missing name) - Setting
is_admintotrueautomatically enables all other permissions