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

# Add source transaction



## OpenAPI

````yaml https://megastream25-api.closebot.com/swagger/v1/swagger.json post /agency/billing/transactions/source/{sourceId}
openapi: 3.0.1
info:
  title: CloseBot API
  version: v1
servers:
  - url: https://api.closebot.com
    description: CloseBot API Endpoint
security:
  - Key: []
paths:
  /agency/billing/transactions/source/{sourceId}:
    post:
      tags:
        - Billing
      summary: Add source transaction
      parameters:
        - name: sourceId
          in: path
          description: The source ID.
          required: true
          style: simple
          schema:
            type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddSourceTransactionDto'
          text/json:
            schema:
              $ref: '#/components/schemas/AddSourceTransactionDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/AddSourceTransactionDto'
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/TransactionDto'
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDto'
            text/json:
              schema:
                $ref: '#/components/schemas/TransactionDto'
components:
  schemas:
    AddSourceTransactionDto:
      type: object
      properties:
        amount:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
      additionalProperties: false
    TransactionDto:
      type: object
      properties:
        id:
          type: integer
          format: int32
        status:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        amount:
          type: integer
          format: int64
        currency:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        receiptUrl:
          type: string
          nullable: true
        usage:
          $ref: '#/components/schemas/BilledUsageDto'
      additionalProperties: false
    BilledUsageDto:
      type: object
      properties:
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        responses:
          type: integer
          format: int32
        libraryBytes:
          type: integer
          format: int64
        users:
          type: integer
          format: int32
        responseCost:
          type: integer
          format: int64
        libraryCost:
          type: integer
          format: int64
        userCost:
          type: integer
          format: int64
      additionalProperties: false
  securitySchemes:
    Key:
      type: apiKey
      description: CloseBot API Key Authorization
      name: X-CB-KEY
      in: header

````