Skip to content
Skip to Content
Coder Docs

Create organization

POST
/api/v2/organizations

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Request Body

Create organization request

application/json
  1. body
description?string
display_name?string

DisplayName will default to the same value as Name if not provided.

icon?string
name*string

Response Body

Created

application/json
  1. response
created_at*string
Formatdate-time
default_org_member_roles?array<string>

DefaultOrgMemberRoles are unioned into every member's effective roles at request time. Changes propagate to all members on the next request.

description?string
display_name?string
icon?string
id*string
Formatuuid
is_default*boolean
name?string
updated_at*string
Formatdate-time

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X POST \	"$CODER_URL/api/v2/organizations" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "name": "string"}'
Example Response201
{  "created_at": "2019-08-24T14:15:22Z",  "default_org_member_roles": [    "string"  ],  "description": "string",  "display_name": "string",  "icon": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "is_default": true,  "name": "string",  "updated_at": "2019-08-24T14:15:22Z"}