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

# Create a subscription

> Creates a new subscription linking a customer to a plan. A customer may have one active subscription per plan type — one collection and one payout — but not two of the same type. Returns 409 if the customer already has an active subscription of the same plan type.



## OpenAPI

````yaml /api-reference/public-openapi.yaml post /v1/subscriptions
openapi: 3.0.3
info:
  contact: {}
  description: Usage-based billing and metering API for Monigo.
  title: Monigo Public API
  version: '1.0'
servers:
  - url: https://api.monigo.co
security: []
paths:
  /v1/subscriptions:
    post:
      tags:
        - subscriptions
      summary: Create a subscription
      description: >-
        Creates a new subscription linking a customer to a plan. A customer may
        have one active subscription per plan type — one collection and one
        payout — but not two of the same type. Returns 409 if the customer
        already has an active subscription of the same plan type.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                customer_id:
                  type: string
                plan_id:
                  type: string
              type: object
        description: Subscription details
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
        '409':
          description: >-
            Customer already has an active subscription of the same plan type
            (collection or payout)
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      description: >-
        API key with Bearer prefix (for programmatic/server-to-server access),
        format: Bearer {api_key}
      in: header
      name: Authorization
      type: apiKey

````