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

# Rename a database

> Rename a database.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/databases/{id}
openapi: 3.1.0
info:
  title: rial API
  version: 0.1.0
  description: 'Prove a photo is real. Base URL: https://api.rial.io'
  contact:
    name: rial-platform team
    url: https://github.com/Rial-ventures-Inc/rial-platform
  license:
    name: UNLICENSED — proprietary, internal use only
servers:
  - url: https://api.rial.io
    description: Production
security: []
tags:
  - name: Verifications
    description: >-
      Create, fetch, list, and finalize verifications. The core of the API —
      every tenant integration starts here.
  - name: Templates
    description: >-
      Publish, update, revoke and inspect link templates — the reusable capture
      links behind `/l/{token}` (a compact JWT carrying the org and template
      slugs; the legacy `/l/{org}/{slug}` keeps resolving). Callable with a
      secret key; each publish snapshots a versioned capture spec (GET-83).
  - name: Databases
    description: >-
      Create, update, inspect and synchronize tenant-scoped databases used by
      reusable verification templates. Callable with a dashboard session or
      secret API key.
paths:
  /v1/databases/{id}:
    patch:
      tags:
        - Databases
      summary: Rename a database
      description: Rename a database.
      parameters:
        - schema:
            type: string
            pattern: ^[A-Za-z0-9_-]{1,64}$
            description: Database id — stable across re-uploads.
            example: db_01hz3k9m2q
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
              required:
                - name
              additionalProperties: false
      responses:
        '200':
          description: Renamed database.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatorDatabase'
        '400':
          description: Invalid name.
        '404':
          description: No database with that id for the authenticated tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: not_found
                  message: Resource not found
        '503':
          description: The store is unreachable — retry with backoff.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  cause:
                    type: string
                required:
                  - error
              example:
                error: storage_unavailable
      security:
        - bearerApiKey: []
components:
  schemas:
    OperatorDatabase:
      oneOf:
        - type: object
          properties:
            id:
              type: string
              pattern: ^[A-Za-z0-9_-]{1,64}$
            name:
              type: string
              minLength: 1
              maxLength: 80
            identifier_column:
              type: string
            columns:
              type: array
              items:
                type: string
            rows:
              type: array
              items:
                type: array
                items:
                  type: string
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            source:
              type: string
              enum:
                - csv
          required:
            - id
            - name
            - columns
            - rows
            - created_at
            - updated_at
            - source
          additionalProperties: false
        - type: object
          properties:
            id:
              type: string
              pattern: ^[A-Za-z0-9_-]{1,64}$
            name:
              type: string
              minLength: 1
              maxLength: 80
            identifier_column:
              type: string
            columns:
              type: array
              items:
                type: string
            rows:
              type: array
              items:
                type: array
                items:
                  type: string
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            source:
              type: string
              enum:
                - provider
            source_details:
              type: object
              properties:
                provider:
                  type: string
                  enum:
                    - google_sheets
                connection_id:
                  type: string
                  pattern: ^[A-Za-z0-9_-]{1,64}$
                spreadsheet_id:
                  type: string
                  minLength: 1
                spreadsheet_title:
                  type: string
                sheet_id:
                  type: integer
                sheet_title:
                  type: string
                source_url:
                  type: string
                  format: uri
              required:
                - provider
                - connection_id
                - spreadsheet_id
                - spreadsheet_title
                - sheet_id
                - sheet_title
                - source_url
              additionalProperties: false
            sync:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - synced
                    - syncing
                    - error
                    - reauthorization_required
                last_synced_at:
                  type: string
                  format: date-time
                last_attempt_at:
                  type: string
                  format: date-time
                next_sync_at:
                  type: string
                  format: date-time
                error_code:
                  type: string
                  enum:
                    - source_not_found
                    - tab_not_found
                    - invalid_table
                    - quota
                    - upstream
              required:
                - status
                - last_synced_at
                - last_attempt_at
              additionalProperties: false
          required:
            - id
            - name
            - columns
            - rows
            - created_at
            - updated_at
            - source
            - source_details
            - sync
          additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
                required:
                  - path
                  - message
          required:
            - code
            - message
      required:
        - error
      description: >-
        Uniform error envelope. `code` is the stable string SDKs branch on
        (`invalid_request`, `unauthorized`, `not_found`, `expired`, `step_full`,
        `unknown_step`, `steps_incomplete`, `already_finalized`,
        `too_many_requests`, `storage_unavailable`, `internal_error`). `fields`
        is only present on `invalid_request` validation failures.
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: rk_secret_<key>
      description: >-
        Secret API key, created in the dashboard under Settings → API. Send it
        as `Authorization: Bearer rk_secret_…` from your server only.
        Publishable keys (`pk_live_…`) are for the native SDKs and reach the
        capture endpoints alone. An unknown key returns 401.

````