Skip to content

Create a sub-account

Request

Creates a sub-account directly beneath the one you are signed in to. The parent is always taken from the caller and cannot be set from the request. The response is the same shape as reading the account, so a follow-up read is not needed.

Only name is required. Send _options.create_admin together with the four contact_* fields to create the account's first administrator at the same time, and add _options.send_welcome to email them an invitation - without an administrator, nobody can sign in to the new account yet.

Leave create_defaults on unless you intend to configure the account from scratch; a sub-account without the default statuses, forms and templates is not usable on its own.

meta is stored whole. The object you send replaces the stored one rather than merging into it, so send every key you want to keep.

Creating a sub-account is refused once the account has reached its configured limit on sub-accounts, and the limit of any account above it applies too, so a parent at its own limit blocks the whole branch.

Fields beyond the ones below are accepted from callers with elevated access. The account's own configured attributes are accepted as custom_* fields.

The endpoint also accepts a recipe file - a blueprint to build the new account from, sent as multipart/form-data instead of JSON. It is left out of the parameters below because a blueprint comes from exporting an existing account, which is not part of the published API.

Security
default
Headers
Rosterfy-Platformstring
Bodyapplication/jsonrequired
namestringrequired

Display name of the sub-account, up to 255 characters. This is what people see in the account switcher and in anything branded with the account name.

contact_firstnamestring

First name of the person to set up as the sub-account's first administrator. Required when _options.create_admin is set, and otherwise recorded as the account contact.

contact_lastnamestring

Last name of that person. Required when _options.create_admin is set.

contact_emailstring

Email address of that person, which becomes the administrator's sign-in address. Required when _options.create_admin is set.

contact_phonestring

Phone number of that person, in international format such as au-297809703. Required when _options.create_admin is set.

_optionsobject
metaobject
visibility_rulesArray of objects

Optional conditions narrowing which people may see or join this sub-account. Structure is not part of the contract and is not validated - build the rules in the admin console and send back what a read returns. Send an empty array to clear them.

sort_orderinteger

Position of the sub-account in lists that show a group of them together. Lower sorts first; accounts sharing a value fall back to name order.

start_timestampstring

When the sub-account becomes active, as YYYY-MM-DD HH:MM:SS. Must be within 25 years either side of now. Leave null for an account that is active immediately.

end_timestampstring

When the sub-account stops being active, as YYYY-MM-DD HH:MM:SS. Must be later than start_timestamp and within 25 years of now. Leave null for no end.

create_defaultsboolean

Whether to populate the new sub-account with the default statuses, forms and templates a usable account needs. Leave it off only when the account is going to be filled from elsewhere. Create only.

localestring

Language the new sub-account starts in, as a locale code such as en or fr. Also becomes the only language available in it until more are added. Create only.

custom_*string

A custom attribute, named by its code - custom_shirt_size, for example. The value follows the attribute's own type, so it may be a string, a number, a boolean or a list. See the custom attributes documentation.

curl -i -X POST \
  https://developer.rosterfy.com/_mock/api-docs/openapi/api/v2/account \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Rosterfy-Platform: admin' \
  -d '{
    "name": "Example Organisation",
    "contact_firstname": null,
    "contact_lastname": null,
    "contact_email": null,
    "contact_phone": null,
    "_options": {
      "create_admin": true
    },
    "meta": {
      "publish": true
    },
    "visibility_rules": [],
    "sort_order": 0,
    "start_timestamp": null,
    "end_timestamp": null,
    "create_defaults": true,
    "locale": null,
    "custom_*": null
  }'

Responses

Bodyapplication/json
objectobject
niceobject
relationsobject
permissionsobject
attributesobject
Response
{ "object": { "id": 20101, "parent_id": 1, "account_type_id": 3, "path": "1/20101", "name": "Example Organisation", "config": { … }, "meta": [], "visibility_rules": [], "status": "approved", "status_reason": null, "sort_order": 0, "start_timestamp": null, "end_timestamp": null, "notes": null, "contact_firstname": null, "contact_lastname": null, "contact_email": null, "contact_phone": null, "support_manager_email": "support.manager@example.com", "allow_deletion_request": 1, "organization_type": null, "contract_start_date": "2026-06-09", "contract_end_date": "2027-06-09", "billing_contact_email": "billing@example.com", "billing_support_email": "billing.support@example.com", "is_enabled": 1, "additional_billing_support_email": "billing.additional@example.com", "delete_requested_at": null, "is_archived": 0, "trial_ends_at": null, "can_erase": 0, "deleted_at": null, "is_erased": 0, "created_at": "2026-06-09T05:33:32.000000Z", "updated_at": "2026-06-09T07:08:01.000000Z", "domain": [ … ] }, "nice": { "rrn": "rrn:local:1:account:20101", "address": "No Address", "address_oneline": "No Address", "account_type_id": 3, "account_type_id:value": 3, "account_type_id:array": 3, "allow_deletion_request": "Yes", "contact_firstname": "", "contact_lastname": "", "contact_phone:qr_code_value": "", "contact_phone": "", "contact_phone:raw": "", "contract_end_date": "Jun 9, 2027", "contract_end_date__dayofweek": "Wednesday", "contract_start_date": "Jun 9, 2026", "contract_start_date__dayofweek": "Tuesday", "name": "Example Organisation", "notes": "", "organization_type": null, "organization_type:value": null, "organization_type:array": null, "status": "Approved", "status:value": "approved", "status:array": "approved", "status_reason": "", "created_at": "2026-06-09 05:33:32", "url": "https://example.rosterfy.com/", "branding_name": "Example Organisation", "branding_subtitle": null, "branding_logo": null, "branding_logo_mono": null, "branding_logo_stacked": null, "branding_banner": null, "branding_favicon": null, "branding_description": null, "branding_primary_color": "#3131c7", "branding_complimentary_color": null, "branding_secondary_color": "#38b6ff", "register": false, "organisation_contact": " ", "has_subaccount_approved_email_template": false, "has_subaccount_rejected_email_template": false, "parent_account_name": "Example Parent Organisation" }, "relations": { "current_user_checkpoint": { … }, "parent": [], "account": [] }, "permissions": { "read": true, "update": false, "delete": false, "apply": false, "apply_error": "Subaccount does not allow User to join", "view_subaccount_selection_menu": false }, "attributes": {} }