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

# Create Customer

> Create a new customer record with key details such as name, email, payment preferences, and package subscriptions. This API streamlines onboarding workflows by ensuring customer data is accurately captured at signup.



## OpenAPI

````yaml api-reference/openapiFiles/customers/Create/openapi.json post /customers
openapi: 3.0.1
info:
  title: YJSG APIS
  description: >-
    A sample api that provides documentation for apis to be used by different
    integration partners.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.yourjobsearchgenius.ai/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /customers:
    post:
      description: >-
        Create a new customer record with key details such as name, email,
        payment preferences, and package subscriptions. This API streamlines
        onboarding workflows by ensuring customer data is accurately captured at
        signup.
      requestBody:
        description: Customer to add to the system.
        content:
          application/json:
            schema:
              required:
                - firstName
                - lastName
                - email
                - isPaidOutside
                - packageId
              type: object
              allOf:
                - $ref: '#/components/schemas/Customer'
                - type: object
                  properties:
                    isPaidOutside:
                      type: boolean
                      description: >-
                        Indicates whether the customer will pay outside our
                        system. If true, use the payment API to refresh payment
                        information at the start of each subscription cycle. If
                        false, redirect the user using the checkout link, and
                        payment will be processed through our system.
                    packageId:
                      type: string
                      description: Package id in our system
                    uniqueCustomerId:
                      type: string
                      description: >-
                        The unique identifier for the user in your system. You
                        can use the `GET /customers` API to filter users based
                        on this identifier.
        required: true
      responses:
        '201':
          description: Resource created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Duplicate data!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Customer:
      type: object
      properties:
        firstName:
          description: The first name of the customer.
          type: string
        lastName:
          description: The last name of the customer.
          type: string
        email:
          description: Email address of the customer.
          type: string
    CustomerResponse:
      type: object
      properties:
        _id:
          description: The id of the customer.
          type: string
        firstName:
          description: The first name of the customer.
          type: string
        lastName:
          description: The last name of the customer.
          type: string
        email:
          description: Email address of the customer.
          type: string
        autoLogin:
          description: Auto login details for the customer.
          type: object
          properties:
            autoLoginUrl:
              description: The auto login URL for the customer.
              type: string
              format: uri
            autoLoginCode:
              description: The auto login code for the customer.
              type: string
        subscriptionId:
          description: Subscription ID in our system
          type: string
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          format: s
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````