> ## Documentation Index
> Fetch the complete documentation index at: https://www.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.

# database_branch_not_found

> The database has no branch with the requested name or id.

> [!CAUTION]
>
> `err:unkey:data:database_branch_not_found`

The database has no branch in PlanetScale with the name or id you gave. In `databases.createBranch` this is the `parent` name, or the default branch of the database if you left `parent` out. In `connections.createConnection` and `connections.updateConnection` this is `config.planetscaleDatabase.branch`, an id or a name. You get HTTP 404.

```json Example response theme={"system"}
{
  "meta": {
    "requestId": "req_2c9a0jf23l4k567"
  },
  "error": {
    "detail": "The database has no branch with the name of the parent branch.",
    "status": 404,
    "title": "Not Found",
    "type": "/errors/unkey/data/database_branch_not_found"
  }
}
```

## Likely causes

* The name or id has a typo. Branch names are case-sensitive.
* Someone deleted or renamed the branch in PlanetScale.

## How to fix

1. List the branches of the database with `databases.listBranches`.
2. Retry with a name or `id` from the list. If the branch you need is gone, create it again with `databases.createBranch`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.