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

# Reset Safe Account

> Permanently deletes the Safe account for the authenticated user. This operation is irreversible and should be used with caution.

**Prerequisites for Safe Reset:**
- Safe account must exist for the user
- Safe account must not be in a properly configured state (AccountIntegrityStatus.Ok)
- Safe account must not have transactions in the delay queue (AccountIntegrityStatus.DelayQueueNotEmpty)
- User must not have any active (non-voided) cards linked to the Safe
- Safe account must have zero token balance (all tokens must be withdrawn first)

**Use Cases:**
- Reset a Safe account that failed during deployment or setup
- Clean up a Safe account that is in an inconsistent state
- Remove a Safe account before creating a new one

**Important Notes:**
- This operation permanently deletes the Safe account record from the database
- The actual Safe contract on-chain is not affected by this operation
- Users will need to deploy a new Safe account after reset




## OpenAPI

````yaml https://api.gnosispay.com/api-docs/spec.json delete /api/v1/safe/reset
openapi: 3.0.0
info:
  title: GnosisPay API
  version: 1.0.0
  description: OpenAPI documentation for GnosisPay
servers:
  - url: https://api.gnosispay.com
security: []
tags:
  - name: Account Management
    description: Information about your Account
  - name: Authentication
    description: Authenticate to our API using SIWE
  - name: Card Management
    description: Manage all your Cards
  - name: IBAN
    description: Integrate with Monerium to issue IBANs
  - name: KYC
    description: KYC using Sumsub SDK
  - name: Physical Card Order
    description: Order a Physical Card and manage the process
  - name: Rewards
    description: Cashback Rewards
  - name: Safe Management
    description: Manage your Safe
  - name: Transactions
    description: Manage Card Transactions
  - name: User
    description: Manage User Information
  - name: Webhooks
    description: Manage Webhooks
paths:
  /api/v1/safe/reset:
    delete:
      tags:
        - Safe Management
      summary: Reset Safe Account
      description: >
        Permanently deletes the Safe account for the authenticated user. This
        operation is irreversible and should be used with caution.


        **Prerequisites for Safe Reset:**

        - Safe account must exist for the user

        - Safe account must not be in a properly configured state
        (AccountIntegrityStatus.Ok)

        - Safe account must not have transactions in the delay queue
        (AccountIntegrityStatus.DelayQueueNotEmpty)

        - User must not have any active (non-voided) cards linked to the Safe

        - Safe account must have zero token balance (all tokens must be
        withdrawn first)


        **Use Cases:**

        - Reset a Safe account that failed during deployment or setup

        - Clean up a Safe account that is in an inconsistent state

        - Remove a Safe account before creating a new one


        **Important Notes:**

        - This operation permanently deletes the Safe account record from the
        database

        - The actual Safe contract on-chain is not affected by this operation

        - Users will need to deploy a new Safe account after reset
      responses:
        '200':
          description: Successfully reset the Safe account
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message confirming the Safe account was reset
                    example: Safe account reset successfully
              examples:
                success:
                  summary: Safe Reset Success
                  description: The Safe account has been successfully reset and deleted
                  value:
                    message: Safe account reset successfully
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Safe account not found for the authenticated user
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating no Safe account exists
                    example: Safe account not found
              examples:
                notFound:
                  summary: Safe Account Not Found
                  description: No Safe account exists for the authenticated user
                  value:
                    message: Safe account not found
        '422':
          description: Safe account cannot be reset due to validation constraints
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message explaining why the Safe cannot be reset
              examples:
                alreadySetup:
                  summary: Safe Already Properly Setup
                  description: The Safe account is already in a properly configured state
                  value:
                    message: Safe account is already properly setup
                delayQueueNotEmpty:
                  summary: Delay Queue Not Empty
                  description: The Safe account has pending transactions in the delay queue
                  value:
                    message: >-
                      Safe account is already properly setup and has
                      transactions in the delay queue
                hasActiveCards:
                  summary: Active Cards Linked
                  description: The Safe account has active cards that must be voided first
                  value:
                    message: >-
                      Safe account has cards linked to it, please void them
                      first
                hasTokenBalance:
                  summary: Non-Zero Token Balance
                  description: The Safe account has tokens that must be withdrawn first
                  value:
                    message: Safe account has tokens in it, please withdraw them first
                balanceCheckError:
                  summary: Balance Check Failed
                  description: >-
                    Unable to check the Safe account balance, please try again
                    later
                  value:
                    message: Error fetching safe balance, please try again later
        '500':
          description: Internal server error occurred during the reset operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Generic error message for internal server errors
                    example: Internal server error.
              examples:
                internalError:
                  summary: Internal Server Error
                  description: >-
                    An unexpected error occurred while processing the reset
                    request
                  value:
                    message: Internal server error.
      security:
        - bearerAuth: []
components:
  responses:
    UnauthorizedError:
      description: Unauthorized Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````