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

# Post v1loyaltyprograms



## OpenAPI

````yaml /api-reference/openapi.json post /v1/loyalty/programs
openapi: 3.0.4
info:
  title: Smartbills.API
  version: v1
servers:
  - url: https://api.smartbills.io
    description: Production
security: []
paths:
  /v1/loyalty/programs:
    post:
      tags:
        - LoyaltyPrograms
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoyaltyLoyaltyProgramCreateRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/LoyaltyLoyaltyProgramCreateRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/LoyaltyLoyaltyProgramCreateRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoyaltySBLoyaltyProgramResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
components:
  schemas:
    LoyaltyLoyaltyProgramCreateRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
        rules:
          type: array
          items:
            $ref: '#/components/schemas/LoyaltyLoyaltyProgramRuleCreateRequest'
          nullable: true
        rewards:
          type: array
          items:
            $ref: >-
              #/components/schemas/LoyaltyLoyaltyRewardsLoyaltyRewardCreateRequest
          nullable: true
      additionalProperties: false
    LoyaltySBLoyaltyProgramResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
      additionalProperties: false
    MicrosoftAspNetCoreMvcProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    LoyaltyLoyaltyProgramRuleCreateRequest:
      type: object
      additionalProperties: false
    LoyaltyLoyaltyRewardsLoyaltyRewardCreateRequest:
      type: object
      additionalProperties: false

````