Accounts¶
The endpoints available here are related to account management.
POST /accounts¶
Create an account for the current user. If the user already has an account, or self-service account creation is disabled, the request will fail.
If successful, the current user will be an admin of the account.
Path parameters:
None
Required parameters:
title: The title of the organization.
Example request:
curl -X POST https://landscape.canonical.com/api/v2/accounts -H "Authorization: Bearer $JWT" -d '{"title": "Onward, Inc."}'
Example response:
{
"account": "8xag1afp",
"creation_time": "2025-09-15T22:52:11Z",
"administrators": [
{
"name": "Your Name",
"email": "[email protected]",
"openid": "youropenid"
}
],
"disabled": false,
"disabled_reason": null,
"computers": 0,
"company": "Onward, Inc.",
"last_login_time": "2025-09-15T22:52:11Z",
"licenses": [],
"salesforce_account_key": null,
"enabled_features": [],
"subdomain": null
}
GET /standalone-account¶
An endpoint to indicate whether or not the standalone account has been created in a standalone deployment. This endpoint will always return a 404 in any deployment other than a standalone deployment (e.g. SaaS).
Path parameters:
None
Required parameters:
None
Example request:
curl -X GET https://landscape.example.com/api/v2/standalone-account
Example response:
{"exists": true}
POST /standalone-account¶
Create a standalone account with the first administrator. If this is not a standalone deployment or a standalone account already exists, the request will fail.
Path parameters:
None
Required parameters:
email: The email of the first administrator.name: The name of the first administrator.password: The password of the first administrator. Set enforce_password_strength toTrueto enforce password strength requirements.
Example request:
curl -X POST https://landscape.example.com/api/v2/standalone-account -H "Authorization: Bearer $JWT" -d '{"email": "[email protected]", "name": "John Doe", "password": "Passw0rd"}'
Example response:
{
"account": "standalone",
"creation_time": "2025-09-15T22:52:11Z",
"administrators": [
{
"name": "John Doe",
"email": "[email protected]",
"openid": null,
}
],
"disabled": false,
"disabled_reason": null,
"computers": 0,
"company": "Organization",
"last_login_time": "2025-09-15T22:52:11Z",
"licenses": [],
"salesforce_account_key": null,
"enabled_features": [],
"subdomain": null
}