Skip to content
Skip to Content
Coder Docs

Update organization

PATCH
/api/v2/organizations/{organization}

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

organization*string

Organization ID or name

Request Body

Patch organization request

application/json
  1. body
default_org_member_roles?array<string>

DefaultOrgMemberRoles, when non-nil, replaces the org's default member roles.

description?string
display_name?string
icon?string
name?string

Response Body

OK

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 PATCH \	"$CODER_URL/api/v2/organizations/{organization}" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "default_org_member_roles": [    "string"  ],  "description": "string",  "display_name": "string"}'
Example Response200
{  "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"}