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

# Create Account (Reliance)

> Requests onboarding of an account, individual or company, whose KYC the partner has already completed and attests to. `type` says which the holder is.

Request-first: the response describes a creation request, not an account. The request enters compliance review and the account is provisioned on approval.

Every country code in the body is ISO 3166-1 alpha-3, read regardless of case: `bra` is read as `BRA`.

**Validated on this request** — every rule below is answered before anything is created:

- The parent account must onboard accounts in reliance mode. A parent that onboards in kyc mode is refused with `403` and must use `POST /v1/accounts/kyc/individual` for an individual or `POST /v1/accounts/kyc/company` for a company.
- The parent must hold the `subaccounts-<tier>-tier` capability matching `reward-tier`, or the request is refused with `403`.
- For an individual, `identifier.country` must be `BRA` exactly when `tax-residence` is `BRA`. A BRA identifier is a CPF and must be a valid one; any other country identifies the holder by the number that country issued them.
- For a company, `identifiers` carries at most one entry per country, and at most one outside `BRA`.
- A company whose `tax-residence` is `BRA` lists its CNPJ alone. A company resident abroad must list an entry under its `tax-residence`, and may add the CNPJ it also holds under `BRA`.
- An entry under `BRA` must be a valid CNPJ and carries no `type`. Every entry outside `BRA` carries a `type`.
- Addresses in `external-wallets` must be unique within the request, and none may already be registered to another account.

**Idempotency**: a request under the same parent with the same identifier number, whether `pending`, `approved` or `active`, is returned as-is with `200`, instead of a second request being created. For a company, that number is the entry under its `tax-residence`.



## OpenAPI

````yaml POST /api/v1/accounts/reliance
openapi: 3.1.0
info:
  title: Crown API & Webhooks
  version: 1.0.0
  description: >-
    Open API 3 docs for Crown API


    Webhook events that Crown will POST to your configured endpoint URL. All
    webhooks expect a 200 OK response. Payloads use kebab-case for all keys to
    match the Crown API conventions.
servers:
  - url: https://app.crown-brlv.com
    description: Production server
security: []
paths:
  /api/v1/accounts/reliance:
    post:
      summary: Create an account (reliance)
      description: >-
        Requests onboarding of an account, individual or company, whose KYC the
        partner has already completed and attests to. `type` says which the
        holder is.


        Request-first: the response describes a creation request, not an
        account. The request enters compliance review and the account is
        provisioned on approval.


        Every country code in the body is ISO 3166-1 alpha-3, read regardless of
        case: `bra` is read as `BRA`.


        **Validated on this request** — every rule below is answered before
        anything is created:


        - The parent account must onboard accounts in reliance mode. A parent
        that onboards in kyc mode is refused with `403` and must use `POST
        /v1/accounts/kyc/individual` for an individual or `POST
        /v1/accounts/kyc/company` for a company.

        - The parent must hold the `subaccounts-<tier>-tier` capability matching
        `reward-tier`, or the request is refused with `403`.

        - For an individual, `identifier.country` must be `BRA` exactly when
        `tax-residence` is `BRA`. A BRA identifier is a CPF and must be a valid
        one; any other country identifies the holder by the number that country
        issued them.

        - For a company, `identifiers` carries at most one entry per country,
        and at most one outside `BRA`.

        - A company whose `tax-residence` is `BRA` lists its CNPJ alone. A
        company resident abroad must list an entry under its `tax-residence`,
        and may add the CNPJ it also holds under `BRA`.

        - An entry under `BRA` must be a valid CNPJ and carries no `type`. Every
        entry outside `BRA` carries a `type`.

        - Addresses in `external-wallets` must be unique within the request, and
        none may already be registered to another account.


        **Idempotency**: a request under the same parent with the same
        identifier number, whether `pending`, `approved` or `active`, is
        returned as-is with `200`, instead of a second request being created.
        For a company, that number is the entry under its `tax-residence`.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - title: Individual
                  description: >-
                    A natural person, identified by the one register their
                    country keeps
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - individual
                      description: >-
                        What the holder is. A BRA identifier is a CPF for an
                        individual
                      example: individual
                    identifier:
                      type: object
                      properties:
                        value:
                          type: string
                          description: >-
                            The number that identifies the holder in the
                            register its country keeps: a CPF when country is
                            BRA
                          example: '07051368923'
                        country:
                          type: string
                          description: Country that issued the number, ISO-3
                          example: BRA
                      additionalProperties: false
                      required:
                        - value
                        - country
                      description: >-
                        How the person is identified. Under BRA the value is
                        their CPF; under every other country it is the number
                        that country issued them
                    tax-residence:
                      type: string
                      description: Tax residence country, ISO-3
                      example: BRA
                    kyc-attestation-id:
                      type: string
                      description: >-
                        Partner's reference to its own completed KYC of the
                        holder
                    reward-tier:
                      type: number
                      format: double
                      enum:
                        - 93.5
                        - 90
                        - 97
                      description: >-
                        CDI reward tier (%) for the account. The parent account
                        must hold the matching subaccounts-<tier>-tier
                        capability.
                      example: 97
                    external-wallets:
                      type: array
                      items:
                        type: object
                        properties:
                          address:
                            type: string
                            description: On-chain destination address
                            example: 0xabc...
                          custody-country:
                            oneOf:
                              - type: string
                              - type: 'null'
                            description: Custodian country, ISO-3
                            example: BRA
                          custody-type:
                            oneOf:
                              - type: string
                                enum:
                                  - self
                                  - exchange
                              - type: 'null'
                            description: Self-custody or exchange custody
                          custodian-name:
                            oneOf:
                              - type: string
                              - type: 'null'
                            description: Custodian/exchange name
                        additionalProperties: false
                        required:
                          - address
                  additionalProperties: false
                  required:
                    - type
                    - identifier
                    - tax-residence
                    - kyc-attestation-id
                    - reward-tier
                - title: Company
                  description: >-
                    A company, identified by the register of the country it is
                    resident in, plus any other register it is known to
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - company
                      description: >-
                        What the holder is. A BRA identifier is a CNPJ for a
                        company
                      example: company
                    identifiers:
                      type: array
                      description: >-
                        Every register the company is known to, one entry each,
                        at most one per country. The entry whose country is the
                        company's tax residence is the one that identifies it. A
                        company resident abroad that also holds a CNPJ adds a
                        second entry under BRA
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - tax-id
                              - registration-number
                            description: >-
                              Which of the two numbers a foreign register issues
                              this is: the country's tax identification, or the
                              number the company is registered by at the
                              registrar. Required outside BRA and not accepted
                              under it, where the CNPJ is the only number the
                              register issues
                            example: registration-number
                          value:
                            type: string
                            description: >-
                              The number the register issued the company: a CNPJ
                              when country is BRA
                            example: 98-7654321
                          country:
                            type: string
                            description: Country whose register issued the number, ISO-3
                            example: CYM
                        additionalProperties: false
                        required:
                          - value
                          - country
                      example:
                        - type: registration-number
                          value: 98-7654321
                          country: CYM
                        - value: '12345678000195'
                          country: BRA
                    tax-residence:
                      type: string
                      description: Tax residence country, ISO-3
                      example: BRA
                    kyc-attestation-id:
                      type: string
                      description: >-
                        Partner's reference to its own completed KYC of the
                        holder
                    reward-tier:
                      type: number
                      format: double
                      enum:
                        - 93.5
                        - 90
                        - 97
                      description: >-
                        CDI reward tier (%) for the account. The parent account
                        must hold the matching subaccounts-<tier>-tier
                        capability.
                      example: 97
                    external-wallets:
                      type: array
                      items:
                        type: object
                        properties:
                          address:
                            type: string
                            description: On-chain destination address
                            example: 0xabc...
                          custody-country:
                            oneOf:
                              - type: string
                              - type: 'null'
                            description: Custodian country, ISO-3
                            example: BRA
                          custody-type:
                            oneOf:
                              - type: string
                                enum:
                                  - self
                                  - exchange
                              - type: 'null'
                            description: Self-custody or exchange custody
                          custodian-name:
                            oneOf:
                              - type: string
                              - type: 'null'
                            description: Custodian/exchange name
                        additionalProperties: false
                        required:
                          - address
                  additionalProperties: false
                  required:
                    - type
                    - identifiers
                    - tax-residence
                    - kyc-attestation-id
                    - reward-tier
      responses:
        '200':
          description: An equivalent non-terminal request already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the account
                        example: 019712cf-c86d-703f-85b8-bdaa4fc8d254
                      alias:
                        oneOf:
                          - type: string
                          - type: 'null'
                        description: Human-readable alias for the account
                        example: Trading account
                      status:
                        type: string
                        description: >-
                          Current status of the account. A provisioned account
                          is 'pending-setup' or 'active'. An account still being
                          created is projected as pending, carrying its request
                          status: 'pending', 'rejected', or
                          'provisioning-failed' (see ADR-0008).
                        example: active
                      external-id:
                        oneOf:
                          - type: string
                          - type: 'null'
                        description: External identifier associated with the account
                        example: ext-12345
                      parent-id:
                        oneOf:
                          - type: string
                            format: uuid
                          - type: 'null'
                        description: >-
                          Parent account id when this account has a parent; null
                          for a top-level account
                      created-at:
                        type: string
                        example: '2024-01-15T10:30:00Z'
                        format: date-time
                    additionalProperties: false
                    required:
                      - id
                      - alias
                      - status
                      - external-id
                      - created-at
                additionalProperties: false
                required:
                  - account
        '201':
          description: Account creation requested
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the account
                        example: 019712cf-c86d-703f-85b8-bdaa4fc8d254
                      alias:
                        oneOf:
                          - type: string
                          - type: 'null'
                        description: Human-readable alias for the account
                        example: Trading account
                      status:
                        type: string
                        description: >-
                          Current status of the account. A provisioned account
                          is 'pending-setup' or 'active'. An account still being
                          created is projected as pending, carrying its request
                          status: 'pending', 'rejected', or
                          'provisioning-failed' (see ADR-0008).
                        example: active
                      external-id:
                        oneOf:
                          - type: string
                          - type: 'null'
                        description: External identifier associated with the account
                        example: ext-12345
                      parent-id:
                        oneOf:
                          - type: string
                            format: uuid
                          - type: 'null'
                        description: >-
                          Parent account id when this account has a parent; null
                          for a top-level account
                      created-at:
                        type: string
                        example: '2024-01-15T10:30:00Z'
                        format: date-time
                    additionalProperties: false
                    required:
                      - id
                      - alias
                      - status
                      - external-id
                      - created-at
                additionalProperties: false
                required:
                  - account
        '400':
          description: Bad request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - message
                      - code
                    description: Bad request error details
                additionalProperties: false
                required:
                  - error
        '403':
          description: Forbidden - Access denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - message
                      - code
                    description: Forbidden access error details
                additionalProperties: false
                required:
                  - error
        '404':
          description: Not found - Resource does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - message
                      - code
                    description: Resource not found error details
                additionalProperties: false
                required:
                  - error
        '422':
          description: Unprocessable entity - Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type: string
                    additionalProperties: false
                    required:
                      - type
                      - message
                      - code
                    description: Validation error details
                additionalProperties: false
                required:
                  - error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.