> ## 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.

# Add Database to Workspace

> Adds a database to an workspace by its ID.

<ParamField path="org_id" type="string" required>
  The ID of the workspace to add the database to.
</ParamField>

<ParamField path="db_id" type="string" required>
  The ID of the database to add to the workspace.
</ParamField>

### Response

<ResponseExample>
  ```json Response theme={null}
  {}
  ```
</ResponseExample>

### Error Responses

<ResponseField name="code" type="string">
  The error code indicating the reason for failure. Possible values:

  * `FORBIDDEN`: The user is not authenticated or lacks sufficient permissions (requires `owner` or `admin` role).
  * `DATABASE_NOT_FOUND`: The specified database does not exist or the user is not the owner.
</ResponseField>

<ResponseField name="message" type="string">
  A descriptive message providing additional details about the error.
</ResponseField>

<ResponseExample>
  ```json Error Response (403) theme={null}
  {
    "code": "FORBIDDEN"
  }
  ```

  ```json Error Response (404) theme={null}
  {
    "code": "DATABASE_NOT_FOUND"
  }
  ```
</ResponseExample>
