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

# Create Customer

> Creates a new customer.



## OpenAPI

````yaml openapi.json post /customers
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /customers:
    post:
      summary: Create Customer
      description: Creates a new customer.
      operationId: create-customer
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - name
                - phoneNumber
                - status
                - billingAddress
              properties:
                type:
                  type: string
                  description: This is the customer type.
                  default: individual
                  enum:
                    - individual
                    - company
                  example: individual
                name:
                  type: string
                  description: The customer's full name.
                  example: Jane Smith
                phoneNumber:
                  type: string
                  description: Customer's mobile phone number in international format.
                  example: '+2348012345678'
                emailAddress:
                  type: string
                  description: Customer's email address.
                  example: jane.smith@example.com
                individual:
                  type: object
                  description: >-
                    Individual details. Required if customer type is
                    `individual`.
                  required:
                    - firstName
                    - lastName
                    - dob
                  example:
                    firstName: Jane
                    lastName: Smith
                    otherNames: Maria
                    dob: '1985-05-15'
                    identity:
                      type: PASSPORT
                      number: A12345678
                    documents:
                      idFrontUrl: >-
                        https://your-bucket.s3.amazonaws.com/<businessId>/customers/<customerId>/passport-front.jpg
                      idBackUrl: >-
                        https://your-bucket.s3.amazonaws.com/<businessId>/customers/<customerId>/passport-back.jpg
                  properties:
                    firstName:
                      type: string
                      description: Customer's first name.
                      example: Jane
                    lastName:
                      type: string
                      description: Customer's last name.
                      example: Smith
                    otherNames:
                      type: string
                      description: Customer's other names.
                      example: Maria
                    dob:
                      type: string
                      description: Customer's date of birth in the format `YYYY/MM/DD`.
                      example: '1985-05-15'
                    identity:
                      type: object
                      description: Customer's identity data.
                      required:
                        - type
                        - number
                      properties:
                        type:
                          type: string
                          description: Identity type.
                          enum:
                            - BVN
                            - NIN
                            - CAC
                            - TIN
                            - PASSPORT
                            - VC
                            - DL
                            - RC
                          example: PASSPORT
                        number:
                          type: string
                          description: Identity number issued by the regulator.
                          example: A12345678
                    documents:
                      type: object
                      description: Customer's KYC documents.
                      properties:
                        idFrontUrl:
                          type: string
                          description: ID Card front page url.
                          example: >-
                            https://your-bucket.s3.amazonaws.com/<businessId>/customers/<customerId>/passport-front.jpg
                        idBackUrl:
                          type: string
                          description: ID Card back page url.
                          example: >-
                            https://your-bucket.s3.amazonaws.com/<businessId>/customers/<customerId>/passport-back.jpg
                        incorporationCertificateUrl:
                          type: string
                          description: Company incorporation certificate url.
                        addressVerificationUrl:
                          type: string
                          description: Customer address verification document url.
                company:
                  type: object
                  description: Company details. Required if customer type is `company`.
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      description: Company name.
                    identity:
                      type: object
                      description: Company identity details.
                      required:
                        - type
                        - number
                      properties:
                        type:
                          type: string
                          description: Identity type.
                          enum:
                            - BVN
                            - NIN
                            - CAC
                            - TIN
                            - PASSPORT
                            - VC
                            - DL
                            - RC
                        number:
                          type: string
                          description: Identity number issued by the regulator.
                    officer:
                      type: object
                      description: Company officer information.
                      required:
                        - firstName
                        - lastName
                        - dob
                      properties:
                        firstName:
                          type: string
                          description: Customer's first name.
                        lastName:
                          type: string
                          description: Customer's last name.
                        otherNames:
                          type: string
                          description: Customer's other names.
                        dob:
                          type: string
                          description: Customer's date of birth in the format `YYYY/MM/DD`.
                        identity:
                          type: object
                          description: Customer's identity data.
                          required:
                            - type
                            - number
                          properties:
                            type:
                              type: string
                              description: Identity type.
                              enum:
                                - BVN
                                - NIN
                                - CAC
                                - TIN
                                - PASSPORT
                                - VC
                                - DL
                                - RC
                            number:
                              type: string
                              description: Identity number issued by the regulator.
                        documents:
                          type: object
                          description: Customer's KYC documents.
                          properties:
                            idFrontUrl:
                              type: string
                              description: ID Card front page url.
                            idBackUrl:
                              type: string
                              description: ID Card back page url.
                            incorporationCertificateUrl:
                              type: string
                              description: Company incorporation certificate url.
                            addressVerificationUrl:
                              type: string
                              description: Customer address verification document url.
                    documents:
                      type: object
                      description: Customer's KYC documents.
                      properties:
                        idFrontUrl:
                          type: string
                          description: ID Card front page url.
                        idBackUrl:
                          type: string
                          description: ID Card back page url.
                        incorporationCertificateUrl:
                          type: string
                          description: Company incorporation certificate url.
                        addressVerificationUrl:
                          type: string
                          description: Customer address verification document url.
                status:
                  type: string
                  description: This is the initial status of the customer.
                  default: active
                  enum:
                    - active
                    - inactive
                  example: active
                billingAddress:
                  type: object
                  description: This is the billing address
                  required:
                    - line1
                    - city
                    - state
                    - postalCode
                    - country
                  properties:
                    line1:
                      type: string
                      description: Street address line 1
                      example: 42 Corporate Tower, Marina
                    line2:
                      type: string
                      description: Street Address line 2
                      example: Floor 8
                    city:
                      type: string
                      description: City
                      example: Lagos
                    state:
                      type: string
                      description: State
                      example: Lagos
                    postalCode:
                      type: string
                      example: '100221'
                    country:
                      type: string
                      description: Billing country
                      example: Nigeria
      responses:
        '201':
          description: Customer created successfully.
          headers:
            X-Powered-By:
              schema:
                type: string
              example: Express
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            X-RateLimit-Limit:
              schema:
                type: integer
              example: '250000'
            X-RateLimit-Remaining:
              schema:
                type: integer
              example: '249999'
            X-RateLimit-Reset:
              schema:
                type: integer
              example: '0'
            Content-Type:
              schema:
                type: string
              example: application/json; charset=utf-8
            ETag:
              schema:
                type: string
              example: W/"2dd-sfRBgLV2BqnKnzwqFCi2UGdBgUQ"
            Connection:
              schema:
                type: string
              example: keep-alive
            Keep-Alive:
              schema:
                type: string
              example: timeout=5
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    type: object
                    description: Response payload.
                    properties:
                      _id:
                        type: string
                        description: Unique identifier of the object.
                      business:
                        type: string
                        description: Identifier of the business that owns this object.
                      type:
                        type: string
                        description: Type of the object.
                      name:
                        type: string
                        description: Display name.
                      status:
                        type: string
                        description: Current status of the object.
                      isApproved:
                        type: boolean
                        description: Whether the customer has passed KYC and is approved.
                      phoneNumber:
                        type: string
                        description: Customer's phone number in international format.
                      emailAddress:
                        type: string
                        description: Customer's email address.
                      individual:
                        type: object
                        description: Details for an individual customer.
                        properties:
                          firstName:
                            type: string
                            description: First name.
                          lastName:
                            type: string
                            description: Last name.
                          otherNames:
                            type: string
                            description: Other names, if any.
                          dob:
                            type: string
                            description: Date of birth (YYYY/MM/DD).
                          identity:
                            type: object
                            description: Customer's verified identity record.
                            properties:
                              type:
                                type: string
                                description: Type of the object.
                              number:
                                type: string
                                description: Identity / card number value.
                          documents:
                            type: object
                            description: Uploaded KYC document URLs.
                            properties:
                              idFrontUrl:
                                type: string
                                description: >-
                                  URL of the front of the customer's ID
                                  document.
                              idBackUrl:
                                type: string
                                description: URL of the back of the customer's ID document.
                              addressVerificationUrl:
                                type: string
                                description: >-
                                  URL of the customer's address verification
                                  document.
                      billingAddress:
                        type: object
                        description: Customer's billing address.
                        properties:
                          line1:
                            type: string
                            description: Address line 1.
                          line2:
                            type: string
                            description: Address line 2.
                          city:
                            type: string
                            description: City.
                          state:
                            type: string
                            description: State / region.
                          postalCode:
                            type: string
                            description: Postal / ZIP code.
                          country:
                            type: string
                            description: Country.
                      createdAt:
                        type: string
                        format: date-time
                        description: ISO 8601 timestamp of when the object was created.
                      updatedAt:
                        type: string
                        format: date-time
                        description: >-
                          ISO 8601 timestamp of when the object was last
                          updated.
                      __v:
                        type: integer
                        description: Internal document version (Mongo).
              example:
                statusCode: 200
                message: Customer created successfully.
                data:
                  _id: 64a1b2c3d4e5f6a7b8c9d0e1
                  business: 63f0a1b2c3d4e5f6a7b8c9d0
                  type: individual
                  name: John Doe
                  status: active
                  isApproved: true
                  phoneNumber: '+2348000000000'
                  emailAddress: johndoe@example.com
                  individual:
                    firstName: John
                    lastName: Doe
                    otherNames: ''
                    dob: 1990/01/01
                    identity:
                      type: BVN
                      number: '22212345678'
                    documents:
                      idFrontUrl: >-
                        https://sudo-documents.s3.amazonaws.com/customers/64a1b2c3d4e5f6a7b8c9d0e1/id-front.png
                      idBackUrl: >-
                        https://sudo-documents.s3.amazonaws.com/customers/64a1b2c3d4e5f6a7b8c9d0e1/id-back.png
                      addressVerificationUrl: >-
                        https://sudo-documents.s3.amazonaws.com/customers/64a1b2c3d4e5f6a7b8c9d0e1/utility-bill.pdf
                  billingAddress:
                    line1: 4 Barnawa Close
                    line2: Off Challawa Crescent
                    city: Barnawa
                    state: Kaduna
                    postalCode: '800243'
                    country: Nigeria
                  createdAt: '2024-09-06T12:34:56.789Z'
                  updatedAt: '2024-09-06T12:34:56.789Z'
                  __v: 0
        '400':
          description: Validation error — a required field is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Always `null` for error responses.
              example:
                statusCode: 400
                message: '"individual.dob" is required'
                data: null
        '401':
          description: Authentication failed — missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Response payload.
              example:
                statusCode: 401
                message: >-
                  Unauthorized. Provide a valid API key in the Authorization
                  header.
                data: null
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````