1. Docs
  2. API Reference
  3. Create a new Application in the Account

Create a new Application in the Account

POST/portal/v1/accounts/{accountSlug}/applications

Creates 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

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Requires capability applications.manageDeveloper Console

Create, 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

  • dataApplicationResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Errors

When the request can't be completed, the response body includes a stable error code you can branch on.

403account.capability_requiredForbidden
When it happens

The signed-in user's administrator roles do not grant the capability this endpoint requires.

Remediation

Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.

Returned object

Request
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"
  }'
Response
{
  "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"
  }
}
Related endpoints
GETList Applications in the Account
Was this page helpful?

Tell us how we can improve this guide.