Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Create Organization

POST/api/v2/admin/organizations
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Creates a new Organization.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:admin-write.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

CreateOrganizationRequest
object
Hide child attributes

Hide child attributes

administrators
list<PrincipalId>
optional

The initial administrators of the Organization. At least one principal must be provided.

Show child attributes

Show child attributes

enrollmentRid
string

The RID of the Enrollment that this Organization belongs to. This must be provided.

name
string
host
string
optional

The primary host name of the Organization. This should be used when constructing URLs for users of this Organization.

description
string
optional

Response body

Organization
object

The created Organization

Hide child attributes

Hide child attributes

rid
string
name
string
description
string
optional
markingId
string

The ID of this Organization's underlying marking. Organization guest access can be managed by updating the membership of this Marking.

host
string
optional

The primary host name of the Organization. This should be used when constructing URLs for users of this Organization.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/admin/organizations?preview=true" \ -d '{"enrollmentRid":"ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6","name":"Example Organization","host":"example.palantirfoundry.com","administrators":["f05f8da4-b84c-4fca-9c77-8af0b13d11de"]}'

Response

Copied!
1 2 3 4 5 6 { "name": "Example Organization", "host": "example.palantirfoundry.com", "rid": "ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa", "markingId": "18212f9a-0e63-4b79-96a0-aae04df23336" }

Error responses

Error Name
CreateOrganizationMissingInitialAdminRoleError CodeINVALID_ARGUMENT
Status Code400
DescriptionAt least one organization:administrator role grant must be provided when creating a organization.
Parameters
OrganizationNameAlreadyExistsError CodeINVALID_ARGUMENT
Status Code400
DescriptionAn organization with the same name already exists.
ParametersdisplayName
PrincipalNotFoundError CodeNOT_FOUND
Status Code404
DescriptionA principal (User or Group) with the given PrincipalId could not be found
ParametersprincipalId
CreateOrganizationPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not create the Organization.
Parameters
EnrollmentNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Enrollment could not be found.
ParametersenrollmentRid
OrganizationNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Organization could not be found.
ParametersorganizationRid