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

# Check Profile

> Check if a user is registered with Account Aggregators and has linked financial accounts

## Overview

The Profile Check API allows you to verify whether a user (identified by mobile number) is registered with various Account Aggregators (AAs) and whether they have linked financial accounts. This API aggregates data from multiple AAs into a unified response, enabling you to make informed decisions about user onboarding flows.

### Key Features

* **Multi-AA Aggregation**: Checks registration status across all enabled Account Aggregators in a single API call
* **Parallel Execution**: Requests are sent to all AAs simultaneously for optimal performance
* **Selective AA Querying**: Optionally filter to check only specific AAs
* **Unified Response Format**: Consistent response structure regardless of underlying AA response formats

### Use Cases

* **Smart User Onboarding**: Determine which AAs a user is registered with to guide them to the appropriate consent flow
* **AA Selection Guidance**: Help users choose an AA where they already have an account for faster onboarding
* **Pre-consent Validation**: Verify user readiness before initiating consent requests

## Authentication

This API requires the following authentication headers with every request:

| Header           | Type   | Required | Description                                            |
| ---------------- | ------ | -------- | ------------------------------------------------------ |
| `client_id`      | string | Yes      | API key issued to your organisation for authentication |
| `client_secret`  | string | Yes      | Secret API key for secure server-side authentication   |
| `organisationId` | string | Yes      | Unique identifier assigned to your organisation        |
| `appIdentifier`  | string | Yes      | Unique identifier for your client application          |
| `Content-Type`   | string | Yes      | Must be set to `application/json`                      |

## Request Body

<ParamField body="mobileNumber" type="string" required>
  The user's 10-digit mobile phone number to check against Account Aggregator databases.

  **Format**: 10 digits, numeric only, without country code prefix

  **Example**: `9876543210`

  **Validation**: Must be exactly 10 numeric digits
</ParamField>

<ParamField body="userConsentId" type="string" required>
  A unique consent identifier to be passed to AA calls. This is used by some AAs to track the profile check request.

  **Format**: 1-100 characters

  **Example**: `consent-uuid-12345`
</ParamField>

<ParamField body="aaId" type="string[]">
  Optional array of AA identifiers to filter the check to specific Account Aggregators. If not provided, all enabled AAs are checked.

  **Format**: Array of alphanumeric strings (2-50 characters each)

  **Example**: `["onemoney", "finvu"]`

  **Note**: AA identifiers should be provided without the `@` symbol
</ParamField>

## Response

### Success Response

<ResponseField name="ver" type="string">
  API version number.

  **Example**: `"1.0.0"`
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp of when the response was generated.

  **Example**: `"2025-11-25T10:30:00.000Z"`
</ResponseField>

<ResponseField name="txnid" type="string">
  Unique transaction identifier for this request.

  **Example**: `"550e8400-e29b-41d4-a716-446655440000"`
</ResponseField>

<ResponseField name="data" type="array">
  Array of profile check results, one entry per AA that was queried.
</ResponseField>

<ResponseField name="data[].aaId" type="string">
  Account Aggregator identifier (without the `@` symbol).

  **Example**: `"onemoney"`
</ResponseField>

<ResponseField name="data[].registrationStatus" type="boolean | null">
  Indicates whether the user is registered with this AA.

  **Values**:

  * `true`: User has a Virtual User Account (VUA) with this AA
  * `false`: User is not registered with this AA
  * `null`: Unable to determine (check failed or timed out)
</ResponseField>

<ResponseField name="data[].hasLinkedAccounts" type="boolean | null">
  Indicates whether the user has linked financial accounts with this AA.

  **Values**:

  * `true`: User has linked one or more financial accounts
  * `false`: User has not linked any accounts (or is not registered)
  * `null`: Unable to determine (check failed or timed out)
</ResponseField>

<ResponseField name="data[].status" type="string">
  The outcome of the profile check for this AA.

  **Values**:

  * `success`: AA responded successfully with profile information
  * `timeout`: AA did not respond within the configured timeout period
  * `failed`: An error occurred during the check (see `errorMessage`)
</ResponseField>

<ResponseField name="data[].errorMessage" type="string">
  Error details when `status` is `failed`. Not present for successful or timed out requests.
</ResponseField>

## Example Requests

### Check All AAs

Query all enabled Account Aggregators for the user's profile status:

```json theme={null}
{
  "mobileNumber": "9876543210",
  "userConsentId": "consent-uuid-12345"
}
```

### Check Specific AAs

Query only specific Account Aggregators:

```json theme={null}
{
  "mobileNumber": "9876543210",
  "userConsentId": "consent-uuid-12345",
  "aaId": ["onemoney", "finvu"]
}
```

## Example Responses

### Successful Multi-AA Response

```json theme={null}
{
  "ver": "1.0.0",
  "timestamp": "2025-11-25T10:30:00.000Z",
  "txnid": "550e8400-e29b-41d4-a716-446655440000",
  "data": [
    {
      "aaId": "onemoney",
      "registrationStatus": true,
      "hasLinkedAccounts": true,
      "status": "success"
    },
    {
      "aaId": "finvu",
      "registrationStatus": false,
      "hasLinkedAccounts": false,
      "status": "success"
    },
    {
      "aaId": "anumati",
      "registrationStatus": null,
      "hasLinkedAccounts": null,
      "status": "timeout"
    }
  ]
}
```

### Response Interpretation

| AA       | registrationStatus | hasLinkedAccounts | Interpretation                                                               |
| -------- | ------------------ | ----------------- | ---------------------------------------------------------------------------- |
| onemoney | `true`             | `true`            | User is registered and has linked accounts - can proceed directly to consent |
| finvu    | `false`            | `false`           | User not registered - needs to complete AA registration first                |
| anumati  | `null`             | `null`            | Unable to determine - AA did not respond in time                             |

## Error Response

When the API request fails at the FinPro level (before reaching AAs):

```json theme={null}
{
  "ver": "1.0.0",
  "status": "error",
  "error": {
    "code": "PROFILE_CHECK_FAILED",
    "message": "Failed to check profile existence",
    "details": "No active AAs found with profile API enabled"
  }
}
```

### Common Error Scenarios

| Error                 | Cause                                  | Resolution                             |
| --------------------- | -------------------------------------- | -------------------------------------- |
| Missing mobileNumber  | `mobileNumber` field not provided      | Include required field in request body |
| Invalid mobile format | Mobile number is not 10 numeric digits | Validate format before API call        |
| Missing userConsentId | `userConsentId` field not provided     | Include required field in request body |
| Authentication failed | Invalid or missing auth headers        | Verify credentials in admin portal     |
| No active AAs found   | No AAs have profile API enabled        | Contact support to enable AAs          |

## Use Cases

### Smart AA Selection

Use the profile check results to intelligently guide users:

```javascript theme={null}
const profileResults = response.data;

// Find AAs where user is registered with linked accounts
const readyAAs = profileResults.filter(
  aa => aa.status === 'success' &&
       aa.registrationStatus === true &&
       aa.hasLinkedAccounts === true
);

// Find AAs where user is registered but needs to link accounts
const needsLinkingAAs = profileResults.filter(
  aa => aa.status === 'success' &&
       aa.registrationStatus === true &&
       aa.hasLinkedAccounts === false
);

// Find AAs where user needs to register
const needsRegistrationAAs = profileResults.filter(
  aa => aa.status === 'success' &&
       aa.registrationStatus === false
);

if (readyAAs.length > 0) {
  // Recommend these AAs for fastest onboarding
  showRecommendedAAs(readyAAs);
} else if (needsLinkingAAs.length > 0) {
  // User can use these AAs but needs to link accounts
  showLinkingFlow(needsLinkingAAs);
} else {
  // User needs to register with an AA
  showRegistrationFlow(needsRegistrationAAs);
}
```

### Pre-consent Validation

Before initiating a consent request, verify the user is ready:

```javascript theme={null}
async function validateUserReadiness(mobileNumber, preferredAA) {
  const response = await checkProfile({
    mobileNumber,
    userConsentId: generateUUID(),
    aaId: [preferredAA]
  });

  const aaResult = response.data[0];

  if (aaResult.status !== 'success') {
    throw new Error(`Unable to verify profile: ${aaResult.status}`);
  }

  if (!aaResult.registrationStatus) {
    return { ready: false, reason: 'NOT_REGISTERED' };
  }

  if (!aaResult.hasLinkedAccounts) {
    return { ready: false, reason: 'NO_LINKED_ACCOUNTS' };
  }

  return { ready: true };
}
```

## Usage Notes

### Performance Considerations

* **Parallel Execution**: All AA requests are executed in parallel using `Promise.allSettled()`, so the total response time is approximately equal to the slowest AA response (up to the timeout limit)
* **Timeouts**: Each AA has a configurable timeout (typically 4-6 seconds). AAs that don't respond within their timeout will return `status: "timeout"`
* **Caching**: Consider caching results for a short duration (e.g., 5-15 minutes) as registration status doesn't change frequently

### Best Practices

1. **Always Handle All Status Values**: Your application should gracefully handle `success`, `timeout`, and `failed` statuses
2. **Don't Block on Timeouts**: If some AAs timeout, you can still use the successful results to guide the user
3. **Provide Fallback Options**: If all AAs fail or timeout, provide a default flow that allows users to proceed
4. **Mobile Number Validation**: Validate the mobile number format client-side before calling the API
5. **Selective Querying**: If you already know which AA the user prefers, use the `aaId` filter to reduce unnecessary requests

### Privacy Considerations

* This API only returns registration status information
* No personal data or financial information is exposed
* Mobile numbers are used only for lookup purposes

## Rate Limiting

This API is subject to rate limiting:

| Metric    | Value                                      |
| --------- | ------------------------------------------ |
| Limit     | 1000 requests per time window              |
| Remaining | Returned in `X-RateLimit-Remaining` header |
| Reset     | Returned in `X-RateLimit-Reset` header     |

Monitor these headers to stay within allowed limits.

## Related APIs

* [AA List](/api-reference/misc/aa-list) - Get the list of integrated Account Aggregators
* [FIP Health](/api-reference/misc/fip-health) - Check FIP health metrics across AAs
* [Consent Request V4](/api-reference/consent/request-v4) - Create consent requests after profile validation
* [Web Redirection Encryption](/api-reference/web-redirection/encryption) - Generate AA redirect URLs for registration/consent flows


## OpenAPI

````yaml POST /profile
openapi: 3.0.3
info:
  title: FinPro API
  description: MoneyOne FinPro - Account Aggregator FIU Platform APIs
  version: 1.21.0
servers:
  - url: '{baseUrl}'
    description: FinPro API Server
    variables:
      baseUrl:
        default: https://scramblerpay-uat.moneyone.in
        description: API Base URL - change this to your environment
security:
  - clientId: []
    clientSecret: []
    organisationId: []
    appIdentifier: []
paths:
  /profile:
    post:
      tags:
        - User Management
      summary: Check Profile
      description: >-
        Check if a user is registered with Account Aggregators and has linked
        financial accounts. This API aggregates data from multiple AAs into a
        unified response, enabling you to make informed decisions about user
        onboarding flows.
      operationId: checkProfile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckProfileRequest'
            examples:
              checkAllAAs:
                summary: Check all AAs
                value:
                  mobileNumber: '9876543210'
                  userConsentId: consent-uuid-12345
              checkSpecificAAs:
                summary: Check specific AAs
                value:
                  mobileNumber: '9876543210'
                  userConsentId: consent-uuid-12345
                  aaId:
                    - onemoney
                    - finvu
      responses:
        '200':
          description: Profile check completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckProfileResponse'
              example:
                ver: 1.0.0
                timestamp: '2025-11-25T10:30:00.000Z'
                txnid: 550e8400-e29b-41d4-a716-446655440000
                data:
                  - aaId: onemoney
                    registrationStatus: true
                    hasLinkedAccounts: true
                    status: success
                  - aaId: finvu
                    registrationStatus: false
                    hasLinkedAccounts: false
                    status: success
                  - aaId: anumati
                    registrationStatus: null
                    hasLinkedAccounts: null
                    status: timeout
        '400':
          description: Bad Request - Invalid data or validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckProfileErrorResponse'
              example:
                ver: 1.0.0
                status: error
                error:
                  code: PROFILE_CHECK_FAILED
                  message: Failed to check profile existence
                  details: No active AAs found with profile API enabled
        '401':
          description: Authentication Failed - Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - clientId: []
          clientSecret: []
          organisationId: []
          appIdentifier: []
components:
  schemas:
    CheckProfileRequest:
      type: object
      required:
        - mobileNumber
        - userConsentId
      description: >-
        Request body for checking user profile status across Account
        Aggregators.
      properties:
        mobileNumber:
          type: string
          pattern: ^[0-9]{10}$
          description: >-
            The user's 10-digit mobile phone number to check against Account
            Aggregator databases. Format: 10 digits, numeric only, without
            country code prefix.
        userConsentId:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            A unique consent identifier to be passed to AA calls. This is used
            by some AAs to track the profile check request.
        aaId:
          type: array
          items:
            type: string
            minLength: 2
            maxLength: 50
          description: >-
            Optional array of AA identifiers to filter the check to specific
            Account Aggregators. If not provided, all enabled AAs are checked.
            AA identifiers should be provided without the @ symbol.
    CheckProfileResponse:
      type: object
      description: >-
        Response containing profile check results from multiple Account
        Aggregators.
      properties:
        ver:
          type: string
          description: API version number.
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the response was generated.
        txnid:
          type: string
          format: uuid
          description: Unique transaction identifier for this request.
        data:
          type: array
          description: Array of profile check results, one entry per AA that was queried.
          items:
            $ref: '#/components/schemas/CheckProfileDataItem'
    CheckProfileErrorResponse:
      type: object
      description: Error response when the profile check fails at the FinPro level.
      properties:
        ver:
          type: string
          description: API version number.
        status:
          type: string
          description: Status indicator, will be 'error' for error responses.
        error:
          type: object
          description: Error details object.
          properties:
            code:
              type: string
              description: Error code identifying the type of error.
            message:
              type: string
              description: Human-readable error message.
            details:
              type: string
              description: Additional details about the error.
    ErrorResponse:
      type: object
      properties:
        ver:
          type: string
          description: API version
        timestamp:
          type: string
          format: date-time
          description: When the error occurred
        errorCode:
          type: string
          description: Error category code
        errorMsg:
          type: string
          description: Detailed error message
        status:
          type: string
          description: FinPro-specific error code (FPxxxx format)
    CheckProfileDataItem:
      type: object
      description: Profile check result for a single Account Aggregator.
      properties:
        aaId:
          type: string
          description: Account Aggregator identifier (without the @ symbol).
        registrationStatus:
          type: boolean
          nullable: true
          description: >-
            Indicates whether the user is registered with this AA. true: User
            has a Virtual User Account (VUA) with this AA. false: User is not
            registered with this AA. null: Unable to determine (check failed or
            timed out).
        hasLinkedAccounts:
          type: boolean
          nullable: true
          description: >-
            Indicates whether the user has linked financial accounts with this
            AA. true: User has linked one or more financial accounts. false:
            User has not linked any accounts (or is not registered). null:
            Unable to determine (check failed or timed out).
        status:
          type: string
          enum:
            - success
            - timeout
            - failed
          description: >-
            The outcome of the profile check for this AA. success: AA responded
            successfully with profile information. timeout: AA did not respond
            within the configured timeout period. failed: An error occurred
            during the check (see errorMessage).
        errorMessage:
          type: string
          description: >-
            Error details when status is 'failed'. Not present for successful or
            timed out requests.
  securitySchemes:
    clientId:
      type: apiKey
      in: header
      name: client_id
      description: Your unique client identifier provided by MoneyOne during FIU onboarding
    clientSecret:
      type: apiKey
      in: header
      name: client_secret
      description: Your confidential client secret provided by MoneyOne
    organisationId:
      type: apiKey
      in: header
      name: organisationId
      description: Your organization's unique identifier in the FinPro system
    appIdentifier:
      type: apiKey
      in: header
      name: appIdentifier
      description: Application-specific identifier for tracking API calls

````