Skip to main content

Organisation

Organisation Object

FieldTypeDescription
idsnowflakethe organisation's id
namestringthe organisation's name (2 - 100 characters)
descriptionstringa description of the organisation
locationstringthe organisation's location
codestringthe organisation's code (max 12 characters)
default_branch_namestringdefault branch name for documents
member_countintegernumber of members in the organisation
icon_hashstringhash of the organisation's square icon file
banner_hashstringhash of the organisation's banner file
logo_hashstringhash of the organisation's logo file (used on printed documents)
storage_usageintegerbytes of storage in use
created_atISO8601 timestampwhen the organisation was created
owned_byobjectthe owner of the organisation (contains at minimum an id field)
is_protectedbooleanwhether the organisation is protected against accidental deletion
is_verifiedbooleanwhether the organisation is a verified business
member_approvalbooleanwhether all access requests require admin approval
restrict_email_domainbooleanwhether e-mail notifications are restricted to verified domains
is_deletedbooleanwhether the organisation is in a soft delete state
deleted_atISO8601 timestampwhen the organisation was deleted (if applicable)
deleted_byobjectwho deleted the organisation (contains at minimum an id field)

Organisation Object (with subscriptions and permissions)

When returned with subscription and permission context, the organisation object includes additional fields:

FieldTypeDescription
featuresobjectsubscription features available to the organisation
permissionsitem permissionspermission keys and their grant status for the current user
organisation_userobjectcurrent user's membership information (see below)

Organisation User Object

FieldTypeDescription
is_ownerbooleanwhether the current user is the owner of the organisation
pendingbooleanwhether the user's membership is pending approval
joined_atISO8601 timestampwhen the user joined the organisation
notification_email_idstringid of the user's notification email

Organisation Object (partial)

When returned in a partial context, the organisation object only includes:

FieldTypeDescription
idsnowflakethe organisation's id
namestringthe organisation's name
descriptionstringa description of the organisation
icon_hashstringhash of the organisation's square icon file

Organisation Domain Object

FieldTypeDescription
idsnowflakethe domain's id
organisation_idsnowflakethe organisation's id
domainstringthe domain name
challenge_tokenstringDNS verification challenge token (only included when explicitly requested)
is_verifiedbooleanwhether the domain has been verified via DNS
is_approvedbooleanwhether the domain has been approved

Organisation Member Object

FieldTypeDescription
useruser objectthe member (see Object or Id)
is_ownerbooleanwhether the member is the owner of the organisation
pendingbooleanwhether the member's membership is pending approval
joined_atISO8601 timestampwhen the member joined the organisation
{
"user": {},
"is_owner": false,
"pending": false,
"joined_at": "2020-01-01T00:00:00Z"
}

Organisation User Ban Object

FieldTypeDescription
useruser object or idthe banned user
reasonstringreason for the ban
banned_atISO8601 timestampwhen the user was banned
{
"user": {},
"reason": "violation of code of conduct",
"banned_at": "2020-01-01T00:00:00Z"
}

Create Organisation

POST /organisations

Parameters
FieldTypeDescription
namestringthe organisation's name (2 - 100 characters)

Get Organisation

GET /organisations/{organisation.id}

Returns the organisation object for the given organisation id.

Get Organisation Member

GET /organisations/{organisation.id}/members/{user.id}

Returns the organisation member object for the specified user.

List Organisation Members

GET /organisations/{organisation.id}/members

Returns a list of organisation member objects that are members of the organisation.

Query filters
FieldTypeDescriptiondefault
filterstringstarts with filter for a members first name, last name, or emailnull

List Organisation Roles

GET /organisations/{organisation.id}/roles

Returns an array of role objects for the organisation, ordered by their display order. The implicit @everyone role is included in the response. Requires membership in the organisation.

Error Responses
Status CodeDescription
400The organisation was not found
403The user is not a member of the organisation

Create Organisation Role

POST /organisations/{organisation.id}/roles

Creates a new role in the organisation. Requires the MANAGE_ROLES permission.

Parameters
FieldTypeDescriptionDefault
aliasstringthe role's alias (up to 20 characters)new role
Error Responses
Status CodeDescription
400The organisation was not found
403The user lacks the MANAGE_ROLES permission

Change Organisation Role Order

PATCH /organisations/{organisation.id}/roles

Changes the display order of a role within the organisation. Requires the MANAGE_ROLES permission. Roles between the old and new order will be shifted accordingly.

Parameters
FieldTypeDescription
idsnowflakethe role's id
orderintegerthe new display order for the role
Error Responses
Status CodeDescription
400The organisation or role was not found
403The user lacks the MANAGE_ROLES permission
403The role does not belong to the organisation

Add Role to User

PUT /organisations/{organisation.id}/members/{user.id}/roles/{role.id}

Adds a role to a user. Requires the MANAGE_ROLES permission. The user must be a member of the organisation.

Error Responses
Status CodeDescription
400The organisation, role, or user was not found
400The user is not a member of the organisation
403The user lacks the MANAGE_ROLES permission
403The role does not belong to the organisation

Remove Role from User

DELETE /organisations/{organisation.id}/members/{user.id}/roles/{role.id}

Removes a role from a user. Requires the MANAGE_ROLES permission.

Error Responses
Status CodeDescription
400The organisation, role, or user was not found
403The user lacks the MANAGE_ROLES permission
403The role does not belong to the organisation

Update Organisation Role Permission

PUT /organisations/{organisation.id}/permissions/{roleId}

Updates the permissions granted to a role, user, or the @everyone group within the organisation. The roleId parameter accepts the id of a role, a user, or the organisation itself (for the @everyone group). Requires the MANAGE_ROLES permission.

Parameters
FieldTypeDescription
permissionsobject<string, Permission Grant Type>permissions to grant or revoke
Error Responses
Status CodeDescription
400The permissions object was not provided
403The user lacks the MANAGE_ROLES permission
404The organisation was not found

Create Project

POST /organisations/{organisation.id}/projects

Creates a new project in the organisation. Requires the CREATE_PROJECTS permission. The creator is automatically granted ADMIN_PROJECTS permission on the new project.

JSON Params
FieldTypeDescriptionDefault
code?stringthe project's short code (max 12 characters)
name?stringthe project's name (max 200 characters)new project
description?stringa description of the project
readme?stringthe project's readme content (max 64000 characters)
status?project statusthe status to set for the projectopen
Error Responses
Status CodeDescription
400Bad request (organisation does not exist)
403Forbidden (insufficient permissions)
429Failed to create new project (no quota)

List Projects

GET /organisations/{organisation.id}/projects

Returns an array of project objects for the organisation. Requires membership in the organisation. Only projects where the caller has the VIEW_PROJECTS permission will be included.

Query Parameters
FieldTypeDescription
$filter?stringOData filter expression (supports status)
$skip?integernumber of records to skip
$top?integermaximum number of records to return
Error Responses
Status CodeDescription
400Bad request (organisation does not exist)
403Forbidden (caller is not a member)

List Organisation Workgroups

GET /organisations/{organisation.id}/workgroups

Create Organisation Workgroup

POST /organisations/{organisation.id}/workgroups

Get Organisation Documents

GET /organisations/{organisation.id}/documents

Returns a list of document objects that are members of the organisation.

Get Organisation Work Items

GET /organisations/{organisation.id}/workitems

Returns a list of work item objects that are members of the organisation.

Parameters
FieldTypeDescription