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

# Create customer

> Create a new customer using the customer's unique phone number.



## OpenAPI

````yaml api-reference/schema.yaml post /customers/
openapi: 3.0.3
info:
  title: ''
  version: 0.0.0
servers:
  - url: https://api.parceltracer.com/v1/external/
    description: Parcel Tracer api endpoint
security: []
paths:
  /customers/:
    post:
      tags:
        - Customers
      summary: Create customer
      description: Create a new customer using the customer's unique phone number.
      operationId: create_customer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Customer'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
              examples:
                CustomerCreatedSuccessfully:
                  value:
                    id: 9721
                    name: Yasser
                    phone_number: '+9617322112'
                    secondary_phone_number: ''
                    email: yasser@email.com
                  summary: Example of resource created successfully
          description: Successful creation
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ValidationError:
                  value:
                    error: 'true'
                    message: Validation failed.
                    details: 'phone_number: This field is required.'
                  summary: Example of validation error response
          description: Validation error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                ServerError:
                  value:
                    error: 'true'
                    message: Unexpected error.
                    details: Internal server error
                  summary: Example of internal server error response
          description: Server error
      security:
        - MerchantAPIKey: []
components:
  schemas:
    Customer:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        phone_number:
          type: string
        secondary_phone_number:
          type: string
        email:
          type: string
          format: email
      required:
        - id
        - name
        - phone_number
    ErrorResponse:
      type: object
      properties:
        error:
          type: boolean
        message:
          type: string
        details: {}
      required:
        - details
        - error
        - message
  securitySchemes:
    MerchantAPIKey:
      type: apiKey
      in: header
      name: X-Api-Key

````