Organizations API
An organization is the top-level tenant on PlayTelly. Every user, workspace and app grant belongs to exactly one organization. This page covers organizations, their users and invitations, roles, app access and the public self-signup flow. See the Tenancy API for the other resources.
Resources¶
| Resource | What it is |
|---|---|
| Organization | A tenant. Has a status, a time zone, a company code and a set of apps it may use. |
| Organization user | A person who belongs to the organization, with one organization role. |
| Invitation | A sign-in link emailed to a new user. The user is invited until they open it. |
| Role | A named set of permissions. System roles are shared; custom roles belong to one organization. |
| App access | The apps (products) the organization's users may use. |
| Application | A self-signup request waiting for approval. |
Authentication and permissions¶
Send Authorization: Bearer <ACCESS_TOKEN>. See Authentication. Routes with a permission check use the role in your token. A token for another organization returns 403.
| Action | Permission |
|---|---|
| List organizations, list applications | platform:apps:platformconsole:access |
| Create an organization | platform:org:create |
| Approve or disable an organization, reject an application, replace an organization's app access | platform:org:manage |
| Delete an organization | platform:org:delete |
| Invite or reinvite a user | org:users:invite |
| Change a user's role or status | org:users:manage |
| Remove a user | org:users:remove |
| Create, update or delete a custom role | org:roles:manage |
| Set the default app | org:settings:manage |
| List users, list roles, read the role matrix, list a role's members | Any valid token |
| Read app access | A member of the organization, or platform:org:manage |
| Read the permission catalog, list apps | Any valid token |
| Self-signup, email verification, application status | Public |
Platform permissions belong to PlayTelly staff. Customers use the organization-level permissions.
Base path¶
Served by CoreAPI.
{orgId} is the organization ID. Routes that create or list organizations and the self-signup routes have no {orgId}.
Capabilities¶
- Create an organization with its first admin user, for
cloudandon_premhosting - Public self-signup with email verification and a staff approval step
- List organizations and applications, approve, disable, reject, delete
- List, invite, reinvite, change the role or status of, and remove users
- Replace an organization's app access and choose its default app
- List system and custom roles, read the permission matrix, create, update and delete custom roles, list a role's members
- Read the catalog of permission strings
- Billing and tier self-service (planned)
Object model¶
Organization¶
| Field | Type | Description |
|---|---|---|
id |
string | Organization ID. Read-only. |
name |
string | Display name. Required on create. Unique per company code. |
legal_name |
string | Registered company name. Optional. |
website |
string | Company website. Optional. |
timezone |
string | IANA time zone. Defaults to UTC on self-signup. |
status |
string | pending, active or disabled. See states. Read-only except through the status route. |
tier_id |
string | Plan of the organization, for example free. Read-only. |
created_at |
string (ISO 8601) | Creation time. Read-only. |
{
"id": "9b2e4d71-0c3a-4f8e-b6d2-5a1c7e9f3b20",
"name": "Example Cinemas",
"legal_name": "Example Cinemas Sdn Bhd",
"website": "https://www.example.com",
"timezone": "Asia/Kuala_Lumpur",
"status": "active",
"tier_id": "free",
"created_at": "2026-08-01T00:00:00Z"
}
Organization user¶
| Field | Type | Description |
|---|---|---|
userId |
string | User ID. |
name |
string | Full name, or the username when there is no name. |
email |
string | Email address. |
role |
string | Organization role. A system role (ORG_OWNER, ORG_ADMIN, ORG_MANAGER, ORG_OPERATOR, ORG_MEMBER) or the ID of a custom role. |
account_state |
string | Sign-in state, such as active, invited or disabled. |
platform_role |
string or null | Platform role, for PlayTelly staff only. |
Role¶
| Field | Type | Description |
|---|---|---|
id |
string | Role ID. System roles use a readable ID such as ORG_ADMIN; custom roles a generated ID. |
scope |
string | organization or workspace. Platform-scope roles are never returned. |
name |
string | Display name. Unique per organization and scope. |
description |
string | Optional text (role matrix only). |
is_system |
boolean | true for shared roles that cannot be changed (role matrix only). |
user_count |
integer | Members holding the role in this organization (role matrix only). |
permissions |
string[] | Permission strings the role grants (role matrix only). |
Application¶
Returned to staff by GET .../applications:
| Field | Type | Description |
|---|---|---|
reference |
string | Public reference such as APL-K7QM-4XPA-9TDV-2HNC. |
organization_id, org_name, legal_name, org_status, tier_id |
string | The organization the application created. org_status is empty after a rejection. |
status |
string | pending, approved or rejected. |
applicant_username, applicant_email, applicant_given_name, applicant_family_name |
string | The applicant. |
requested_plan, requested_product, app_ids |
string | What the applicant asked for. app_ids is comma separated. |
signup_method |
string | email or google. |
decided_by, decided_at, decision_reason |
string or null | Who decided, when, and the reason for a rejection. |
created_at |
string (ISO 8601) | Submission time. |
Lifecycle or states¶
A self-signup application and its organization move together:
| Step | Application | Organization | What happens |
|---|---|---|---|
| Submit | pending |
pending |
The organization exists with the requested app access. No admin user or sign-in exists yet. |
Approve (PUT .../status with active) |
approved |
active |
The admin user and ORG_ADMIN membership are created, a Default workspace is created, and the admin is emailed their sign-in details with a temporary password. The email is best effort: a failure does not fail the call. |
Reject (POST .../reject) |
rejected |
deleted | The company code becomes free again. The applicant is emailed the reason. |
| Disable | disabled |
Plain status change. Sign-in is blocked. | |
| Enable | active |
Plain status change with no side effects. |
An approval token can approve an application at the moment it is submitted: the response then carries approval: "approved".
Every organization created by POST /api/v1/tenancy/organizations of type cloud, and every approved one, also gets a workspace named Default with the organization's apps and the new admin as its WORKSPACE_ADMIN. There is no way to skip it, and a failure to create it does not fail the call.
Errors¶
| Status | When | What to do |
|---|---|---|
| 400 | A required field is missing, an app ID is unknown, a status or role is invalid, an email verification code is wrong or expired, or no email profile is set up for invites. The body is {"error": "<reason>"}. |
Fix the request. For invites, set up an email profile first (see Integration profiles). |
| 401 | No token, or an invalid or expired token. | Sign in again. |
| 403 | Your role lacks the permission, the organization is not yours, you tried to change your own role, you tried to change a system role, or you tried to change the platform organization's app access. | Ask an administrator, or use another account. |
| 404 | The organization, user, role or application does not exist. | Check the ID. |
| 409 | A role name or company code is already used, a role is still assigned to users, an application is not pending, or a user is no longer invited. |
Resolve the conflict and retry. |
| 429 | More than 20 (confirm-link) or 30 (application status) calls a minute from one address. | Wait a minute. |
Endpoints¶
Related¶
- Workspaces, Teams and Integration profiles
- Authentication API: sign-in, tokens and invitation links
- Identity API: the signed-in user, with organization and workspaces
- Tenancy changelog