Create or deploy a Safe account for the authenticated user
POST/api/v1/account
This endpoint serves two purposes - it first checks if a Safe account exists for the user. If no account exists, it creates one and initiates deployment. If an account already exists but is not deployed, it initiates the deployment process.
This endpoint can be called immediately after user signup as there are no restrictions or prerequisites.
When deploying a new Safe, the endpoint waits for transaction execution and confirmation on-chain. Because of this, the request may take up to 10 seconds to complete when a deployment is needed.
The deployment process is handled by a sponsored transaction on the Gnosis Chain, and the response includes the transaction hash for tracking the deployment status.
Next steps after successful deployment:
- Once this endpoint successfully creates and deploys a Safe account, the user should call
the
/api/v1/safe/set-currency
endpoint to set the currency for the account. - Note that the
/api/v1/safe/set-currency
endpoint requires the user to have completed the KYC process successfully.
Request
Responses
- 200
- 400
- 401
- 500
Successfully created or checked Safe account
Bad request (missing parameters or signer address)
Unauthorized Error
Internal Server Error