# Run apps for an organization

> Create and run apps that belong to an organization from its Apps tab, and see which members can change them.

Source: https://www.coritan.com/docs/apps/organization-apps/

In the dashboard:

- /dashboard/organizations/…/apps: https://www.coritan.com/dashboard/organizations

An organization can own apps, apart from the apps on your account. Its **Apps** tab lists them and opens the same pages your own apps have, for deployments, domains, environment variables and settings. Owners and admins make changes there. Every other member of the organization sees the same pages without the controls that change anything.

## Before you begin

- Apps must be on for the platform. While it is off, the organization has no **Apps** tab, and an address under the tab opens the organization's **Overview** instead.
- You need to be a member of the organization. To create, deploy, change or delete its apps, you need the owner or admin role ([Organization roles and permissions](/docs/organizations/roles-and-permissions/)).

## Open the organization's apps

1. In the [dashboard](https://www.coritan.com/dashboard/organizations), go to **Organizations** and open the organization.
2. Select the **Apps** tab, after **Cloud Compute**.
3. Select an app to open its page. **All apps** takes you back to the list.

The **Apps** card lists each app with its **Status**, **Regions** and **Last deployment**, as your own list does ([Find your apps in the dashboard](/docs/apps/#find-your-apps-in-the-dashboard)). Search by name, address, repository or image, and filter the list to **All**, **Live**, **Not live** or **Suspended** apps. The card's description counts the organization's apps against its limit, such as `The organization's apps: 3 of 20 apps used.`

An app's page has the tabs your own apps have, and each one works as its page describes:

- **Deployments**: [Deploy an app](/docs/apps/deploy-an-app/), [Read a deployment and its build log](/docs/apps/read-a-deployment/) and [Roll back to an earlier deployment](/docs/apps/roll-back-a-deployment/).
- **Domains**: [Add a custom domain](/docs/apps/custom-domains/).
- **Environment**: [Set environment variables](/docs/apps/environment-variables/).
- **Settings**: [Change or delete an app](/docs/apps/app-settings/) and [Deploy on every push](/docs/apps/push-webhook/).

## Create an app for the organization

1. On the organization's **Apps** tab, select **New app…**.
2. Fill in the form as for an app of your own ([Create an app](/docs/apps/create-an-app/#create-an-app-in-the-dashboard)).
3. Select **Create app**.

The app belongs to the organization, not to the member who created it. When the organization has as many apps as it may, **New app…** is off and the card's description ends `Delete an app to create another.`

## What members below admin see

With a role below admin (Billing, any support tier or Read only), you can open every app and read its deployments, build logs, domains, variable names and settings. The top of the tab says `Changes here need an owner or admin; the tables below are read-only for you.`

Your pages have no **New app…**, **Deploy…** or **Redeploy…** button, and:

- A deployment has no **Roll back to this…** or **Cancel deployment…**, in its menu or on its page.
- **Domains** has no **Add domain…**, **Verify** or **Remove domain…**.
- **Environment** has no **Add variable…**, and no menu for each variable.
- **Settings** has no save buttons, no **Rotate secret…** or **Create secret…** and no **Delete this app** card, and its fields cannot be edited. The **Access token** field shows `None`, or `Saved` with the token's last characters.

The address of the create form, `…/apps/new`, shows you `Creating an app needs an owner or admin`. To make changes, ask the owner or an admin to give you the admin role ([Change a member's role](/docs/organizations/members-and-roles/#change-a-member-s-role)).

## How an organization's apps differ from yours

An organization's apps work as your own do, with these differences:

- Only the organization's **Apps** tab lists them. **Apps** in the sidebar lists the apps on your account, and never an organization's, even one you own.
- Every member of the organization can see them. Only owners and admins can change them.
- They count towards the organization's app limit, which is separate from your account's ([Apps limits](/docs/apps/limits/#apps)).
- In the deployment history, a deployment that a member started says `A member` where yours say `You`. One started from a staff console session says `The staff console`.
- Each change a member makes goes into the organization's audit log, on the **Audit** tab for owners and admins ([Read the organization audit log](/docs/organizations/audit-log/)). Its actions start with `app.`, such as `app.deploy`, and the **Actor** column names the member. Deployments that a push starts are not in the log; the deployment history shows them, started by `The push webhook`.
- An app stays with the owner it was created for. No request moves it between your account and an organization.
- The organization cannot be deleted while it has apps. The **Delete organization** card on its **Settings** tab lists them as, for example, `2 apps still running`, with `Delete them first; their replicas and domains go with them.` Delete each one from its own **Settings** tab ([Delete an app](/docs/apps/app-settings/#delete-an-app)).

## Result

The organization's apps are on its **Apps** tab, and every member of the organization can open them. Owners and admins deploy and change them there, and the other members read them.

## Troubleshooting

The organization has no **Apps** tab
: Apps is off for the platform, or the dashboard could not reach Apps when the page loaded. Reload the page to ask again. When **Apps** is missing from the sidebar too, see [Apps is not in the dashboard](/docs/apps/troubleshooting/#apps-is-not-in-the-dashboard).

A button such as **New app…** or **Deploy…** is missing
: Your role in the organization is below admin. The badge next to the organization's name shows your role. [A button is missing or turned off](/docs/apps/troubleshooting/#a-button-is-missing-or-turned-off) lists the other reasons.

`This app is not in this organization`
: The app belongs to another organization or to an account, it was deleted, or the address is mistyped. Open it from the organization's **Apps** tab. An app of your own is under **Apps** in the sidebar.

`Could not load the organization's apps`
: The list did not load. Select **Try again**.

`The organization has as many apps as it may`
: The organization has reached its app limit. Delete an app it no longer needs, then create the new one.

`No such organization`
: You are not a member of the organization, or it does not exist. Ask its owner to add you ([Add a member](/docs/organizations/members-and-roles/#add-a-member)).

## Related

- [Apps](/docs/apps/)
- [Create an app](/docs/apps/create-an-app/)
- [Change or delete an app](/docs/apps/app-settings/)
- [Organization roles and permissions](/docs/organizations/roles-and-permissions/)
- [Manage members and roles](/docs/organizations/members-and-roles/)
- [Read the organization audit log](/docs/organizations/audit-log/)
- [Delete an organization](/docs/organizations/delete-an-organization/)

## With the API

An organization's apps are under `/api/v1/orgs/{org_slug}/apps`. The requests take the same bodies and give the same answers as your own apps under `/api/v1/client/apps` ([Apps for an organization](/docs/apps/#apps-for-an-organization)), and each task page shows its request with the organization's path. [`GET /api/v1/orgs/{org_slug}/apps`](/docs/api/reference/organizations/organization-apps/#op-get-api-v1-orgs-org-slug-apps) lists the organization's apps:

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/apps" \
  -H "Authorization: Bearer $CORITAN_TOKEN"
```

Each app in the answer has `owner` set to `{"type": "organization"}`. In the answer to `GET /api/v1/orgs/{org_slug}/apps/regions`, `limits.apps_used` counts the organization's apps, not yours ([Regions, sizes and limits](/docs/apps/#regions-sizes-and-limits)).

Any member's access token can read, and a request that changes something needs the owner or admin role. These answers are particular to the organization's paths:

| Status | Message | Why |
| --- | --- | --- |
| `403` | `Admin access required` | The member is not an owner or admin of the organization. |
| `403` | `Not a member of this organization` | The Coritan account is not a member of the organization. |
| `403` | `Confirm your password or a code from your authenticator to do this.` | A staff console session asked to delete an app without a step-up in the last 10 minutes ([Confirm it is you](/docs/organizations/staff-console/sign-in/#confirm-it-is-you)). |
| `404` | `Organization not found` | No active organization has that slug. |

## API

- `GET /api/v1/orgs/{org_slug}/apps`: List apps (https://www.coritan.com/docs/api/reference/organizations/organization-apps/#op-get-api-v1-orgs-org-slug-apps)
- `GET /api/v1/orgs/{org_slug}/apps/regions`: Regions (https://www.coritan.com/docs/api/reference/organizations/organization-apps/#op-get-api-v1-orgs-org-slug-apps-regions)
