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

# Profile

> Retrieve your business profile and manage email changes.

## The profile object

Your business profile is the core identity for your Orafi account. It controls API keys, wallets, transactions, and whether you operate in test or live mode.

<ResponseField name="id" type="string">
  Unique identifier for the business profile.
</ResponseField>

<ResponseField name="userId" type="string">
  Identifier of the user that owns this profile.
</ResponseField>

<ResponseField name="businessName" type="string">
  Registered name of the business.
</ResponseField>

<ResponseField name="businessSector" type="string">
  Industry or sector the business operates in.
</ResponseField>

<ResponseField name="country" type="string">
  Country where the business is registered.
</ResponseField>

<ResponseField name="websiteLink" type="string">
  Official website URL of the business. Nullable.
</ResponseField>

<ResponseField name="onboarded" type="boolean" default="false">
  Whether the business has completed the onboarding process.
</ResponseField>

<ResponseField name="isLive" type="boolean" default="false">
  Whether the business is operating in live mode (`true`) or test mode (`false`).
</ResponseField>

<Note>
  A business profile is required before any transaction can be processed. Switching to live mode requires completed onboarding and verification.
</Note>

<ResponseExample>
  ```json The profile object theme={null}
  {
    "id": "84a9f045-8a21-4ce4-a7a0-828265c0021b",
    "userId": "user_abc123",
    "businessName": "Chidi and Co.",
    "businessSector": "Retail",
    "country": "Nigeria",
    "websiteLink": "https://chidiandco.com",
    "onboarded": true,
    "isLive": false
  }
  ```
</ResponseExample>

***

## Retrieve profile

<div className="api-method-box">
  <span className="api-method get">GET</span> `/profile`
</div>

Returns the authenticated user's profile including business information and wallet details.

<ResponseExample>
  ```bash cURL theme={null}
  curl -X GET https://api.orafi.app/v1/profile \
    -H "Content-Type: application/json" \
    -H "x-api-key: ora_test_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.orafi.app/v1/profile", {
    headers: { "x-api-key": "ora_test_your_api_key" }
  });
  ```

  ```json 200 — Success theme={null}
  {
    "success": true,
    "message": "User profile retrieved successfully!",
    "data": {
      "profile": {
        "id": "a6012dba-dfe2-45ea-851e-726c3b4ebde5",
        "firstname": "Covenant",
        "lastname": "Ogowale",
        "email": "user@example.com",
        "provider": "LOCAL",
        "emailVerified": true,
        "businessProfile": {
          "id": "84a9f045-8a21-4ce4-a7a0-828265c0021b",
          "userId": "a6012dba-dfe2-45ea-851e-726c3b4ebde5",
          "businessName": "Acme Corp",
          "businessSector": "Technology",
          "country": "NG",
          "websiteLink": "https://acme.com",
          "onboarded": true,
          "isLive": false,
          "wallet": [
            {
              "pubKey": "0xc4b22d63...d9"
            }
          ]
        }
      }
    }
  }
  ```
</ResponseExample>

***

## Request email change

<div className="api-method-box">
  <span className="api-method post">POST</span> `/profile/request-email-change`
</div>

Initiates an email address change. An OTP is sent to the new email for verification.

### Request body

<ParamField body="email" type="string" required>
  The new email address.
</ParamField>

<ResponseExample>
  ```bash cURL theme={null}
  curl -X POST https://api.orafi.app/v1/profile/request-email-change \
    -H "Content-Type: application/json" \
    -H "x-api-key: ora_test_your_api_key" \
    -d '{
      "email": "newemail@example.com"
    }'
  ```

  ```json 200 — Success theme={null}
  {
    "success": true,
    "message": "OTP sent to new email address"
  }
  ```
</ResponseExample>

***

## Verify email change

<div className="api-method-box">
  <span className="api-method post">POST</span> `/profile/verify-email-change`
</div>

Confirms the email change using the OTP sent to the new address.

### Request body

<ParamField body="email" type="string" required>
  The new email address (must match the one from the request step).
</ParamField>

<ParamField body="otp" type="string" required>
  One-time password sent to the new email address.
</ParamField>

<ResponseExample>
  ```bash cURL theme={null}
  curl -X POST https://api.orafi.app/v1/profile/verify-email-change \
    -H "Content-Type: application/json" \
    -H "x-api-key: ora_test_your_api_key" \
    -d '{
      "email": "newemail@example.com",
      "otp": "123456"
    }'
  ```

  ```json 200 — Success theme={null}
  {
    "success": true,
    "message": "Email changed successfully"
  }
  ```
</ResponseExample>
