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

# Retrieve a customer

> Retrieve customer information by ID or email. View purchase history, subscriptions, and profile details.



## OpenAPI

````yaml get /v1/customers
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
  - url: https://test-api.creem.io
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/customers:
    get:
      tags:
        - Customers
      summary: Retrieve a customer
      description: >-
        Retrieve customer information by ID or email. View purchase history,
        subscriptions, and profile details.
      operationId: retrieveCustomer
      parameters:
        - name: customer_id
          required: false
          in: query
          description: The unique identifier of the customer.
          schema:
            example: cust_1234567890
            type: string
        - name: email
          required: false
          in: query
          description: The email address of the customer.
          schema:
            example: customer@example.com
            type: string
      responses:
        '200':
          description: Successfully retrieved the customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntity'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    CustomerEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object.
        mode:
          $ref: '#/components/schemas/EnvironmentMode'
        object:
          type: string
          description: >-
            String representing the object’s type. Objects of the same type
            share the same value.
        email:
          type: string
          description: Customer email address.
          example: user@example.com
        name:
          type: string
          description: Customer name.
          example: John Doe
          nullable: true
        metadata:
          type: object
          description: Additional metadata associated with the customer.
          example:
            key: value
          nullable: true
        country:
          type: string
          description: The ISO alpha-2 country code for the customer.
          example: US
          pattern: ^[A-Z]{2}$
        created_at:
          format: date-time
          type: string
          description: Creation date of the customer
          example: '2023-01-01T00:00:00Z'
        updated_at:
          format: date-time
          type: string
          description: Last updated date of the customer
          example: '2023-01-01T00:00:00Z'
      required:
        - id
        - mode
        - object
        - email
        - country
        - created_at
        - updated_at
    EnvironmentMode:
      type: string
      description: String representing the environment.
      enum:
        - test
        - prod
        - sandbox
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````