# POST /api/v1/apps/actions/sso

> Read, install, update, back up, log in to, configure or uninstall an Installatron application

- Group: applications
- Tier: W
- Required scope: read:hosting
- Docs: https://api.inleed.com/reference/applications/create-app-2

## Description

`action=detail` returns one record and needs read access. `install` needs `application` (from `list_available_apps`); `update` needs `app_id`; `backup` takes an on-demand backup; `configure` sets the auto-update policy (`autoup*`) and/or `title`. Those need `write:hosting`. `sso` returns a one-time admin login URL and needs `sso:hosting`.

## Body

- `input` — string (required). A domain, email address, website URL, or Inleed service id — for example example.se, info@example.se or 42976. Resolved to the owning account automatically, and the resolved target is echoed back in the response.
- `action` — enum (required). detail one app, install a new one, update one, backup one now, sso a one-time admin login, configure auto-updates/title, uninstall one, or delete_backup (the last two are confirmation-tier, need delete:hosting). One of detail, install, update, backup, sso, configure, uninstall, delete_backup.
- `app_id` — string. The application id, from list_apps (apps[].id). Optional when url or path names the install instead — prefer those: they are the address the customer used and cannot be mis-copied; with none given the app at the domain root is meant.
- `url` — string. Instead of app_id: the install's address as listed, e.g. https://example.com/shop (scheme and trailing slash do not matter).
- `backup_id` — string. For delete_backup: the backup id from list_app_backups (backups[].id).
- `application` — string. For install: the application to install (e.g. wordpress), an id from the REST GET /apps/available.
- `title` — string. For install or configure: the site title. Letters, digits, spaces and ._,- only.
- `admin_username` — string. Optional for install: the application admin username (letters, digits, -_). Installatron generates one if omitted.
- `admin_email` — string. Optional for install: the application admin email address.
- `version` — string. Optional for install: a specific version to install. Omit for the latest.
- `path` — string. For install: the subfolder to install into (e.g. shop); omit for the domain root.
- `autoup` — enum. For configure: core auto-update policy — none, minor (security/minor only) or all. One of none, minor, all.
- `autoup_plugins` — enum. For configure: plugin auto-update policy. One of none, all.
- `autoup_themes` — enum. For configure: theme auto-update policy. One of none, all.
- `autoup_backup` — enum. For configure: whether a backup is taken before each auto-update. One of none, all.
- `attempt_key` — string. An idempotency key you choose for an uninstall/delete_backup. Reusing it within an hour returns the same held action.

## Request

```bash
curl -X POST "https://mcp.inleed.com/api/v1/apps/actions/sso" \
  -H "Authorization: Bearer inl_live_…" \
  -H "Content-Type: application/json" \
  -d '{"input":"example.se","action":"detail","app_id":"res_01hx8n3k5p7q9r2s4t6v8w0y38","url":"https://mcp.inleed.com/…","backup_id":"res_01hx8n3k5p7q9r2s4t6v8w0y39","application":"example.se","title":"Resolved via the owning account.","admin_username":"inleed42","admin_email":"info@example.se","version":"8.3","path":"example.se","autoup":"none","autoup_plugins":"none","autoup_themes":"none","autoup_backup":"none","attempt_key":"example.se"}'
```

## Errors

- **400**  — codes: invalid_request
- **401** No token was presented, or the token is revoked, expired or unknown. — codes: unauthorized, token_expired, token_revoked
- **403** The token lacks a required scope, or this account does not own the resource. — codes: insufficient_scope, domain_not_owned
- **404** No such resource for this account. — codes: not_found
- **422** Validation error — codes: validation_failed
- **429** The rate limit for this token is exhausted. See `Retry-After`. — codes: rate_limited
- **500** Something went wrong on our side. The failure is logged against `requestId`. — codes: internal_error

## Related

- GET /api/v1/apps — https://api.inleed.com/reference/applications/list-apps
- POST /api/v1/apps — https://api.inleed.com/reference/applications/manage-app
- PATCH /api/v1/apps — https://api.inleed.com/reference/applications/update-app
- DELETE /api/v1/apps — https://api.inleed.com/reference/applications/delete-app

