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

# Create Trial Line

> Create a trial line but does not deduct any credits.



## OpenAPI

````yaml /openapi.json post /v1/lines/trial
openapi: 3.1.0
info:
  version: 1.0.0
  title: CCCAMBOX Reseller API
  description: >-
    CCCambox Reseller API provides programmatic access to manage IPTV
    subscriptions and line management. Use this API to automate operations like
    creating new lines, managing packages, handling credits. Includes endpoints
    for subscriber management, package configuration, and line monitoring. Built
    for resellers to efficiently scale their IPTV business operations.
servers: []
security: []
paths:
  /v1/lines/trial:
    post:
      tags:
        - Line Management
      summary: Create Trial Line
      description: Create a trial line but does not deduct any credits.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                duration:
                  type: number
                  example: 48
                  description: >-
                    The duration of the line in hours. Valid values are 12, 24,
                    or 48.
                username:
                  type: string
                  minLength: 12
                  maxLength: 30
                  description: >-
                    The username of the line. Must be RFC 3986 compliant. If not
                    provided, a random username will be generated.
                password:
                  type: string
                  minLength: 14
                  maxLength: 30
                  description: >-
                    The password of the line. Must be RFC 3986 compliant. If not
                    provided, a random password will be generated.
                label:
                  type: string
                  maxLength: 30
                  example: My TV Line
                  description: The label of the line.
                macaddress:
                  type: string
                  example: 67:21:4C:24:76:97
                  description: The MAC address to assign to the line.
                parental_code:
                  type: string
                  minLength: 4
                  maxLength: 4
                  example: '0000'
                  description: The parental code of the MAG access. Should be 4 digits.
                bouquets:
                  type: array
                  items:
                    type: number
                  example:
                    - 1
                    - 2
                    - 3
                  description: The IDs of the bouquets to link on creation of the line.
                enabled:
                  type: boolean
                  default: true
                  description: Specifies whether the created line should be active or not.
              required:
                - duration
      responses:
        '201':
          description: 'Ok: Return created line'
          content:
            application/json:
              schema:
                type: object
                properties:
                  line:
                    type: object
                    properties:
                      id:
                        type: string
                      hostname:
                        type:
                          - string
                          - 'null'
                      username:
                        type: string
                      password:
                        type: string
                      label:
                        type: string
                      enabled:
                        type: boolean
                      connections:
                        type: number
                      is_trial:
                        type: boolean
                      exp_date:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2026-05-15T15:13:02.991Z'
                        description: Date of expiration of the line.
                      start_date:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2026-05-15T15:13:02.992Z'
                        description: >-
                          Starting date of the line (Creation date or Extension
                          date if the line has been extended).
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        example: '2026-05-15T15:13:02.992Z'
                        description: Initial creation date of the line.
                      macaddress:
                        type:
                          - string
                          - 'null'
                      parental_code:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - hostname
                      - username
                      - password
                      - label
                      - enabled
                      - connections
                      - is_trial
                      - exp_date
                      - start_date
                      - created_at
                      - macaddress
                      - parental_code
                  deducedCredits:
                    type: number
                    example: 0
                  newBalance:
                    type: number
                    example: 5000
                required:
                  - line
                  - deducedCredits
                  - newBalance
        '400':
          description: 'Bad Request: Errors in supplied parameters.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - request_errors
                  message:
                    type: string
                    example: Request error occurred.
                  data:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                            path:
                              type: array
                              items:
                                type: string
                          required:
                            - code
                            - message
                            - path
                    required:
                      - errors
                required:
                  - code
                  - message
                  - data
        '401':
          description: 'Auth Error: Not authorized.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not_authorized
                  message:
                    type: string
                    example: Not authorized to perform this action.
                required:
                  - code
                  - message
        '402':
          description: 'Balance error: Your balance is insufficient to perform this action.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - insufficient_balance
                  message:
                    type: string
                    example: Insufficient balance to perform this action.
                  balance:
                    type: number
                    example: 500
                    description: Member actual balance
                  minBalance:
                    type: number
                    example: 600
                    description: The minimum balance required to perform the action
                required:
                  - code
                  - message
                  - balance
        '409':
          description: A line with this mac address or this username already exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - username_already_exist
                      - macaddress_already_exist
                  message:
                    type: string
                    example: Username already exists.
                required:
                  - code
                  - message
        '429':
          description: 'Rate limit error: too many requests.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit
                  message:
                    type: string
                    example: Rate limit exceeded.
                required:
                  - code
                  - message
        '500':
          description: 'Server Error: handler died.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - server_error
                  message:
                    type: string
                    example: Internal server error occurred.
                  requestId:
                    type: string
                required:
                  - code
                  - message
                  - requestId
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: API Key
      name: x-api-key
      in: header

````