Koyeb Subscriptions API

The Subscriptions API from Koyeb — 1 operation(s) for subscriptions.

OpenAPI Specification

koyeb-subscriptions-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Koyeb Rest activity Subscriptions API
  description: 'The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests.

    '
  version: 1.0.0
host: app.koyeb.com
schemes:
- https
security:
- Bearer: []
tags:
- name: Subscriptions
paths:
  /v1/subscriptions/{id}:
    get:
      summary: Get Subscription
      operationId: GetSubscription
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/GetSubscriptionReply'
        '400':
          description: Validation error
          schema:
            $ref: '#/definitions/ErrorWithFields'
        '401':
          description: Returned when the token is not valid.
          schema:
            $ref: '#/definitions/Error'
        '403':
          description: Returned when the user does not have permission to access the resource.
          schema:
            $ref: '#/definitions/Error'
        '404':
          description: Returned when the resource does not exist.
          schema:
            $ref: '#/definitions/Error'
        '500':
          description: Returned in case of server error.
          schema:
            $ref: '#/definitions/Error'
        '503':
          description: Service is unavailable.
          schema:
            $ref: '#/definitions/Error'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/google.rpc.Status'
      parameters:
      - name: id
        description: The id of the instance
        in: path
        required: true
        type: string
      tags:
      - Subscriptions
definitions:
  Subscription.PaymentFailure.StripeSDK:
    type: object
    properties:
      client_secret_key:
        type: string
      raw_json:
        type: string
  google.rpc.Status:
    type: object
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
      details:
        type: array
        items:
          $ref: '#/definitions/google.protobuf.Any'
  ErrorWithFields:
    type: object
    properties:
      status:
        type: integer
        format: int32
      code:
        type: string
      message:
        type: string
      fields:
        type: array
        items:
          $ref: '#/definitions/ErrorField'
  Subscription:
    type: object
    properties:
      id:
        type: string
      created_at:
        type: string
        format: date-time
      updated_at:
        type: string
        format: date-time
      version:
        type: string
        format: uint64
      organization_id:
        type: string
      stripe_subscription_id:
        type: string
      status:
        $ref: '#/definitions/Subscription.Status'
      messages:
        type: array
        items:
          type: string
      has_pending_update:
        type: boolean
      stripe_pending_invoice_id:
        type: string
      terminate_at:
        type: string
        format: date-time
      canceled_at:
        type: string
        format: date-time
      terminated_at:
        type: string
        format: date-time
      current_period_start:
        type: string
        format: date-time
      current_period_end:
        type: string
        format: date-time
      currency:
        type: string
      amount_payable:
        type: string
        format: int64
      amount_paid:
        type: string
        format: int64
      amount_remaining:
        type: string
        format: int64
      payment_failure:
        $ref: '#/definitions/Subscription.PaymentFailure'
      trialing:
        type: boolean
      trial_ends_at:
        type: string
        format: date-time
      trial_max_spend:
        type: string
        format: int64
      current_spend:
        type: string
        format: int64
  google.protobuf.Any:
    type: object
    properties:
      '@type':
        type: string
    additionalProperties: {}
  Subscription.Status:
    type: string
    enum:
    - INVALID
    - CREATED
    - ACTIVE
    - WARNING
    - URGENT
    - CANCELING
    - CANCELED
    - TERMINATING
    - TERMINATED
    default: INVALID
  ErrorField:
    type: object
    properties:
      field:
        type: string
      description:
        type: string
  Subscription.PaymentFailure:
    type: object
    properties:
      failed_at:
        type: string
        format: date-time
      next_attempt:
        type: string
        format: date-time
      attempt_count:
        type: string
        format: int64
      error_code:
        type: string
      error_reason:
        type: string
      error_type:
        type: string
      error_message:
        type: string
      payment_method_required:
        type: boolean
      redirect_url:
        type: string
      stripe_sdk:
        $ref: '#/definitions/Subscription.PaymentFailure.StripeSDK'
  Error:
    type: object
    properties:
      status:
        type: integer
        format: int32
      code:
        type: string
      message:
        type: string
  GetSubscriptionReply:
    type: object
    properties:
      subscription:
        $ref: '#/definitions/Subscription'
securityDefinitions:
  Bearer:
    type: apiKey
    name: Authorization
    in: header
x-tagGroups:
- name: Introduction
  tags:
  - intro
- name: API
  tags:
  - Profile
  - Sessions
  - Users
  - organization
  - OrganizationMembers
  - OrganizationInvitations
  - OrganizationConfirmations
  - Subscriptions
  - Coupons
  - Credentials
  - Secrets
  - activity
  - Apps
  - Services
  - Deployments
  - Archives
  - RegionalDeployments
  - Instances
  - Domains
  - PersistentVolumes
  - Snapshots
  - Compose
  - Repositories
  - Logs
  - Metrics
  - Catalog
  - CatalogRegions
  - CatalogInstances
  - Usages
  - Summary
  - DockerHelper