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

# Create Customer

> Use this API to create a new customer record in the Flowwise system. Customer records can be scoped to a specific project or globally, allowing for better customer management and tracking across transactions.




## OpenAPI

````yaml /openapi/payments/flowwise.yaml post /customer
openapi: 3.0.3
info:
  title: Flowwise Native API
  version: 1.0.0
  description: >
    Manage orders, payments, refunds, and customers using the Flowwise Native
    API.

    [Source](https://cashfree.atlassian.net/wiki/spaces/ORC/pages/1084032020/API+Documentation)
servers:
  - url: https://sandbox.flowwise.com/router
    description: Sandbox
  - url: https://app.flowwise.com/router
    description: Production
security:
  - ApiKeyAuth: []
    ApiSecret: []
paths:
  /customer:
    post:
      summary: Create Customer
      description: >
        Use this API to create a new customer record in the Flowwise system.
        Customer records can be scoped to a specific project or globally,
        allowing for better customer management and tracking across
        transactions.
      requestBody:
        required: true
        description: Request parameters to create a new customer.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerRequest'
            example:
              customer_id: cust_priya_sharma_2024
              scope: PROJECT
              name: Priya Sharma
              phone: '+919876543210'
              email: priya.sharma@example.com
              address: 123 Connaught Place, New Delhi, Delhi 110001, India
      responses:
        '200':
          description: Success response for customer creation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
              example:
                id: cust_rec_67890
                added_on: '2024-12-01T10:30:00Z'
                updated_on: '2024-12-03T14:15:30Z'
                customer_id: cust_priya_sharma_2024
                project_id: proj_fashion_store_2024
                scope: PROJECT
                status: ACTIVE
                name: Priya Sharma
                email: priya.sharma@example.com
                phone: '+919876543210'
                address: 123 Connaught Place, New Delhi, Delhi 110001, India
        '400':
          description: Bad Request - Invalid customer data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Invalid email format or missing required fields
                code: invalid_customer_data
                type: validation_error
        '401':
          description: Unauthorized - Invalid or missing authentication credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Invalid API credentials provided
                code: unauthorized
                type: authentication_error
        '409':
          description: Conflict - Customer already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Customer with this ID already exists
                code: customer_exists
                type: conflict_error
        '500':
          description: Internal Server Error - Customer creation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Customer creation failed due to server error
                code: creation_failed
                type: server_error
components:
  schemas:
    CustomerRequest:
      type: object
      required:
        - customer_id
        - scope
      properties:
        customer_id:
          type: string
          description: Unique identifier for the customer.
          example: cust_priya_sharma_2024
        scope:
          type: string
          enum:
            - PROJECT
            - GLOBAL
          description: Scope of the customer record (project-specific or global).
          example: PROJECT
        name:
          type: string
          description: Full name of the customer.
          example: Priya Sharma
        phone:
          type: string
          description: Phone number of the customer.
          example: '+919876543210'
        email:
          type: string
          description: Email address of the customer.
          example: priya.sharma@example.com
        address:
          type: string
          description: Address of the customer.
          example: 123 Connaught Place, New Delhi, Delhi 110001, India
    CustomerResponse:
      type: object
      properties:
        id:
          type: string
          description: Internal system identifier for the customer record.
          example: cust_rec_67890
        added_on:
          type: string
          description: Date and time when the customer was created.
          example: '2024-12-01T10:30:00Z'
        updated_on:
          type: string
          description: Date and time when the customer was last updated.
          example: '2024-12-03T14:15:30Z'
        customer_id:
          type: string
          description: Unique identifier for the customer.
          example: cust_priya_sharma_2024
        project_id:
          type: string
          description: Identifier for the project associated with the customer.
          example: proj_fashion_store_2024
        scope:
          type: string
          description: Scope of the customer record (project-specific or global).
          example: PROJECT
        status:
          type: string
          description: Current status of the customer record.
          example: ACTIVE
        name:
          type: string
          description: Full name of the customer.
          example: Priya Sharma
        email:
          type: string
          description: Email address of the customer.
          example: priya.sharma@example.com
        phone:
          type: string
          description: Phone number of the customer.
          example: '+919876543210'
        address:
          type: string
          description: Address of the customer.
          example: 123 Connaught Place, New Delhi, Delhi 110001, India
    ErrorResponse:
      type: object
      description: Error response structure returned when an API request fails.
      properties:
        message:
          type: string
          description: Human-readable error message describing what went wrong.
        code:
          type: string
          description: Machine-readable error code for programmatic handling.
        type:
          type: string
          description: Category or type of error that occurred.
      required:
        - message
        - code
        - type
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Client app ID. You can find your app ID in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).
    ApiSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret key in the [Merchant
        Dashboard](https://merchant.cashfree.com/auth/login/pg/developers/api-keys?env=prod).

````