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

# Map V1 ids to V2 ids

> Returns a company's teams and users (managers and payees) with their V1 ids and V1 RiseIDs alongside the V2 nanoids, RiseIDs and RiseAccounts, plus each payee's pay handler per team. Use it to translate the identifiers stored by a V1 integration before switching to the V2 API. Entities created in V2 are included with null V1 fields. The company owner and org roles get the whole company (`scope: company`); a team manager without an org role gets only the teams they can read (`scope: teams`). An unknown company and one you have no access to both return 404 `Company not found`, so the endpoint never reveals other companies. Supports optional offset pagination over users via page/offset/count; without them the full list is returned.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v2/mapping
openapi: 3.0.3
info:
  title: Rise
  description: Web3-enabled payroll and compliance for the modern workforce
  version: 2.0.0
servers:
  - url: https://b2b-api.dev-riseworks.io
    description: Development
  - url: https://integrations-api.staging-riseworks.io
    description: Staging
  - url: https://integrations-api.riseworks.io
    description: Production
security: []
paths:
  /v2/mapping:
    get:
      tags:
        - B2B Mapping
      summary: Map V1 ids to V2 ids
      description: >-
        Returns a company's teams and users (managers and payees) with their V1
        ids and V1 RiseIDs alongside the V2 nanoids, RiseIDs and RiseAccounts,
        plus each payee's pay handler per team. Use it to translate the
        identifiers stored by a V1 integration before switching to the V2 API.
        Entities created in V2 are included with null V1 fields. The company
        owner and org roles get the whole company (`scope: company`); a team
        manager without an org role gets only the teams they can read (`scope:
        teams`). An unknown company and one you have no access to both return
        404 `Company not found`, so the endpoint never reveals other companies.
        Supports optional offset pagination over users via page/offset/count;
        without them the full list is returned.
      parameters:
        - schema:
            type: string
          in: query
          name: company_id
          required: false
          description: >-
            Company to map, in any form you hold: a V1 company or team id, a
            company (co-) or team (te-) nanoid, a V1 or V2 RiseID, or a
            RiseAccount. A team resolves to its company. Defaults to the company
            you own; required if you own more than one.
        - schema:
            type: string
            minLength: 15
            maxLength: 15
            pattern: ^co-.*
          in: query
          name: company_nanoid
          required: false
          description: >-
            Same as company_id with a co- nanoid; kept for compatibility. Send
            one or the other: both together returns 400.
        - schema:
            type: string
          in: query
          name: page
          required: false
          description: 1-indexed page number.
        - schema:
            type: string
          in: query
          name: offset
          required: false
          description: Row offset (alternative to page).
        - schema:
            type: string
          in: query
          name: count
          required: false
          description: >-
            Page size, 1-500 (default 100). Pagination only activates when page
            or offset is set.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      scope:
                        type: string
                        enum:
                          - company
                          - teams
                        description: >-
                          `company` for the owner and org roles: every team and
                          member. `teams` for team managers without an org role:
                          only the teams they can read and those teams' members;
                          company-level roles are omitted.
                      company:
                        type: object
                        properties:
                          nanoid:
                            type: string
                            minLength: 15
                            maxLength: 15
                            pattern: ^co-.*
                            description: >-
                              Identifier of a Rise company. 15-character nanoid
                              prefixed with `co-` (e.g. `co-aBcD1234EfGh`).
                          riseid:
                            type: string
                            minLength: 42
                            maxLength: 42
                            description: >-
                              V2 RiseID of the company: its on-chain identity
                              contract. Not the RiseAccount; use it where the V2
                              API asks for a RiseID.
                          rise_account:
                            type: string
                            pattern: ^0x(?!0{40}$)[a-fA-F0-9]{40}$
                            nullable: true
                            description: >-
                              V2 RiseAccount of the company: the contract that
                              holds its funds. Null if not yet deployed. Always
                              null for scope `teams`, which has no company
                              finance access.
                          v1_id:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                            nullable: true
                            description: >-
                              V1 id of the entity. Null when the entity was
                              created in V2.
                          v1_riseid:
                            type: string
                            nullable: true
                            description: >-
                              V1 RiseID address. Null when the entity was
                              created in V2 or its V1 RiseID was not carried
                              over during migration.
                          name:
                            type: string
                            description: Company name.
                        required:
                          - nanoid
                          - riseid
                          - rise_account
                          - v1_id
                          - v1_riseid
                          - name
                        additionalProperties: false
                      teams:
                        type: array
                        items:
                          type: object
                          properties:
                            nanoid:
                              type: string
                              minLength: 15
                              maxLength: 15
                              pattern: ^te-.*
                              description: >-
                                Identifier of a Rise team (a workspace below a
                                company). 15-character nanoid prefixed with
                                `te-`.
                            riseid:
                              type: string
                              minLength: 42
                              maxLength: 42
                              description: >-
                                V2 RiseID of the team: its on-chain identity
                                contract. Not the RiseAccount; use it where the
                                V2 API asks for a RiseID.
                            rise_account:
                              type: string
                              pattern: ^0x(?!0{40}$)[a-fA-F0-9]{40}$
                              nullable: true
                              description: >-
                                V2 RiseAccount of the team: the contract that
                                holds its funds. Null if not yet deployed.
                            v1_id:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              nullable: true
                              description: >-
                                V1 id of the entity. Null when the entity was
                                created in V2.
                            v1_riseid:
                              type: string
                              nullable: true
                              description: >-
                                V1 RiseID address. Null when the entity was
                                created in V2 or its V1 RiseID was not carried
                                over during migration.
                            name:
                              type: string
                              description: Team name.
                          required:
                            - nanoid
                            - riseid
                            - rise_account
                            - v1_id
                            - v1_riseid
                            - name
                          additionalProperties: false
                      users:
                        type: array
                        items:
                          type: object
                          properties:
                            nanoid:
                              type: string
                              minLength: 15
                              maxLength: 15
                              pattern: ^us-.*
                              description: >-
                                Identifier of a Rise user. 15-character nanoid
                                prefixed with `us-`.
                            riseid:
                              type: string
                              minLength: 42
                              maxLength: 42
                              description: >-
                                V2 RiseID of the user: its on-chain identity
                                contract. Not the RiseAccount; use it where the
                                V2 API asks for a RiseID.
                            rise_account:
                              type: string
                              pattern: ^0x(?!0{40}$)[a-fA-F0-9]{40}$
                              nullable: true
                              description: >-
                                V2 RiseAccount of the user: the contract that
                                holds its funds. Null if not yet deployed.
                            v1_id:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                              nullable: true
                              description: >-
                                V1 id of the entity. Null when the entity was
                                created in V2.
                            v1_riseid:
                              type: string
                              nullable: true
                              description: >-
                                V1 RiseID address. Null when the entity was
                                created in V2 or its V1 RiseID was not carried
                                over during migration.
                            email:
                              type: string
                              description: User's email address.
                            company_roles:
                              type: array
                              items:
                                type: string
                              description: >-
                                Company-level roles (company owner, org_admin,
                                org_finance_admin, org_hr_admin, org_viewer).
                            teams:
                              type: array
                              items:
                                type: object
                                properties:
                                  team_nanoid:
                                    type: string
                                    minLength: 15
                                    maxLength: 15
                                    pattern: ^te-.*
                                    description: >-
                                      Identifier of a Rise team (a workspace
                                      below a company). 15-character nanoid
                                      prefixed with `te-`.
                                  role:
                                    type: string
                                    description: Role on the team.
                                  type:
                                    type: string
                                    enum:
                                      - manager
                                      - payee
                                    description: >-
                                      `payee` for contractor, aor_contractor and
                                      team_employee; `manager` for every other
                                      team role.
                                  pay_handler:
                                    type: string
                                    nullable: true
                                    description: >-
                                      Payee's pay handler address for this team.
                                      Always null for managers.
                                required:
                                  - team_nanoid
                                  - role
                                  - type
                                  - pay_handler
                                additionalProperties: false
                              description: One entry per team role the user holds.
                          required:
                            - nanoid
                            - riseid
                            - rise_account
                            - v1_id
                            - v1_riseid
                            - email
                            - company_roles
                            - teams
                          additionalProperties: false
                      pagination:
                        description: >-
                          Present only when pagination was requested via
                          page/offset query params. Pages over users; company
                          and teams are always returned in full.
                        type: object
                        properties:
                          page:
                            type: number
                          count:
                            type: number
                          offset:
                            type: number
                          has_more:
                            type: boolean
                          next_page:
                            type: number
                            nullable: true
                          next_offset:
                            type: number
                            nullable: true
                        required:
                          - page
                          - count
                          - offset
                          - has_more
                          - next_page
                          - next_offset
                        additionalProperties: false
                    required:
                      - scope
                      - company
                      - teams
                      - users
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Not Found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Internal Server Error
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Bad Gateway
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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