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

# Signing In to a Merchant Account

> Sign in to an existing Helio merchant account using an external authentication method.

<Info>
  **Note:** When using the production environment at [moonpay.hel.io](http://app.hel.io), set your API endpoint to `api.hel.io/v1` and generate API keys there. For the development environment, use `api.dev.hel.io/v1` and generate API keys from [moonpay.dev.hel.io](http://app.dev.hel.io).
</Info>


## OpenAPI

````yaml POST /v1/auth/external/sign-in
openapi: 3.0.0
info:
  title: Helio Open API
  description: |-
    API schema and definitions for Helio API. <br/> 
          The API is using two types of Authentication, for dashboard endpoints we use <b>JSON Web Token (JWT)</b> that is generated by self custodial wallet signing a message from API.</br> 
          We also support authentication with <b>API Key and Secret</b> which can be generated on <a href='https://hel.io'>Helio dashboard</a>.
  version: 1.0.0
  contact: {}
servers:
  - description: Helio API (Mainnet)
    url: https://api.hel.io
  - description: Helio API (Devnet)
    url: https://api.dev.hel.io
security: []
tags:
  - name: Webhooks
  - name: Exports
  - name: Currencies
    description: >-
      Supported currencies endpoint, includes fiat and digital assets
      </br><i>Authentication: </i><b>None</b>
externalDocs:
  description: Helio product documentation
  url: https://docs.hel.io/
paths:
  /v1/auth/external/sign-in:
    post:
      tags:
        - JWT Authentications
      summary: Signing In to a Merchant Account
      description: >-
        Sign in to an existing Helio merchant account using an external
        authentication method.
      operationId: AuthController_externalSignIn
      parameters:
        - name: apiKey
          in: query
          required: true
          schema:
            type: string
          description: Contact the Helio team directly to obtain API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionUpdateRequest'
      responses:
        '200':
          description: Returns user and company details along with a redirect URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaylinkTxWithShallowEnrichedPaylink'
              examples:
                success:
                  summary: External sign-in response
                  value:
                    user:
                      id: 681297e9b510d96df0eb6406
                      email: user@test.com
                      userType: null
                      name: Test
                      payoutWallets:
                        - id: 681297e9b510d96df0eb6412
                          publicKey: DsUFWNpve7hVQdhWDAfUTGq78SpZZ3tVLdnJiRa54QBU
                          name: Test Wallet
                    company:
                      id: 681297e9b510d96df0eb6408
                      name: Company
                      email: company@test.com
                      websiteUrl: https://test.com
                      discordUsername: test-discord-username
                      phoneNumber: '+1234567890'
                      kycVerified: true
                    redirectUrl: >-
                      https://app.hel.io/auth/external-login?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4MTI5N2U5YjUxMGQ5NmRmMGViNjQwNiIsImlhdCI6MTc0NjA0OTAwMSwiZXhwIjoxNzQ2MDQ5MTIxfQ.C62U9M6g9OE3_f_XbhpU9PDtBigp7Do4mYtDnfileD4
        '401':
          description: Provided API key has no access to the resource.
          content:
            application/json:
              examples:
                unauthorized:
                  summary: Invalid or missing API key
                  value:
                    message: Api key or token is invalid
                    code: 401
components:
  schemas:
    SessionUpdateRequest:
      type: object
      properties:
        id:
          type: string
          description: >-
            The merchant-generated unique identifier used as a stable external
            reference for the account.
      required:
        - id
    PaylinkTxWithShallowEnrichedPaylink:
      type: object
      properties: {}

````