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

# Deploy and Setup a Safe

> Deploys and sets up the Safe account for the authenticated user.
The User needs to be KYC approved.

This endpoint replaces the `POST /api/v1/account` and related endpoints.
Using this endpoint, the user can deploy the Safe without having to sign the data.

This endpoint is idempotent: calling it again while a deployment is
already in flight for the same user will return `202` without starting
a new workflow. Use `GET /api/v1/safe/deploy` as the source of truth
for deployment status (`processing`, `ok`, `failed`, `not_deployed`).




## OpenAPI

````yaml https://api.gnosispay.com/api-docs/spec.json post /api/v1/safe/deploy
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/deploy:
    post:
      tags:
        - Safe Management
      summary: Deploy and Setup a Safe
      description: >
        Deploys and sets up the Safe account for the authenticated user.

        The User needs to be KYC approved.


        This endpoint replaces the `POST /api/v1/account` and related endpoints.

        Using this endpoint, the user can deploy the Safe without having to sign
        the data.


        This endpoint is idempotent: calling it again while a deployment is

        already in flight for the same user will return `202` without starting

        a new workflow. Use `GET /api/v1/safe/deploy` as the source of truth

        for deployment status (`processing`, `ok`, `failed`, `not_deployed`).
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                dailyLimit:
                  type: integer
                  minimum: 1
                  description: >-
                    The daily spending allowance to configure for the Safe, in
                    whole token units (no decimals). Defaults to 350 if omitted.
                  example: 350
      responses:
        '202':
          description: >-
            Accepted the deployment request. The partner should check the status
            of the deployment with the GET /api/v1/safe/deploy endpoint.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The status of the deployment.
                    example: accepted
        '400':
          description: Bad request. The request body is invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
              examples:
                invalidBody:
                  value:
                    error: Invalid request body
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: >-
            Forbidden. Missing signer address or Safe deployment is not
            available.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
              examples:
                missingSignerAddress:
                  value:
                    error: Missing signer address
                safeDeploymentUnavailable:
                  value:
                    error: Safe deployment is not available
        '422':
          description: >-
            Unprocessable Entity. Safe account already exists or user is not KYC
            approved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
              examples:
                safeAccountAlreadyExists:
                  value:
                    error: Safe account already exists
                kycRequired:
                  value:
                    error: User is not KYC approved
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  responses:
    UnauthorizedError:
      description: Unauthorized Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````