New
Discover how Dropbox streamlined dev environments & cut costs by switching 1000 developers to Coder

Read the success story

Home
/
API
/
Organizations

Organizations

Organizations

Add new license

Code samples

# Example request using curl
curl -X POST http://coder-server:8080/api/v2/licenses \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

POST /licenses

Body parameter

{
  "license": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.AddLicenseRequesttrueAdd license request

Example responses

201 Response

{
  "claims": {},
  "id": 0,
  "uploaded_at": "2019-08-24T14:15:22Z",
  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
}

Responses

StatusMeaningDescriptionSchema
201CreatedCreatedcodersdk.License

To perform this operation, you must be authenticated. Learn more.

Update license entitlements

Code samples

# Example request using curl
curl -X POST http://coder-server:8080/api/v2/licenses/refresh-entitlements \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

POST /licenses/refresh-entitlements

Example responses

201 Response

{
  "detail": "string",
  "message": "string",
  "validations": [
    {
      "detail": "string",
      "field": "string"
    }
  ]
}

Responses

StatusMeaningDescriptionSchema
201CreatedCreatedcodersdk.Response

To perform this operation, you must be authenticated. Learn more.

Create organization

Code samples

# Example request using curl
curl -X POST http://coder-server:8080/api/v2/organizations \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

POST /organizations

Body parameter

{
  "name": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodycodersdk.CreateOrganizationRequesttrueCreate organization request

Example responses

201 Response

{
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "is_default": true,
  "name": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}

Responses

StatusMeaningDescriptionSchema
201CreatedCreatedcodersdk.Organization

To perform this operation, you must be authenticated. Learn more.

Get organization by ID

Code samples

# Example request using curl
curl -X GET http://coder-server:8080/api/v2/organizations/{organization} \
  -H 'Accept: application/json' \
  -H 'Coder-Session-Token: API_KEY'

GET /organizations/{organization}

Parameters

NameInTypeRequiredDescription
organizationpathstring(uuid)trueOrganization ID

Example responses

200 Response

{
  "created_at": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "is_default": true,
  "name": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}

Responses

StatusMeaningDescriptionSchema
200OKOKcodersdk.Organization

To perform this operation, you must be authenticated. Learn more.

See an opportunity to improve our docs? Make an edit.