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

# Update Database

> Updates the name or description of a specific database by its ID.

<ParamField path="id" type="string" required>
  The ID of the database to update.
</ParamField>

<ParamField body="updates" type="object">
  The fields to update for the database.

  <Expandable title="Toggle object">
    <ParamField name="name" type="string">
      The new name for the database.
    </ParamField>

    <ParamField name="description" type="string">
      The new description for the database.
    </ParamField>
  </Expandable>
</ParamField>

### Response

<ResponseField name="response" type="object">
  The updated details of the database.

  <Expandable title="Toggle object">
    <ResponseField name="id" type="string">
      The ID of the database.
    </ResponseField>

    <ResponseField name="cluster" type="number">
      The cluster ID where the database is hosted.
    </ResponseField>

    <ResponseField name="type" type="number">
      The type of the database.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the database.
    </ResponseField>

    <ResponseField name="description" type="string">
      The description of the database.
    </ResponseField>

    <ResponseField name="owner_id" type="string">
      The ID of the database owner.
    </ResponseField>

    <ResponseField name="owner_plan_id" type="number">
      The ID of the owner's plan.
    </ResponseField>

    <ResponseField name="status" type="string">
      The status of the database (e.g., `up`).
    </ResponseField>

    <ResponseField name="ram" type="number">
      The RAM allocated to the database in MB.
    </ResponseField>

    <ResponseField name="host" type="string">
      The host address of the database.
    </ResponseField>

    <ResponseField name="port" type="number">
      The port used by the database.
    </ResponseField>

    <ResponseField name="last_snapshot" type="string | null" format="date-time">
      The timestamp of the last snapshot, if available.
    </ResponseField>

    <ResponseField name="created_at" type="string" format="date-time">
      The timestamp when the database was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string" format="date-time">
      The timestamp when the database was last updated.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "response": {
      "id": "639d9aa35d8b4e559bcd066db4ddcc8c",
      "cluster": 1,
      "type": 1,
      "name": "UpdatedDatabase",
      "description": "Updated description",
      "owner_id": "993591427428790342",
      "owner_plan_id": 1,
      "status": "up",
      "ram": 256,
      "host": "639d9aa35d8b4e559bcd066db4ddcc8c.db.usa1.vertraweb.app",
      "port": 12748,
      "last_snapshot": "2026-03-14T19:58:00Z",
      "created_at": "2026-03-14T19:58:00Z",
      "updated_at": "2026-03-14T20:00:00Z"
    }
  }
  ```
</ResponseExample>

### Error Responses

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

  * `UNAUTHORIZED`: The user is not authenticated or lacks sufficient permissions.
  * `DATABASE_NOT_FOUND_OR_FORBIDDEN`: The specified database does not exist or the user lacks access.
  * `INVALID_NAME`: The provided name is invalid.
  * `INVALID_DESCRIPTION`: The provided description is invalid.
</ResponseField>

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

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

  ```json Error Response (404) theme={null}
  {
    "code": "DATABASE_NOT_FOUND_OR_FORBIDDEN"
  }
  ```

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