Unlock Protocol Privy API

The Privy API from Unlock Protocol — 1 operation(s) for privy.

OpenAPI Specification

unlock-protocol-privy-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Unlock Locksmith Applications Privy API
  version: '2'
  description: Locksmith provides backend functionality for enabling ticketing, metadata storage, and notification hooks.
  license:
    name: MIT
servers:
- url: https://locksmith.unlock-protocol.com
  description: Production Server
- url: https://staging-locksmith.unlock-protocol.com
  description: Staging Server
tags:
- name: Privy
paths:
  /v2/privy/check:
    post:
      operationId: checkPrivyUser
      description: Check if a user exists in Privy by email or wallet address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrivyUserCheckBody'
      responses:
        200:
          description: Successfully checked user existence in Privy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivyUserResponse'
        400:
          description: Missing required fields
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: Either email or wallet address must be provided
        500:
          description: Server error
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                properties:
                  error:
                    type: string
                    example: Failed to check Privy user
      tags:
      - Privy
components:
  schemas:
    PrivyUserResponse:
      type: object
      required:
      - exists
      - user
      properties:
        exists:
          type: boolean
          description: Whether the user exists in Privy
        user:
          type: object
          nullable: true
          properties:
            id:
              type: string
            createdAt:
              type: string
              format: date-time
            isGuest:
              type: boolean
            customMetadata:
              type: object
            linkedAccounts:
              type: array
              items:
                type: object
            email:
              type: object
              properties:
                address:
                  type: string
                  format: email
                verifiedAt:
                  type: string
                  format: date-time
                firstVerifiedAt:
                  type: string
                  format: date-time
                latestVerifiedAt:
                  type: string
                  format: date-time
            wallet:
              type: object
              properties:
                address:
                  type: string
                chainType:
                  type: string
                verifiedAt:
                  type: string
                  format: date-time
                firstVerifiedAt:
                  type: string
                  format: date-time
                latestVerifiedAt:
                  type: string
                  format: date-time
    PrivyUserCheckBody:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email address to check
        address:
          type: string
          description: Ethereum wallet address to check
      oneOf:
      - required:
        - email
      - required:
        - address
  securitySchemes:
    User:
      type: http
      scheme: bearer
      bearerFormat: JWT
    Application:
      type: apiKey
      name: api-key
      in: query