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

# Create Package

> Define a new subscription package with customizable features like billing intervals, pricing, and free trial periods.



## OpenAPI

````yaml api-reference/openapiFiles/packages/Create/openapi.json post /packages
openapi: 3.0.1
info:
  title: YJSG APIS
  description: >-
    A sample api that provides documentation for apis to be used by different
    integration partners.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.yourjobsearchgenius.ai/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /packages:
    post:
      description: >-
        Define a new subscription package with customizable features like
        billing intervals, pricing, and free trial periods.
      requestBody:
        description: Package to add to the system
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PackageBody'
        required: true
      responses:
        '201':
          description: Resource updated
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      _id:
                        type: string
                        pattern: ^[a-fA-F0-9]{24}$
                        example: 507f1f77bcf86cd799439011
                  - $ref: '#/components/schemas/PackageResponse'
                  - type: object
                    properties:
                      checkoutLink:
                        type: string
                        description: The checkout link for this package.
                        format: uri
                        example: https://example.com/auto-login?token=abc123
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Duplicate data!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PackageBody:
      type: object
      required:
        - name
        - price
        - interval
        - freeTrialDays
      properties:
        name:
          description: The name of the package.
          type: string
        price:
          description: The price of the package.
          type: integer
          format: int64
        interval:
          description: >-
            The billing interval for the package. Possible values: `Daily,
            Weekly, Bi-Weekly, Monthly, Quarterly, Yearly`.
          type: string
          enum:
            - Daily
            - Weekly
            - Bi-Weekly
            - Monthly
            - Quarterly
            - Yearly
        freeTrialDays:
          description: >-
            The number of free trial days. Send 0 if no free trial days. `Min:0,
            Max:7`.
          type: integer
          format: int64
          maximum: 7
          default: 0
          example: 7
    PackageResponse:
      type: object
      properties:
        name:
          description: The name of the package.
          type: string
        price:
          description: The price of the package.
          type: integer
          format: int64
        interval:
          description: >-
            The billing interval for the package. Possible values: `Daily,
            Weekly, Bi-Weekly, Monthly, Quarterly, Yearly`.
          type: string
          example: Daily
          enum:
            - Daily
            - Weekly
            - Bi-Weekly
            - Monthly
            - Quarterly
            - Yearly
        freeTrialDays:
          description: >-
            The number of free trial days. Send 0 if no free trial days. `Min:0,
            Max:7`.
          type: integer
          format: int64
          maximum: 7
          default: 0
          example: 7
        status:
          description: 'The status of the package. Possible values: `Active, Inactive`.'
          type: string
          enum:
            - Active
            - Inactive
          example: Active
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          format: s
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````