# Controls (Coinbax API)

> Source: https://developers.coinbax.com/reference/coinbax-api/controls/
> Staging base URL: https://api-staging.coinbax.com

## Verify 2FA code

`POST /api/v1/controls/verify-2fa`

- Auth: X-API-Key header
- Operation ID: `ControlsController_verify2FA`

Verify SMS code sent via TwoFactorAuth control

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |

```json
{}
```

### Example request

```bash
curl -X POST https://api-staging.coinbax.com/api/v1/controls/verify-2fa \
  -H "X-API-Key: $COINBAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Responses

**200** Verification result

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "platformId": "550e8400-e29b-41d4-a716-446655440001",
  "userId": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "type": "identity",
  "status": "approved",
  "level": "basic",
  "riskRating": "low",
  "provider": "persona",
  "externalInquiryId": "inq_ABC123",
  "externalSessionToken": "session_token_xyz",
  "metadata": {
    "email": "user@example.com",
    "country": "US"
  },
  "rejectionReason": null,
  "verifiedAt": "2024-01-15T10:30:00Z",
  "expiresAt": "2025-01-15T10:30:00Z",
  "createdAt": "2024-01-15T10:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}
```

---

## Verify Twilio SMS code

`POST /api/v1/controls/verify-twilio-sms`

- Auth: X-API-Key header
- Operation ID: `ControlsController_verifyTwilioSMS`

Verify SMS code sent via TwilioSMS control using Twilio Verify

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |

```json
{}
```

### Example request

```bash
curl -X POST https://api-staging.coinbax.com/api/v1/controls/verify-twilio-sms \
  -H "X-API-Key: $COINBAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Responses

**200** Verification result

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "platformId": "550e8400-e29b-41d4-a716-446655440001",
  "userId": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "type": "identity",
  "status": "approved",
  "level": "basic",
  "riskRating": "low",
  "provider": "persona",
  "externalInquiryId": "inq_ABC123",
  "externalSessionToken": "session_token_xyz",
  "metadata": {
    "email": "user@example.com",
    "country": "US"
  },
  "rejectionReason": null,
  "verifiedAt": "2024-01-15T10:30:00Z",
  "expiresAt": "2025-01-15T10:30:00Z",
  "createdAt": "2024-01-15T10:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}
```
