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

# Create subscriber

> Create new subscriber with specified details



## OpenAPI

````yaml smt post /v1/customers
openapi: 3.0.0
info:
  title: Subscriptions (SMT API)
  description: >-
    fabric's Subscriptions API lets your customers set recurring purchases of
    their desired products or services for a scheduled period (weekly, monthly,
    etc.). In addition, Subscriptions helps you retrieve and update subscription
    details, and lets your customers skip one or more subscription schedules, or
    remove a subscription. This API also lets you create and updates customers
    cancellation reasons, and subscription discounts.
  version: 2.0.0
  contact:
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01.copilot.fabric.inc/data-subscription
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Subscribers
    description: >-
      These endpoints let you create, update, or get one or all of your
      subscribers (customers who have subscriptions). If you request all
      subscribers, you will receive a paginated response; you can specify the
      page size, and which page you want.
  - name: Subscriptions
    description: >-
      These endpoints let your customers set recurring purchases of their
      desired products or services for a scheduled period (weekly, monthly,
      etc.). In addition, these endpoints let you get and update subscription
      details, and let your customers skip one or more subscription schedules,
      or remove a subscription.
  - name: Orders
    description: >-
      These endpoints let your customers purchase products and services from
      your store.
  - name: Cancellation Reasons
    description: These endpoints let you create and get cancellation reasons.
  - name: Subscription Discounts
    description: >-
      These endpoints let you create, update, deactivate, and get discount
      offers for the orders placed by your customers.
paths:
  /v1/customers:
    post:
      tags:
        - Subscribers
      summary: Create subscriber
      description: Create new subscriber with specified details
      operationId: createSubscriber
      requestBody:
        description: Details of customer being created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerBody'
      responses:
        '200':
          description: Request processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequestError'
components:
  schemas:
    CustomerBody:
      required:
        - customerReferenceId
        - locale
        - email
        - firstName
        - lastName
        - communicationPreference
      type: object
      description: Customer details
      properties:
        customerReferenceId:
          type: string
          example: '12345'
          description: Unique customer reference ID
        locale:
          type: string
          description: Customer locale (language_country)
          example: en_US
        email:
          type: string
          description: Customer's email address
          example: customer@example.com
        contactnumber:
          type: string
          example: '+923333709568'
          description: Customer's contact number
        firstName:
          type: string
          example: Pat
          description: Customer's first name
        middleName:
          type: string
          example: E
          description: Customer's middle name or initial
        lastName:
          type: string
          example: Kake
          description: Customer's last name
        segment:
          type: array
          description: Customer's segments
          items:
            type: string
            example: employee
            description: Customer's segment (employee, management, pro user, etc.)
        employeeId:
          type: string
          example: '345'
          description: Customer employee ID
        communicationPreference:
          $ref: '#/components/schemas/communicationPreference'
    CustomerResponse:
      description: Customer details after creation
      type: object
      properties:
        id:
          description: Customer ID
          type: string
          example: 62cffd65e8d7eb868c6a29d6
        customerReferenceId:
          type: string
          description: Customer reference ID
          example: '12345'
        locale:
          type: string
          description: Customer locale (language_country)
          example: en_US
        email:
          type: string
          description: Customer's email address
          example: customer@example.com
        contactNumber:
          type: string
          example: '+923333709568'
          description: Customer's contact number
        firstName:
          type: string
          example: Pat
          description: Customer's first name
        middleName:
          type: string
          example: E
          description: Customer's middle name or initial
        lastName:
          type: string
          example: Kake
          description: Customer's last name
        segment:
          type: array
          description: Customer's segments
          items:
            type: string
            example: employee
            description: Customer's segment (employee, management, pro user, etc.)
        employeeId:
          type: string
          example: '345'
          description: Customer employee ID
        communicationPreference:
          $ref: '#/components/schemas/communicationPreference'
        status:
          type: string
          description: Customer status
          example: ACTIVE
          enum:
            - ACTIVE
            - INACTIVE
        createdAt:
          type: string
          description: Time customer was created
          example: '2021-10-12T21:35:05.756Z'
        updatedAt:
          type: string
          description: Most recent time customer was updated
          example: '2021-10-14T05:40:55.997Z'
    badRequestError:
      type: object
      description: Bad request error
      properties:
        responseStatus:
          type: string
          description: Brief response status
          example: BAD_REQUEST
        message:
          type: string
          description: Full response message
          example: Bad request
    communicationPreference:
      type: object
      description: Customer's communications preferences
      properties:
        email:
          type: boolean
          description: >-
            true: Customer agrees to be contacted via email<br />false: Customer
            does not want to be contacted via email
          example: true
        sms:
          type: boolean
          description: >-
            true: Customer agrees to be contacted via text message<br />false:
            Customer does not want to be contacted via text message
          example: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````