openapi: 3.1.0 info: title: Lean Authentication Account on File Customers API description: 'OAuth 2.0 client-credentials token issuance for Lean APIs. Generates two classes of JWT access token: (1) scope=api for server-to-server backend calls, and (2) scope=customer. for the LinkSDK to act on behalf of an end-user. All tokens must be generated from a secure backend using credentials issued in the Lean Application Dashboard. ' version: '1.0' contact: name: Lean Support url: https://help.leantech.me license: name: Lean Terms of Service url: https://www.leantech.me servers: - url: https://auth.leantech.me description: Production - url: https://auth.sandbox.ae.leantech.me description: Sandbox - UAE - url: https://auth.sandbox.sa.leantech.me description: Sandbox - KSA tags: - name: Customers paths: /customers/v1: post: summary: Lean Create Customer operationId: createCustomer tags: - Customers requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CustomerRequest' responses: '201': description: Customer created content: application/json: schema: $ref: '#/components/schemas/Customer' get: summary: Lean List Customers operationId: listCustomers tags: - Customers responses: '200': description: List of customers content: application/json: schema: type: array items: $ref: '#/components/schemas/Customer' /customers/v1/{customer_id}: get: summary: Lean Get Customer By Id operationId: getCustomerById tags: - Customers parameters: - $ref: '#/components/parameters/CustomerId' responses: '200': description: Customer content: application/json: schema: $ref: '#/components/schemas/Customer' /customers/v1/app-user-id/{app_user_id}: get: summary: Lean Get Customer By App User Id operationId: getCustomerByAppUserId tags: - Customers parameters: - name: app_user_id in: path required: true schema: type: string responses: '200': description: Customer content: application/json: schema: $ref: '#/components/schemas/Customer' components: parameters: CustomerId: name: customer_id in: path required: true schema: type: string format: uuid schemas: CustomerRequest: type: object required: - app_user_id properties: app_user_id: type: string description: The developer's identifier for the end-user. Customer: type: object properties: customer_id: type: string format: uuid app_user_id: type: string app_id: type: string created_at: type: string format: date-time