> ## Documentation Index
> Fetch the complete documentation index at: https://unkey.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Unkey is two separate products. Compute builds, deploys, and runs apps behind a gateway. API Management issues API keys, enforces rate limits, manages identities and permissions, and reports usage. Say which product a page belongs to; a reader can use either without the other.
> Every Unkey API endpoint is an HTTP POST to https://api.unkey.com/v2/{service}.{procedure} with a root key in the Authorization: Bearer header. Root keys are workspace scoped.
> Error codes have the form err:{system}:{category}:{specific} and each has a page at /errors/{system}/{category}/{specific}.
> The word environment means production or preview in Compute. Rate limiting has four meanings on this site; the glossary lists them.

# portal_already_exists

> The portal slug is taken, or the app or keyspace already has a portal.

<Danger>`err:unkey:data:portal_already_exists`</Danger>

`portal.createPortal` or `portal.updatePortal` clashed with an existing portal. Nothing was created or changed. You get HTTP 409.

```json Example response theme={"system"}
{
  "meta": {
    "requestId": "req_2c9a0jf23l4k567"
  },
  "error": {
    "detail": "A portal already exists for that slug, app, or keyspace.",
    "status": 409,
    "title": "Conflicting Resource",
    "type": "/errors/unkey/data/portal_already_exists"
  }
}
```

## Likely causes

* The slug is already used in your workspace: `That slug is already in use.`
* The app or keyspace already has a portal: `That app or keyspace already has a portal.` Each one can back only one portal across all workspaces, so the existing portal may be one you can't see.
* Two requests clashed at the same moment. You get the generic message shown above.

## How to fix

1. For a slug clash, pick another slug or update the existing portal.
2. For an app or keyspace clash, find the existing portal with `portal.getPortal` by app or keyspace. If you can't see one in this workspace, it's in another workspace.

## Related errors

* [`err:unkey:data:portal_not_found`](/docs/errors/unkey/data/portal_not_found): the portal or the mapped resource isn't visible to you.
* [`err:unkey:authorization:insufficient_permissions`](/docs/errors/unkey/authorization/insufficient_permissions): your root key may not point a portal at that app or keyspace.
