> ## Documentation Index
> Fetch the complete documentation index at: https://yn-c9bb3266.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Entity Onboarding

> Submit KYC/KYB documentation for entity onboarding

## Path parameters

<ParamField path="entity_id" type="string" required>
  The `id` obtained from the [Create Entity](/api-reference/baas/create-entity) endpoint.
</ParamField>

## Headers

<ParamField header="x-idempotency-key" type="string" required>
  Unique UUID to ensure the request is processed only once.
</ParamField>

## Body

<ParamField body="account_id" type="string" required>
  Merchant's Yuno account ID (UUID, 36 characters).
</ParamField>

<ParamField body="yuno_connection_id" type="string" required>
  Pre-configured BaaS provider connection ID from your Yuno dashboard.
</ParamField>

<ParamField body="onboarding_type" type="string" required>
  `ONE_STEP` or `PREVIOUSLY_ONBOARDED`.
</ParamField>

<ParamField body="compliance_declaration" type="object">
  Required for `ONE_STEP` onboarding type.

  <Expandable title="compliance_declaration">
    <ParamField body="terms_of_service" type="object" required>
      <Expandable title="terms_of_service">
        <ParamField body="accepted" type="boolean" required>
          Whether the entity accepted the terms.
        </ParamField>

        <ParamField body="version" type="string" required>
          Version of the terms accepted.
        </ParamField>

        <ParamField body="accepted_at" type="string" required>
          ISO 8601 timestamp of acceptance.
        </ParamField>

        <ParamField body="accepted_ip" type="string" required>
          IP address from which the terms were accepted.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="privacy_policy" type="object" required>
      Same structure as `terms_of_service`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="risk_assessment" type="object">
  Optional risk assessment data.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Onboarding identifier.
</ResponseField>

<ResponseField name="entity_id" type="string">
  Associated entity identifier.
</ResponseField>

<ResponseField name="yuno_account_id" type="string">
  Merchant's Yuno account.
</ResponseField>

<ResponseField name="provider" type="object">
  Provider-specific details including `entity_id` and `status`.
</ResponseField>

<ResponseField name="onboarding_type" type="string">
  `ONE_STEP` or `PREVIOUSLY_ONBOARDED`.
</ResponseField>

<ResponseField name="status" type="string">
  Current onboarding status. See [BaaS Overview](/features/baas/overview#onboarding-statuses) for all values.
</ResponseField>

<ResponseField name="requirements" type="array">
  Any additional requirements from the provider.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp.
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp.
</ResponseField>

<ResponseField name="expires_at" type="string">
  ISO 8601 timestamp for onboarding expiration.
</ResponseField>

<RequestExample>
  ```json ONE_STEP theme={"theme":{"light":"github-dark","dark":"github-dark"}}
  {
    "account_id": "550e8400-e29b-41d4-a716-446655440000",
    "yuno_connection_id": "conn_880e8400-e29b-41d4-a716-446655440000",
    "onboarding_type": "ONE_STEP",
    "compliance_declaration": {
      "terms_of_service": {
        "accepted": true,
        "version": "2.1",
        "accepted_at": "2026-02-01T10:00:00Z",
        "accepted_ip": "203.0.113.42"
      },
      "privacy_policy": {
        "accepted": true,
        "version": "1.5",
        "accepted_at": "2026-02-01T10:00:00Z",
        "accepted_ip": "203.0.113.42"
      }
    }
  }
  ```

  ```json PREVIOUSLY_ONBOARDED theme={"theme":{"light":"github-dark","dark":"github-dark"}}
  {
    "account_id": "550e8400-e29b-41d4-a716-446655440000",
    "yuno_connection_id": "conn_880e8400-e29b-41d4-a716-446655440000",
    "onboarding_type": "PREVIOUSLY_ONBOARDED"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 201 Created theme={"theme":{"light":"github-dark","dark":"github-dark"}}
  {
    "id": "onb_990e8400-e29b-41d4-a716-446655440000",
    "entity_id": "ent_660e8400-e29b-41d4-a716-446655440000",
    "yuno_account_id": "550e8400-e29b-41d4-a716-446655440000",
    "provider": {
      "entity_id": "col_entity_onboarded_123",
      "status": "verification_pending"
    },
    "onboarding_type": "ONE_STEP",
    "status": "PENDING",
    "requirements": [],
    "created_at": "2026-02-01T10:00:00Z",
    "updated_at": "2026-02-01T10:00:00Z",
    "expires_at": "2026-02-08T10:00:00Z"
  }
  ```

  ```json 400 Bad Request theme={"theme":{"light":"github-dark","dark":"github-dark"}}
  {
    "code": "VALIDATION_ERROR",
    "messages": ["compliance_declaration is required for ONE_STEP onboarding"],
    "http_code": 400
  }
  ```

  ```json 404 Not Found theme={"theme":{"light":"github-dark","dark":"github-dark"}}
  {
    "code": "ENTITY_NOT_FOUND",
    "messages": ["Entity not found"],
    "http_code": 404
  }
  ```
</ResponseExample>
