SponsorUnited Subscription API

Subscription

Operations 1

POST /api/subscription/swap-plan Swap the subscription plan of a billable entity #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sponsorunited-subscription-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sponsorunited-subscription-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SponsorUnited Subscription API
  version: v1
  description: Subscription
tags:
- name: Subscription
  description: Subscription
paths:
  /api/subscription/swap-plan:
    post:
      tags:
      - Subscription
      summary: Swap the subscription plan of a billable entity
      description: Swaps the Stripe subscription of the billable named by `billable_id` onto another plan without prorating, and records the new contracted monthly spend against that billable's organization. The target is the billable in the request, not the one belonging to the acting user.
      operationId: swapSubscriptionPlan
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapPlanRequest'
      responses:
        '200':
          description: The swap was attempted. A successful swap returns the new plan; a billable that cannot be swapped (no Stripe customer, no Stripe subscription, or rejected by Stripe) returns an `error`.
          content:
            application/json:
              schema:
                properties:
                  subscription_plan_id:
                    description: The plan now active on the subscription. Absent when `error` is present.
                    type: string
                    example: price_1PmxYxC7D8t3rP7mSia7osJP
                  error:
                    description: Why the swap could not be completed. Absent on success.
                    type: string
                    example: This account does not have a Stripe subscription
                type: object
        '403':
          description: The user lacks the permission required to swap subscription plans.
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                    example: You are not authorized to swap subscription plans.
                type: object
        '422':
          description: Validation failed — a missing or non-integer `billable_id`, one that matches no billable or a soft-deleted one, a missing plan, or a non-numeric monthly spend.
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                    example: The billable entity to swap the plan for could not be found.
                type: object
      security:
      - bearerAuth: []
components:
  schemas:
    SwapPlanRequest:
      required:
      - billable_id
      - subscription_plan_id
      - contract_monthly_spend
      properties:
        billable_id:
          description: The billable entity whose plan is swapped. Soft-deleted billables are rejected.
          type: integer
          example: 17
        subscription_plan_id:
          description: The Stripe price ID to swap to.
          type: string
          example: price_1PmxYxC7D8t3rP7mSia7osJP
        contract_monthly_spend:
          description: The contracted monthly spend for the new plan. Stored against the billable's organization.
          type: number
          format: float
          example: 313.75
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      name: JWT Authentication
      in: header
      bearerFormat: JWT
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      description: 'Service API key for external services (ai-api, chat-api). Generate with: php artisan su:api-token:generate'
      name: X-API-Key
      in: header