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

# Search Customers by email address

> Used during authentication to lookup customer data based on email address. Customers will be authenticated via OTP before data sharing is authorised.



## OpenAPI

````yaml openapi/auth.yml POST /auth/v1/customer/search
openapi: 3.0.3
info:
  description: Fiskil Data Holder as a Service (DHaaS) endpoints for the Energy sector
  title: Authentication & Authorization
  version: 1.5.0
servers:
  - url: https://api.provider.fiskil.com
security:
  - bearerAuth: []
paths:
  /auth/v1/customer/search:
    post:
      summary: Search Customers by email
      description: >-
        Used during authentication to lookup customer data based on email
        address. Customers will be authenticated via OTP before data sharing is
        authorised.
      operationId: customerSearch
      parameters: []
      requestBody:
        $ref: '#/components/requestBodies/emailreq'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customersearchresponse'
          description: Success
components:
  requestBodies:
    emailreq:
      content:
        application/json:
          example:
            email: example@acme-corp.com
          schema:
            properties:
              email:
                type: string
                description: >-
                  The email address of the end-user trying to authenticate. The
                  API should return any customers that this end-user is
                  associated with. The user may be the owner of the customer or
                  just an authorized contact. For example, the same email may be
                  associated with an individual customer and a business
                  customer. Both customers should be returned.
            required:
              - email
            type: object
      description: email of customer
      required: true
  schemas:
    Customersearchresponse:
      example:
        data:
          - id: customerid
            name: givenName familyName
            phoneNumber: '+6141234567890'
      required:
        - data
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              id:
                description: ID of the customer
                type: string
              name:
                description: >-
                  A descriptive name for the customer that is suitable for
                  display in user interfaces
                type: string
              phoneNumber:
                description: >-
                  Customer's preferred telephone number in E.164 format e.g.
                  +614123456789. This field is required if you wish to use SMS
                  for delivery of one-time-passwords during authentication. For
                  details of the E.164 format see
                  https://www.itu.int/rec/T-REC-E.164/en.
                type: string
            required:
              - id
              - name
  securitySchemes:
    bearerAuth:
      description: >
        The Fiskil Data Provider will include a self-signed JWT as a Bearer
        token in the `Authorization` header.

        You should verify this JWT using the JWKS URL you can find for your Data
        Provider instance in the Fiskil

        Console. To verify the JWT you **must**:
          * Verify the signature
          * Ensure the token has not expired by checking the `exp` claim
          * The `sub` and `iss` claims are your data provider subdomain
          * The `aud` claim is the URI of the resource being requested (excluding any query parameters)
          * The `jti` value is unique
        For further detail on security and authentication refer to our
        [Authentication](/TODO) documentation
      type: http
      scheme: bearer
      bearerFormat: JWT

````