> ## 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.

# Add to a Wallet Allowlist

> Add a wallet address to your allowlist when restricting access to a paylink.

<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 PATCH /v1/allowlist/add
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/allowlist/add:
    patch:
      tags:
        - Allowlist
      summary: Add to a Wallet Allowlist
      description: >-
        Add a wallet address to your allowlist when restricting access to a
        paylink.
      operationId: AllowlistController_value
      parameters:
        - name: apiKey
          required: true
          in: query
          description: >-
            Your API key can be generated on the Helio Dashboard’s settings
            page.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddAllowlistWalletsDto'
      responses:
        '200':
          description: Allowlist updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddAllowlistResponse'
              examples:
                allowlistUpdated:
                  summary: Updated allowlist response
                  value:
                    wallets:
                      - publicKey: 7VK5KfzBr6rSY3vTznyGeSYpHbJZ5EkJscZb2LLkrG7U
                        maxAllowedQuantity: 3
                      - publicKey: 7YancRyNQyp9s6G7YNwx9H93UqswoKWqF9GuNJPufyvW
                        maxAllowedQuantity: 1
                    prId: 68129254ba5dc7557c943217
                    prType: PAYLINK
                    id: 681292547d54b32ebd24c9b0
        '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
      security:
        - bearer: []
components:
  schemas:
    AddAllowlistWalletsDto:
      type: object
      properties:
        prId:
          type: string
          description: The ID of the pay link for which the allowlist is being updated.
        prType:
          type: string
          description: The type of payment resource. This should be set to 'PAYLINK'.
        wallets:
          type: array
          description: An array of wallet objects to add to the allowlist.
          items:
            $ref: '#/components/schemas/AllowlistWallet'
      required:
        - prId
        - prType
        - wallets
    AddAllowlistResponse:
      type: object
      properties:
        id:
          type: string
        prId:
          type: string
        prType:
          type: string
        wallets:
          type: array
          items:
            $ref: '#/components/schemas/AllowlistWallet'
      required:
        - id
        - prId
        - prType
        - wallets
    AllowlistWallet:
      type: object
      properties:
        publicKey:
          type: string
          description: The public key of the wallet to add to the allowlist.
        maxAllowedQuantity:
          type: number
          description: >-
            The maximum number of purchases allowed for this wallet. Leave empty
            for no limit.
      required:
        - publicKey
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authentication using JWT token

````