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

# Approve Account (Sandbox)

> Sandbox only: self-approve a submitted account so you can test the full flow (onboard → submit → approve → issue accounts → fund → payout) without waiting for Rolla's manual review. Runs the same approval path as the Rolla admin dashboard, so wallets are provisioned and the account.approved webhook fires. The account must already be `submitted` (only possible once every onboarding requirement is complete). Returns 404 in production.

Self-approves a **submitted** account so you can test the entire onboarding-to-payout journey end to end without waiting for Rolla's manual compliance review.

<Warning>
  **Sandbox / testing only.** This endpoint does **not** exist in production — calls to the production API return `404 Not Found`. In production, accounts are approved by Rolla's compliance team.
</Warning>

It runs the **same approval path as the Rolla admin dashboard**, so wallets are provisioned and the [`account.approved`](/api-reference/webhooks/events) webhook fires — exactly as a real approval would.

## Prerequisites

The account must already be **`submitted`** — which is only possible once every onboarding requirement is complete (see [Submit Application](/api-reference/endpoint/accounts/submit)). If it isn't, the call returns `409` with code `ACCOUNT_NOT_SUBMITTED`.

## Example Request

```bash theme={null}
curl -X POST "https://api-staging.rolla.xyz/api/v1/external/accounts/{accountId}/approve" \
  -H "X-API-Key: your_api_key_here"
```

## Example Response

```json theme={null}
{
  "success": true,
  "message": "Account approved",
  "data": {
    "accountId": "eec3cbed-79d8-4370-87a0-b6be9e287337",
    "applicationStatus": "approved"
  }
}
```

## What happens

1. The account's application status moves from `submitted` to `approved`.
2. Wallets are provisioned and the `account.approved` outbound webhook is delivered to your endpoint.
3. You can now [issue bank accounts](/api-reference/endpoint/accounts/issue-bank-account) (NGN/USD), fund them, and initiate payouts for the account.

<Note>
  Calling this on an already-approved account is a no-op and returns `applicationStatus: "approved"` with `alreadyApproved: true`.
</Note>

<Tip>
  Full sandbox test loop: **create account → complete details + KYC → submit → approve (this endpoint) → issue USD/NGN account → simulate a deposit → initiate a payout.**
</Tip>


## OpenAPI

````yaml POST /accounts/{accountId}/approve
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /accounts/{accountId}/approve:
    post:
      summary: Approve Account (Sandbox)
      description: >-
        Sandbox only: self-approve a submitted account so you can test the full
        flow (onboard → submit → approve → issue accounts → fund → payout)
        without waiting for Rolla's manual review. Runs the same approval path
        as the Rolla admin dashboard, so wallets are provisioned and the
        account.approved webhook fires. The account must already be `submitted`
        (only possible once every onboarding requirement is complete). Returns
        404 in production.
      operationId: approveAccountSandbox
      parameters:
        - name: accountId
          in: path
          required: true
          description: >-
            Identifier of a submitted account owned by the same user as your API
            key's business
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Account approved
          content:
            application/json:
              example:
                success: true
                message: Account approved
                data:
                  accountId: eec3cbed-79d8-4370-87a0-b6be9e287337
                  applicationStatus: approved
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Account not found, or the endpoint was called in production
            (sandbox-only).
        '409':
          description: >-
            The account is not submitted yet (code ACCOUNT_NOT_SUBMITTED).
            Complete onboarding and submit the application first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                message: >-
                  Account must be submitted before it can be approved (current
                  status: draft). Complete onboarding and submit the application
                  first.
                code: ACCOUNT_NOT_SUBMITTED
      servers:
        - url: https://api-staging.rolla.xyz/api/v1/external
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````