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

# Create Customer

> Creates a new identity record for a customer. The phone number must be unique per client. Returns the Sardine `customerId` which is used in all subsequent identity API calls.




## OpenAPI

````yaml /api_reference/identity.yaml post /identity/entities
openapi: 3.0.3
info:
  version: '1.0'
  title: Identity API
  description: Reference for Sardine Universal Identity API (identity.sardine.ai)
  contact:
    email: support@sardine.io
    name: Sardine
    url: docs.sardine.io
servers:
  - url: https://api.sandbox.sardine.ai/v1
    description: Sandbox
  - url: https://api.sardine.ai/v1
    description: Production
security:
  - ClientSecret: []
paths:
  /identity/entities:
    post:
      tags:
        - Customer Management
      summary: Create Customer
      description: >
        Creates a new identity record for a customer. The phone number must be
        unique per client. Returns the Sardine `customerId` which is used in all
        subsequent identity API calls.
      operationId: post-identity-entities
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - phoneNumber
              properties:
                phoneNumber:
                  type: string
                  description: E.164 formatted phone number
                  example: '+14155551234'
            example:
              phoneNumber: '+14155551234'
      responses:
        '200':
          description: Customer created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  customerId:
                    type: string
                    description: Sardine-assigned customer UUID
                    example: 3f8c1a22-1234-4abc-9def-000000000001
                  createdAt:
                    type: string
                    format: date-time
                    example: '2026-05-01T10:00:00Z'
              example:
                customerId: 3f8c1a22-1234-4abc-9def-000000000001
                createdAt: '2026-05-01T10:00:00Z'
        '400':
          description: Phone number missing, invalid, or customer already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid client credentials
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: Customer not found for customer ID
        status:
          type: integer
          example: 400
  securitySchemes:
    ClientSecret:
      type: http
      scheme: basic
      description: >
        HTTP Basic Auth. Use your `clientId` as the username and `clientSecret`
        as the password.

````