disguise developers

Organisation

The /organisation endpoint of the Disguise Cloud API returns information about the authenticated user’s organisation that the token is scoped to.

Endpoints

GET
api.disguise.cloud
/v1/organisation
Get details about the authenticated token's organisation.
PATCH
api.disguise.cloud
/v1/organisation/{{uuid}}
Update the details of the passed token's organisation. For security, only the organisation the token is scoped to can be updated.

Response Structure

The responses from all /organisation endpoints includes the following fields:

FieldTypeDescription
idstringThe unique identifier of the organisation.
namestringThe name of the organisation.
owner_idstringThe unique identifier of the owner.
user_role_on_orgstringThe role of your user within the organisation.
current_planstringThe current subscription plan of the organisation, usually Starter, Pro, or Studio.
trial_ends_atstringThe end date of the trial period if applicable.
members_countintegerThe number of members in the organisation.
used_seats_countintegerThe number of seats currently used out of the organisation’s seat total.
seats_totalintegerThe total number of seats available, regardless of used status.
seats_available_on_planintegerThe number of seats available on the current plan, regardless of the organisation’s total seats. Example: Studio allows up to 25 seats, but you may have only purchased 10 of those. In that case, this field will be 25 and the seats_total field will be 10.
drive_countintegerThe number of drives in the organisation.
drive_limitintegerThe maximum number of drives allowed on the organisation, usually determined by the plan.
available_drivesintegerThe number of available drives, calculated based on used drives minus the drive limit.
entitlement_domainstringThe entitlement domain of the organisation (example: disguise.cloud).
entitlement_enabledbooleanWhether entitlement is enabled for the organisation, when enabled anyone with an email from the same domain as above will be allowed to request to join this organisation.

Response Example

curl -X GET https://api.disguise.cloud/v1/organisation \
-H "Authorization: Token YOUR_API_TOKEN"

Success

A successful response will return a 200 OK status code and the following JSON:

Please note this example excludes the pagination wrapper around the response. Please refer to the pagination documentation for more information.

[
  {
    "id": "5ab6448f-72e2-4fd7-8929-2e9c94bff342",
    "name": "Disguise Inc.",
    "owner_id": "1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p",
    "user_role_on_org": "admin",
    "current_plan": "Pro",
    "trial_ends_at": "2024-12-31T23:59:59.000000Z",
    "members_count": 5,
    "used_seats_count": 5,
    "seats_total": 5,
    "seats_available_on_plan": 10,
    "drive_count": 2,
    "drive_limit": 10,
    "available_drives": 8,
    "entitlement_domain": "disguise.cloud",
    "entitlement_enabled": true
  }
]

Errors

If the organisation is not found, the API will return a 404 Not Found status code and the following JSON:

{
  "error": {
    "message": "Organisation not found",
    "details": "Organisation not found"
  }
}

Request Parameters

The following parameters can be used with the /organisation endpoint for PATCH requests:

ParameterTypeDescription
namestringThe name of the organisation.
entitlement_enabledbooleanWhether entitlements are enabled for the organisation.
true: When enabling, entitlements will be created for every existing user in the system that matches the organisation’s domain.
false: When disabling, entitlements (including pending) will be removed for all users in the organisation.

Request Example

Below is an example of making a PATCH request to the /organisation endpoint to update the organisation’s name and enable entitlement.

curl -X PATCH https://api.disguise.cloud/v1/organisation/YOUR_ORG_ID \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "name": "Disguise Inc.",
  "entitlement_enabled": true
}'