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

# Activate Subscription

> Activate a subscription with the plan Id.



## OpenAPI

````yaml openapi.json POST /subscriptions/{subscription-id}/activate
openapi: 3.1.0
info:
  title: Spotflow
  description: ''
  license:
    name: MIT
  version: 1.0.0
servers:
  - description: Production server
    url: https://api.spotflow.co/api/v1
security:
  - bearerAuth: []
paths:
  /subscriptions/{subscription-id}/activate:
    post:
      description: Activate a subscription with the plan Id.
      operationId: ActivateSubscription
      parameters:
        - name: subscription-id
          in: path
          required: true
          description: >-
            The unique identifier of the plan whose subscriptions are to be
            retrieved.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: A JSON array of subscription objects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionDetails'
        '400':
          description: Not Found - No subscriptions found for the given plan ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized - Invalid or missing authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionError401'
components:
  schemas:
    SubscriptionDetails:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the subscription
        customerId:
          type: string
          format: uuid
          description: Identifier of the customer associated with this subscription
        planId:
          type: string
          format: uuid
          description: Identifier of the subscribed plan
        status:
          type: string
          enum:
            - active
            - inactive
          description: Current status of the subscription (e.g. active, inactive)
        startDate:
          type: string
          format: date-time
          description: Date when the subscription started
        nextPaymentDate:
          type: string
          format: date-time
          description: Next scheduled payment date
        createdAt:
          type: string
          format: date-time
          description: Date and time the subscription was created
        customer:
          type: object
          description: Details about the customer
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier of the customer
            name:
              type: string
              example: John Doe
              description: Full name of the customer
            email:
              type: string
              format: email
              description: Email address of the customer
            phoneNumber:
              type: string
              example: +234 80 7855 4801
              description: Phone number of the customer
          required:
            - id
            - name
            - email
        metadata:
          type: object
          description: Additional custom data associated with the subscription
          properties:
            additionalProp1:
              type: string
              example: string
            additionalProp2:
              type: string
              example: string
            additionalProp3:
              type: string
              example: string
        currency:
          type: string
          description: The currency in which the subscription is billed,
          example: NGN
        regionName:
          type: string
          description: The geographical region associated with the subscription.
          example: Nigeria
        amount:
          type: number
          format: float
          description: The amount to be charged for the subscription.
          example: 5000
      required:
        - id
        - customerId
        - planId
        - status
        - startDate
        - currency
        - amount
    Error400:
      type: object
      properties:
        error:
          type: string
          example: Missing Parameter
        message:
          type: string
          example: missing_parameter
        status:
          type: integer
          format: float
          example: 400
    SubscriptionError401:
      type: object
      properties:
        code:
          type: string
          example: AUTH_ERROR
        message:
          type: string
          example: Authorization token is required.
        statusCode:
          type: integer
          format: float
          example: 401
        requestMarker:
          type: string
          format: uuid
      required:
        - status
        - statusCode
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````