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

# Link Database

> Links one of your databases to the workspace. Owner only.

Same rules as [Link Application](/api-reference/endpoint/workspaces/links/add-app): owner only,
`workspaces:write` scope for an API key, and the database must be owned by the caller.

### Path

<ParamField path="id" type="string" required>Workspace ID.</ParamField>
<ParamField path="db_id" type="string" required>Database ID. Must be owned by the caller.</ParamField>

### Response

Empty response on success.

### Errors

| Status | Code                      | When                                                 |
| ------ | ------------------------- | ---------------------------------------------------- |
| 403    | `WORKSPACE_OWNER_ONLY`    | Caller isn't the workspace owner.                    |
| 403    | `PLAN_RESTRICTED_FEATURE` | Owner's plan is frozen.                              |
| 404    | `WORKSPACE_NOT_FOUND`     | Workspace doesn't exist or you're not a member.      |
| 404    | `DATABASE_NOT_FOUND`      | Database doesn't exist or isn't owned by the caller. |
