Create a new Application in the Account
/portal/v1/accounts/{accountSlug}/applicationsCreates a new Application in the Account from a name and optional slug (derived from the name when omitted). In one transaction it inserts the Application and seeds its default Environments, each with its own root hierarchy node. A slug already in use within the Account returns 409 (application.slug_conflict). Writes an application.created audit row.
Authentication
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
applications.manageDeveloper ConsoleCreate, edit, and delete Applications and Environments. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.
Request body
application/json
namestring Required Display name for the new Application
slugstring Optional URL-safe slug. Must be lowercase alphanumeric with optional dashes (no leading/trailing dash). Auto-derived from `name` when omitted.
Responses
application/json
data *ApplicationResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Errors
When the request can't be completed, the response body includes a stable error code you can branch on.
account.capability_requiredForbiddenThe signed-in user's administrator roles do not grant the capability this endpoint requires.
Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.
Returned object
curl -X POST "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/applications" \ -H "Authorization: Bearer $CANOPY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "slug": "string" }'
{ "data": { "id": "string", "account_id": "string", "name": "string", "slug": "string", "default_environment_id": "string", "settings": {}, "version": 0, "created_at": "2026-04-20T12:00:00.000Z", "updated_at": "2026-04-20T12:00:00.000Z" } }
Tell us how we can improve this guide.