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

# Subscribe Agent

> Creates a new subscription for the specified agent with the provided product.
The agent must not already have an active subscription.



## OpenAPI

````yaml POST /api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions
openapi: 3.0.3
info:
  title: Colloqui API Documentation
  description: API documentation for Colloqui application
  version: 1.0.0
servers:
  - url: https://colloqui-web-develop-btoadh.laravel.cloud
security:
  - default: []
tags:
  - name: Authentication
    description: |-

      APIs for retrieving a token and invalidating the current token.
  - name: API Keys
    description: |-

      APIs for managing API keys.
  - name: Agent
    description: |-

      APIs for agents
  - name: Agent Versions
    description: |-

      APIs for retrieving version history of an agent.
  - name: Call History
    description: |-

      APIs for managing call histories.
  - name: Knowledge Base
    description: |-

      APIs for knowledge base management.
  - name: Number
    description: |-

      APIs for managing numbers.
  - name: Subscription
    description: |-

      APIs to subscribe an agent to a subscription.
  - name: User
    description: |-

      APIs for managing users.
  - name: Webhook
    description: |-

      APIs for managing webhooks.
  - name: Workspace
    description: |-

      APIs for managing workspaces.
  - name: Workspace User
    description: |-

      APIs for managing users within workspaces.
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions:
    parameters:
      - in: path
        name: workspace_id
        description: The ID of the workspace.
        example: 01kfj20p4jw63sp4jqtfm3kg1m
        required: true
        schema:
          type: string
      - in: path
        name: agent_id
        description: The ID of the agent.
        example: 01kntjsyhqzfyhwjrx6496frrh
        required: true
        schema:
          type: string
    post:
      tags:
        - Subscription
      summary: Subscribe Agent
      description: >-
        Creates a new subscription for the specified agent with the provided
        product.

        The agent must not already have an active subscription.
      operationId: subscribeAgent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_id:
                  type: string
                  description: The `id` of an existing record in the products table.
                  example: 01h8xyz123abc456def789ghi
              required:
                - product_id
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    id: 302
                    workspace_id: 01kqh44c0tyccy2d8jfh342m15
                    type: default
                    stripe_id: sub_4IRrfQkQH3Ts0YP4euHFtkngezCK8QexmasccDIE
                    stripe_status: active
                    stripe_price: null
                    quantity: null
                    trial_ends_at: null
                    ends_at: null
                    created_at: '2026-05-01T06:38:01.000000Z'
                    updated_at: '2026-05-01T06:38:01.000000Z'
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 302
                      workspace_id:
                        type: string
                        example: 01kqh44c0tyccy2d8jfh342m15
                      type:
                        type: string
                        example: default
                      stripe_id:
                        type: string
                        example: sub_4IRrfQkQH3Ts0YP4euHFtkngezCK8QexmasccDIE
                      stripe_status:
                        type: string
                        example: active
                      stripe_price:
                        type: string
                        example: null
                        nullable: true
                      quantity:
                        type: string
                        example: null
                        nullable: true
                      trial_ends_at:
                        type: string
                        example: null
                        nullable: true
                      ends_at:
                        type: string
                        example: null
                        nullable: true
                      created_at:
                        type: string
                        example: '2026-05-01T06:38:01.000000Z'
                      updated_at:
                        type: string
                        example: '2026-05-01T06:38:01.000000Z'
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: Bearer token authentication

````