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

# Restore Group

> Restore a group deleted within the last five days, along with the member databases that were deleted with it. Requires a paid plan, an admin or owner of the organization, and recovery enabled for the organization. If some databases fail to restore, the group still becomes active: retry the failed database UUIDs individually with Restore Database.

<Note>
  Unlike the v1 endpoints, this endpoint identifies the organization and group by
  **UUID** — use the `id` field from
  [Retrieve Organization](/api-reference/organizations/retrieve) and the `uuid`
  field from [List Deleted Groups](/api-reference/groups/list-deleted).
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/groups/{groupId}/restore' \
    -H 'Authorization: Bearer TOKEN'
  ```
</RequestExample>


## OpenAPI

````yaml POST /v3/organizations/{organizationId}/groups/{groupId}/restore
openapi: 3.0.1
info:
  title: Turso Platform API
  description: API description here
  license:
    name: MIT
  version: 0.1.0
servers:
  - url: https://api.turso.tech
    description: Turso's Platform API
security: []
paths:
  /v3/organizations/{organizationId}/groups/{groupId}/restore:
    post:
      summary: Restore Group
      description: >-
        Restore a group deleted within the last five days, along with the member
        databases that were deleted with it. Requires a paid plan, an admin or
        owner of the organization, and recovery enabled for the organization. If
        some databases fail to restore, the group still becomes active: retry
        the failed database UUIDs individually with Restore Database.
      operationId: restoreGroup
      parameters:
        - $ref: '#/components/parameters/organizationId'
        - $ref: '#/components/parameters/groupId'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    $ref: '#/components/schemas/Group'
                    description: The restored group.
                  databases:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeletedDatabase'
                    description: >-
                      The member databases restored with the group, in restore
                      order.
                  failures:
                    type: object
                    additionalProperties:
                      type: string
                    description: >-
                      Maps database UUID to error message for members whose
                      restore failed. Retry them individually with Restore
                      Database.
        '400':
          description: >-
            Recovery is disabled for the organization, or the request is
            invalid.
        '403':
          description: >-
            The organization is on the free plan, or the caller is not an admin
            or owner.
        '404':
          description: >-
            No deleted group with this UUID exists, or its recovery window has
            passed.
components:
  parameters:
    organizationId:
      name: organizationId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: >-
        The UUID of the organization. Retrieve it with the Retrieve Organization
        endpoint (the `id` field).
    groupId:
      name: groupId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: >-
        The UUID of the group, as returned when listing deleted groups (the
        `uuid` field).
  schemas:
    Group:
      allOf:
        - $ref: '#/components/schemas/BaseGroup'
        - type: object
    DeletedDatabase:
      type: object
      properties:
        Name:
          type: string
          description: The database name.
        DbId:
          type: string
          format: uuid
          description: The database UUID. Use it to restore the database.
        Hostname:
          type: string
          description: >-
            The DNS hostname the database had, used for client and HTTP
            connections.
        group:
          type: string
          description: The name of the group the database belonged to.
        group_id:
          type: string
          format: uuid
          description: The UUID of the group the database belonged to.
        organization_id:
          type: string
          format: uuid
          description: The UUID of the organization.
        regions:
          type: array
          items:
            type: string
          description: The regions the database was located in.
        primaryRegion:
          type: string
          description: The primary region of the database.
        delete_protection:
          type: boolean
          description: Whether delete protection was enabled for the database.
        deleted_at:
          type: string
          format: date-time
          description: When the database was deleted.
        group_deleted_at:
          type: string
          format: date-time
          description: >-
            Set when the database's group was deleted with it. Restoring the
            database also restores the group.
    BaseGroup:
      type: object
      properties:
        name:
          type: string
          description: The group name, unique across your organization.
          example: default
        version:
          type: string
          description: >-
            The current libSQL server version the databases in that group are
            running.
          example: v0.23.7
          deprecated: true
        uuid:
          type: string
          description: The group universal unique identifier (UUID).
          example: 0a28102d-6906-11ee-8553-eaa7715aeaf2
        locations:
          type: array
          items:
            type: string
          description: An array of location keys the group is located.
          example:
            - aws-us-east-1
          deprecated: true
        primary:
          type: string
          description: The primary location key.
          example: us-east-1
        delete_protection:
          type: boolean
          description: >-
            The current status for delete protection. If enabled, the group and
            all its databases cannot be deleted.
          example: false

````