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

# Create session

> Create a new session for KYC sharing.

export const RestEndpointSubjects = ({subjects = []}) => {
  const subjectToIconMap = {
    'client': 'browser',
    'user:individual': 'user',
    'user:business': 'briefcase'
  };
  if (subjects.length === 0) {
    return null;
  }
  return <>
      {subjects.map(subject => <a key={subject} href="/rest-apis/authentication#subjects" className="border-0 opacity-85 hover:opacity-100 transition-opacity">
          <Badge stroke size="lg" icon={subjectToIconMap[subject]} color="gray" className="mr-1">
            {subject}
          </Badge>
        </a>)}
    </>;
};

<RestEndpointSubjects subjects={["client"]} />


## OpenAPI

````yaml _media/specs/topper-openapi.mintlify.json post /topper/kyc-sharing/sessions
openapi: 3.1.0
info:
  version: 0.1.0
  title: Topper API
  description: >-
    The Topper API offers a set of endpoints to enable sharing of Know Your
    Customer (KYC) information.
  contact:
    name: Uphold API Team
    email: developer@uphold.com
    url: https://developer.uphold.com
servers:
  - url: https://api.enterprise.sandbox.uphold.com
    description: Sandbox
  - url: https://api.enterprise.uphold.com
    description: Production
security:
  - OAuth2: []
tags:
  - name: KYC sharing
    description: KYC sharing.
paths:
  /topper/kyc-sharing/sessions:
    post:
      tags:
        - KYC sharing
      summary: Create session
      description: Create a new session for KYC sharing.
      operationId: topper.create-kyc-sharing-session
      requestBody:
        $ref: '#/components/requestBodies/create-kyc-sharing-session-request-body'
      responses:
        '200':
          $ref: '#/components/responses/create-kyc-sharing-session-completed-response'
        '201':
          $ref: '#/components/responses/create-kyc-sharing-session-created-response'
        '404':
          $ref: '#/components/responses/create-kyc-sharing-session-not-found-response'
        '409':
          $ref: '#/components/responses/create-kyc-sharing-session-conflict-response'
      security:
        - OAuth2:
            - topper.kyc-sharing:create-session
components:
  requestBodies:
    create-kyc-sharing-session-request-body:
      content:
        application/json:
          schema:
            type: object
            properties:
              userId:
                description: The user ID to create the KYC sharing session for.
                type: string
                format: uuid
            required:
              - userId
          examples:
            Create KYC Sharing Session:
              value:
                userId: cd21b26d-35d2-408a-9201-b8fdbef7a604
  responses:
    create-kyc-sharing-session-completed-response:
      description: KYC sharing already completed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/kyc-sharing'
          examples:
            KYC Sharing Already Completed:
              value:
                kycSharing:
                  processes: []
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    create-kyc-sharing-session-created-response:
      description: KYC Sharing session created.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/kyc-sharing'
          examples:
            KYC Sharing Session Created:
              value:
                kycSharing:
                  processes:
                    - address
                    - profile
                    - phone
                  userToken:
                    access_token: >-
                      eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJjbGllbnRfaWQiLCJvcmciOiIxOTRkNjJiYS1mNTg1LTQwZmYtODNkNy05Y2I5OWIxYzc3YzAiLCJzY29wZSI6InVzZXJzIGt5YyIsImlhdCI6MTcyMjUzMzA4NiwiZXhwIjoxNzIyNTMzNjg2fQ.yDFu9WgkEmvucg_38xS1qHEMq2Ku7SsMzHg8A39U2CM
                    expires_in: 600
                    token_type: Bearer
                    scope: >-
                      core.kyc.address:update core.kyc.profile:update
                      core.kyc.phone:update
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    create-kyc-sharing-session-not-found-response:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            User Not Found:
              value:
                code: entity_not_found
                message: The user cannot be found
                details:
                  entity: user
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    create-kyc-sharing-session-conflict-response:
      description: Business logic error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Organization Not Configured:
              value:
                code: operation_not_allowed
                message: KYC Sharing is not configured for your organization
                details:
                  reasons:
                    - permission-denied
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
  schemas:
    kyc-sharing:
      type: object
      properties:
        kycSharing:
          description: The KYC sharing session.
          type: object
          properties:
            processes:
              description: The missing KYC processes.
              type: array
              items:
                type: string
                enum:
                  - profile
                  - address
                  - email
                  - phone
                  - identity
            userToken:
              allOf:
                - description: The user access token to update the missing KYC processes.
                - $ref: '#/components/schemas/oauth2-token'
          required:
            - processes
      required:
        - kycSharing
    error:
      description: The error information.
      allOf:
        - $ref: '#/components/schemas/feedback'
    oauth2-token:
      type: object
      properties:
        access_token:
          type: string
          description: The access token string issued.
        refresh_token:
          type: string
          description: >-
            The refresh token string issued (only applicable to certain grant
            types).
        expires_in:
          type: integer
          description: The number of seconds until the token expires.
        scope:
          description: The list of scopes, delimited with spaces.
          type: string
        token_type:
          type: string
          enum:
            - Bearer
      required:
        - access_token
        - token_type
        - expires_in
    feedback:
      description: A feedback message with a code and human-readable description.
      type: object
      properties:
        code:
          description: A short string with a brief explanation about the code reported.
          type: string
        message:
          description: A human-readable message providing more details.
          type: string
        details:
          description: Additional information about the feedback reported.
          type: object
          additionalProperties: true
      required:
        - code
        - message
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication
      flows:
        clientCredentials:
          tokenUrl: /core/oauth2/token
          scopes:
            topper.kyc-sharing:identify-user: Grants access to identify a user for KYC sharing.
            topper.kyc-sharing:create-session: Grants access to create a KYC sharing session.

````