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

# Create a credit line item for a profile



## OpenAPI

````yaml /openapi.json post /api/v1/profiles/{profile_id}/credit_line_items
openapi: 3.1.0
info:
  title: Scholarly API V1
  version: v1
  description: API for accessing Scholarly data
  license:
    name: Proprietary
    identifier: Proprietary
servers:
  - url: https://api.scholarlysoftware.com
    description: Production server
security: []
paths:
  /api/v1/profiles/{profile_id}/credit_line_items:
    parameters:
      - name: profile_id
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - Credit Line Items
      summary: Create a credit line item for a profile
      operationId: createProfileCreditLineItem
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Bearer token
          schema:
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CreateCreditLineItem'
      responses:
        '201':
          description: credit line item created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CreditLineItem'
                required:
                  - data
        '401':
          description: unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: forbidden
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: validation error
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - bearer_auth: []
components:
  schemas:
    CreateCreditLineItem:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: credit_line_item
              example: credit_line_item
            attributes:
              type: object
              properties:
                custom_fields:
                  type:
                    - object
                    - 'null'
                transaction_date:
                  type: string
                  format: date
                amount:
                  type: number
                description:
                  type: string
                category:
                  type:
                    - string
                    - 'null'
                  enum:
                    - adjustment
                    - buyout
                    - comment
                    - course
                    - expected_workload
                    - leave
                    - starting_balance
                status:
                  type: string
                  enum:
                    - active
                    - approved
                    - completed
                    - pending
                    - rejected
                    - withdrawn
                external_id:
                  type:
                    - string
                    - 'null'
                  example: EXT-12345
                term:
                  type:
                    - string
                    - 'null'
                comment:
                  type:
                    - string
                    - 'null'
              required:
                - transaction_date
                - amount
                - description
                - status
            relationships:
              type: object
              properties:
                source:
                  type: object
                  properties:
                    data:
                      oneOf:
                        - type: object
                          required:
                            - type
                            - id
                          properties:
                            type:
                              type: string
                            id:
                              type: string
                              format: uuid
                        - type: 'null'
                  required:
                    - data
          required:
            - type
            - attributes
      required:
        - data
    CreditLineItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          const: credit_line_item
          example: credit_line_item
        attributes:
          type: object
          properties:
            created_at:
              type: string
              format: datetime
            updated_at:
              type: string
              format: datetime
            custom_fields:
              type:
                - object
                - 'null'
            transaction_date:
              type: string
              format: date
            amount:
              type: number
            description:
              type: string
            category:
              type:
                - string
                - 'null'
              enum:
                - adjustment
                - buyout
                - comment
                - course
                - expected_workload
                - leave
                - starting_balance
            status:
              type: string
              enum:
                - active
                - approved
                - completed
                - pending
                - rejected
                - withdrawn
            external_id:
              type:
                - string
                - 'null'
              example: EXT-12345
            term:
              type:
                - string
                - 'null'
            comment:
              type:
                - string
                - 'null'
        relationships:
          type: object
          properties:
            profile:
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      type: string
                      format: uri
                  required:
                    - related
                meta:
                  type: object
                data:
                  type: object
                  required:
                    - type
                    - id
                  properties:
                    type:
                      type: string
                      const: profile
                      example: profile
                    id:
                      type: string
                      format: uuid
              anyOf:
                - required:
                    - links
                - required:
                    - meta
                - required:
                    - data
            source:
              type: object
              properties:
                links:
                  type: object
                  properties:
                    related:
                      type:
                        - string
                        - 'null'
                      format: uri
                  required:
                    - related
                meta:
                  type: object
                data:
                  oneOf:
                    - type: object
                      required:
                        - type
                        - id
                      properties:
                        type:
                          type: string
                        id:
                          type: string
                          format: uuid
                    - type: 'null'
              anyOf:
                - required:
                    - links
                - required:
                    - meta
                - required:
                    - data
      required:
        - id
        - type
        - attributes
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              title:
                type: string
              detail:
                type: string
            required:
              - status
              - title
      required:
        - errors
    ValidationError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                example: '422'
              title:
                type: string
                example: Validation Error
              detail:
                type: string
                example: Label can't be blank
            required:
              - status
              - title
              - detail
      required:
        - errors
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````