1. Docs
  2. API Reference
  3. Update the admin's resume-state for this Application

Update the admin's resume-state for this Application

PUT/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state

Authentication

  • Bearer Token Authorization

    JWT access token

Request body

  • environment_slugstring*

    Slug of the env the admin is now active in. Must be a real env in this Application.

Code samples

cURLJavaScriptPythonGo
curl -X PUT "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state" \
  -H "Authorization: Bearer $CANOPY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "environment_slug": "string"
  }'

Responses

200 Records the admin's currently-active env so the dashboard can resume them on the same env after sign-out / device switch.
{
  "environment_slug": "string"
}

application/json

  • environment_slugstring*

    Slug of the env the admin should land on for this App. Resolved server-side from the admin's last-active env, falling back to the App's default. Null only when the App has no envs.

400 The supplied `environment_slug` does not exist in this Application
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)

Returned object

On this page

Related endpoints

GETGet the current Application
PATCHUpdate the Application name or settings
DELETEDelete an Application
PUTSet the App's default Environment
GETGet the admin's resume-state for this Application