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

# Create a customer

> Creates a customer record under your tenant through the Portal API.

See the [Gateway API entry](/api-reference/gateway/customers/create-a-customer) for the full description.



## OpenAPI

````yaml /openapi/kintra-app.json post /tenant/{tenantId}/customers
openapi: 3.0.0
info:
  description: >-
    Tenant portal API for the Kintra loyalty platform. Requests are
    authenticated with an Auth0 bearer token and address a tenant by id in the
    path.
  title: Kintra Portal API
  version: 1.0.0
servers:
  - description: Production environment
    url: https://api.kintra.io/api/v1
security: []
paths:
  /tenant/{tenantId}/customers:
    post:
      tags:
        - Customers
      summary: Create a customer
      description: >-
        Creates a customer record under your tenant through the Portal API.


        See the [Gateway API
        entry](/api-reference/gateway/customers/create-a-customer) for the full
        description.
      operationId: CreateCustomer
      parameters:
        - in: path
          name: tenantId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ICustomerCreateDto'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_IUserProfileResponse_'
          description: Ok
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_IUserProfileResponse_'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Tenant not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Conflict
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Internal server error
      security:
        - auth0_jwt: []
components:
  schemas:
    ICustomerCreateDto:
      additionalProperties: false
      properties:
        attributes:
          $ref: >-
            #/components/schemas/Record_string.string-or-number-or-string-Array-or-null_
          description: >-
            Optional initial attribute values, keyed by definition id. Mirrors
            the PUT attributes body.
        cohort:
          $ref: '#/components/schemas/ICohortUpsertPayloadDto'
        email:
          type: string
        first_name:
          description: Optional human first name. Captured on the tenant Add User form.
          type: string
        last_name:
          description: Optional human last name. Captured on the tenant Add User form.
          type: string
      required:
        - email
      type: object
    ApiResponse_IUserProfileResponse_:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/IUserProfileResponse'
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    ApiResponse_null_:
      additionalProperties: false
      properties:
        data:
          enum:
            - null
          nullable: true
          type: number
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
    Record_string.string-or-number-or-string-Array-or-null_:
      additionalProperties:
        anyOf:
          - type: string
          - format: double
            type: number
          - items:
              type: string
            type: array
      description: Construct a type with a set of properties K of type T
      properties: {}
      type: object
    ICohortUpsertPayloadDto:
      additionalProperties: false
      properties:
        club_ids:
          items:
            type: string
          type: array
        country_id:
          type: string
        metadata:
          $ref: '#/components/schemas/Record_string.unknown_'
      type: object
    IUserProfileResponse:
      additionalProperties: false
      properties:
        auth_provider:
          type: string
        auth_provider_id:
          type: string
        created_at:
          format: date-time
          nullable: true
          type: string
        email:
          type: string
        first_name:
          nullable: true
          type: string
        id:
          type: string
        internal_wallets:
          items:
            $ref: '#/components/schemas/IInternalWalletResponse'
          type: array
        last_name:
          nullable: true
          type: string
        onboarding_status:
          anyOf:
            - $ref: '#/components/schemas/UserOnboardingStatus'
            - type: string
        onboarding_type:
          anyOf:
            - $ref: '#/components/schemas/UserOnboardingType'
            - type: string
          nullable: true
        status:
          type: string
        updated_at:
          format: date-time
          nullable: true
          type: string
        username:
          type: string
      required:
        - id
        - username
        - email
        - auth_provider
        - auth_provider_id
        - status
        - onboarding_status
      type: object
    Record_string.unknown_:
      additionalProperties: {}
      description: Construct a type with a set of properties K of type T
      properties: {}
      type: object
    IInternalWalletResponse:
      additionalProperties: false
      properties:
        address:
          type: string
        created_at:
          format: date-time
          type: string
        deleted_at:
          format: date-time
          nullable: true
          type: string
        id:
          type: string
        label:
          nullable: true
          type: string
        updated_at:
          format: date-time
          type: string
        user_id:
          type: string
        wallet_kind:
          type: string
      required:
        - id
        - address
        - wallet_kind
        - user_id
      type: object
    UserOnboardingStatus:
      enum:
        - initial
        - registered
        - active
      type: string
    UserOnboardingType:
      enum:
        - admin
        - tenant
        - user
      type: string
  securitySchemes:
    auth0_jwt:
      bearerFormat: JWT
      description: Auth0 access token
      scheme: bearer
      type: http

````