Gitpod gitpod.v1.BillingService API

BillingService provides billing and subscription management functionality.

OpenAPI Specification

gitpod-gitpod-v1-billingservice-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: gitpod.v1 gitpod.v1.AccountService gitpod.v1.BillingService API
  version: v1.0.0
  description: BillingService provides billing and subscription management functionality.
servers:
- url: https://api.gitpod.io
  description: Gitpod API
tags:
- description: BillingService provides billing and subscription management functionality.
  name: gitpod.v1.BillingService
  x-displayName: gitpod.v1.BillingService
paths:
  /gitpod.v1.BillingService/CancelSubscription:
    servers: []
    post:
      description: "Cancels an existing subscription.\n\n Use this method to:\n - Cancel active subscription\n - Stop recurring billing\n - Maintain access until end of billing period\n\n ### Examples\n\n - Cancel subscription:\n\n   Cancels the specified subscription.\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   subscriptionType: SUBSCRIPTION_TYPE_CORE\n   ```"
      operationId: gitpod.v1.BillingService.CancelSubscription
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              cancel_subscription:
                description: Cancels the specified subscription.
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
                  subscriptionType: SUBSCRIPTION_TYPE_CORE
            schema:
              $ref: '#/components/schemas/gitpod.v1.CancelSubscriptionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CancelSubscriptionResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CancelSubscription
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/ClearTopupFailure:
    servers: []
    post:
      description: "Clears a topup payment failure for an organization.\n\n Use this method to:\n - Acknowledge and clear a failed topup payment\n - Allow the UI to return to normal state after user acknowledges the failure\n\n Unlike subscription failures which auto-resolve when payment succeeds,\n topup failures need explicit user acknowledgment because the commit was\n voided by Metronome and the user needs to retry with a working payment method."
      operationId: gitpod.v1.BillingService.ClearTopupFailure
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.ClearTopupFailureRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.ClearTopupFailureResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: ClearTopupFailure
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/CompleteBillingSetup:
    servers: []
    post:
      description: "Completes the billing setup process after Stripe payment workflow completion.\n\n Use this method to:\n - Verify Stripe setup intent completion\n - Create Metronome contract for the organization\n - Grant free trial credits\n - Finalize billing configuration\n\n ### Examples\n\n - Complete billing setup:\n\n   Finalizes billing after successful Stripe payment setup.\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   setupIntentId: \"seti_1234567890abcdef\"\n   ```"
      operationId: gitpod.v1.BillingService.CompleteBillingSetup
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              complete_billing_setup:
                description: Finalizes billing after successful Stripe payment setup.
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
                  setupIntentId: seti_1234567890abcdef
            schema:
              $ref: '#/components/schemas/gitpod.v1.CompleteBillingSetupRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CompleteBillingSetupResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CompleteBillingSetup
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/CorrectUsageEvents:
    servers: []
    post:
      description: "Corrects previously-synced usage events by cancelling the originals and\n creating compensating negative-value events that flow through the normal\n sync pipeline to Stripe. Internal admin operation."
      operationId: gitpod.v1.BillingService.CorrectUsageEvents
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.CorrectUsageEventsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CorrectUsageEventsResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CorrectUsageEvents
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/CreateCardVerification:
    servers: []
    post:
      description: "Creates a card verification entry for an account, allowing them to skip credit card verification.\n\n Use this method to:\n - Grant Ona for Open Source program participants immediate access\n - Mark pre-vetted accounts as credit card verified\n\n Requires the 'create_card_verification' account permission.\n\n ### Examples\n\n - Create card verification for open source maintainer:\n\n   ```yaml\n   email: \"maintainer@example.org\"\n   ```"
      operationId: gitpod.v1.BillingService.CreateCardVerification
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              create_card_verification_for_open_source_maintainer:
                description: 'email: "maintainer@example.org"

                  '
                value:
                  email: maintainer@example.org
            schema:
              $ref: '#/components/schemas/gitpod.v1.CreateCardVerificationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CreateCardVerificationResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CreateCardVerification
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/CreateCoupon:
    servers: []
    post:
      description: "Creates a new coupon for support staff to distribute to customers.\n\n Use this method to:\n - Create promotional coupons for marketing campaigns\n - Generate support coupons for customer service\n - Set up trial credit coupons for new users"
      operationId: gitpod.v1.BillingService.CreateCoupon
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.CreateCouponRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CreateCouponResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CreateCoupon
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/CreateSubscription:
    servers: []
    post:
      description: "Creates a new subscription for an organization.\n\n Use this method to:\n - Create a new subscription with specified type\n - Add subscription to existing Metronome contract\n - Create new contract if none exists"
      operationId: gitpod.v1.BillingService.CreateSubscription
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.CreateSubscriptionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CreateSubscriptionResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CreateSubscription
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/CreateTeamCreditAllocation:
    servers: []
    post:
      description: "Creates a credit allocation (budget) for a team.\n\n Allocations are soft budgets for reporting and alerting — not enforced at usage time.\n Over-allocation (sum of team budgets > org grant) is allowed.\n\n ### Examples\n\n - Create a team allocation:\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   teamId: \"d2c94c27-3b76-4a42-b88c-95a85e392c68\"\n   creditBudget: \"500\"\n   ```\n\n ### Authorization\n\n Requires `billing:create` permission on the organization."
      operationId: gitpod.v1.BillingService.CreateTeamCreditAllocation
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              create_a_team_allocation:
                description: 'organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"

                  teamId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"

                  creditBudget: "500"

                  '
                value:
                  creditBudget: '500'
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
                  teamId: d2c94c27-3b76-4a42-b88c-95a85e392c68
            schema:
              $ref: '#/components/schemas/gitpod.v1.CreateTeamCreditAllocationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CreateTeamCreditAllocationResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CreateTeamCreditAllocation
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/DeleteTeamCreditAllocation:
    servers: []
    post:
      description: "Deletes the credit allocation for a team.\n\n ### Examples\n\n - Delete a team's allocation:\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   teamId: \"d2c94c27-3b76-4a42-b88c-95a85e392c68\"\n   ```\n\n ### Authorization\n\n Requires `billing:delete` permission on the organization."
      operationId: gitpod.v1.BillingService.DeleteTeamCreditAllocation
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              delete_a_team's_allocation:
                description: 'organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"

                  teamId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"

                  '
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
                  teamId: d2c94c27-3b76-4a42-b88c-95a85e392c68
            schema:
              $ref: '#/components/schemas/gitpod.v1.DeleteTeamCreditAllocationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.DeleteTeamCreditAllocationResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: DeleteTeamCreditAllocation
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetAutoTopupSettings:
    servers: []
    post:
      description: Retrieves auto-topup settings for an organization.
      operationId: gitpod.v1.BillingService.GetAutoTopupSettings
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetAutoTopupSettingsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetAutoTopupSettingsResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetAutoTopupSettings
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetBillingInfo:
    servers: []
    post:
      description: "Retrieves billing information including credit balance for an organization.\n\n Use this method to:\n - Check available credits for the organization\n - Monitor credit usage and remaining balance\n - Display billing status in the dashboard\n - Implement usage-based alerts\n\n ### Examples\n\n - Get billing info:\n\n   Retrieves current credit balance and usage information.\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```"
      operationId: gitpod.v1.BillingService.GetBillingInfo
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_billing_info:
                description: Retrieves current credit balance and usage information.
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetBillingInfoRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetBillingInfoResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetBillingInfo
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetBillingRecord:
    servers: []
    post:
      description: Gets details about a specific billing record.
      operationId: gitpod.v1.BillingService.GetBillingRecord
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetBillingRecordRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetBillingRecordResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetBillingRecord
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetCoupon:
    servers: []
    post:
      description: "Retrieves a specific coupon by its code.\n\n Use this method to:\n - Validate coupon codes during checkout\n - Display coupon details to users\n - Check coupon availability and expiration\n\n ### Examples\n\n - Get coupon by code:\n\n   Retrieves coupon details for validation.\n\n   ```yaml\n   couponCode: \"WELCOME2024\"\n   organizationId: \"123e4567-e89b-12d3-a456-426614174000\"\n   ```"
      operationId: gitpod.v1.BillingService.GetCoupon
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_coupon_by_code:
                description: Retrieves coupon details for validation.
                value:
                  couponCode: WELCOME2024
                  organizationId: 123e4567-e89b-12d3-a456-426614174000
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetCouponRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetCouponResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetCoupon
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetCreditConsumptionTimeSeries:
    servers: []
    post:
      description: "Returns daily credit consumption (OCU) time series for an organization,\n broken down by metric category."
      operationId: gitpod.v1.BillingService.GetCreditConsumptionTimeSeries
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetCreditConsumptionTimeSeriesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetCreditConsumptionTimeSeriesResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetCreditConsumptionTimeSeries
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetCreditUsageExport:
    servers: []
    post:
      description: "Returns a signed download URL for a CSV export of per-user credit usage.\n The URL points to an HTTP endpoint that streams gzip-compressed CSV."
      operationId: gitpod.v1.BillingService.GetCreditUsageExport
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetCreditUsageExportRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetCreditUsageExportResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetCreditUsageExport
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetCreditUsageReport:
    servers: []
    post:
      description: "Returns a daily credit usage report for an enterprise organization,\n broken down by usage type and by user."
      operationId: gitpod.v1.BillingService.GetCreditUsageReport
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetCreditUsageReportRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetCreditUsageReportResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetCreditUsageReport
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetCumulativeCreditUsage:
    servers: []
    post:
      description: "Returns cumulative credit usage for an organization and its teams.\n\n Use this method to:\n - Get the total cumulative credit consumption as of a point in time\n - Get per-team cumulative usage with credit allocation (budget) comparison\n - Display team credit summaries on the usage page and team detail page\n\n ### Examples\n\n - Get current cumulative usage:\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```\n\n - Get cumulative usage as of a specific date:\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   asOf: \"2026-03-31T23:59:59Z\"\n   ```\n\n ### Authorization\n\n Requires `billing:read_usage` permission on the organization."
      operationId: gitpod.v1.BillingService.GetCumulativeCreditUsage
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_cumulative_usage_as_of_a_specific_date:
                description: 'organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"

                  asOf: "2026-03-31T23:59:59Z"

                  '
                value:
                  asOf: '2026-03-31T23:59:59Z'
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
              get_current_cumulative_usage:
                description: 'organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"

                  '
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetCumulativeCreditUsageRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetCumulativeCreditUsageResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetCumulativeCreditUsage
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetEnterpriseBillingInfo:
    servers: []
    post:
      description: Returns enterprise billing info for an organization.
      operationId: gitpod.v1.BillingService.GetEnterpriseBillingInfo
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetEnterpriseBillingInfoRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetEnterpriseBillingInfoResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetEnterpriseBillingInfo
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetStripePortalUrl:
    servers: []
    post:
      description: "Retrieves the Stripe Customer Portal URL for an organization.\n\n Use this method to:\n - Get the Stripe Customer Portal URL for billing management\n - Allow customers to manage their payment methods and billing details\n - Provide access to billing history and invoices\n\n ### Examples\n\n - Get Stripe portal URL:\n\n   Retrieves the portal URL for the organization.\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```"
      operationId: gitpod.v1.BillingService.GetStripePortalUrl
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_stripe_portal_url:
                description: Retrieves the portal URL for the organization.
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetStripePortalUrlRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetStripePortalUrlResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetStripePortalUrl
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetStripePublishableKey:
    servers: []
    post:
      description: "Retrieves the Stripe publishable key for an organization.\n\n Use this method to:\n - Get the appropriate Stripe publishable key for frontend payment forms\n - Support different billing realms (production/sandbox)\n - Ensure proper isolation between organizations\n\n ### Examples\n\n - Get publishable key:\n\n   Retrieves the Stripe publishable key for the organization.\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```"
      operationId: gitpod.v1.BillingService.GetStripePublishableKey
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_publishable_key:
                description: Retrieves the Stripe publishable key for the organization.
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetStripePublishableKeyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetStripePublishableKeyResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetStripePublishableKey
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GetTeamCreditAllocation:
    servers: []
    post:
      description: "Gets the credit allocation for a team.\n\n ### Examples\n\n - Get a team's allocation:\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   teamId: \"d2c94c27-3b76-4a42-b88c-95a85e392c68\"\n   ```\n\n ### Authorization\n\n Requires `billing:read` permission on the organization."
      operationId: gitpod.v1.BillingService.GetTeamCreditAllocation
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_a_team's_allocation:
                description: 'organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"

                  teamId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"

                  '
                value:
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
                  teamId: d2c94c27-3b76-4a42-b88c-95a85e392c68
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetTeamCreditAllocationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetTeamCreditAllocationResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetTeamCreditAllocation
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/GrantCredits:
    servers: []
    post:
      description: "Grants additional credits to an organization.\n\n Use this method to:\n - Grant credits to existing customers\n - Add promotional credits\n - Provide customer service credits\n\n ### Examples\n\n - Grant credits:\n\n   Grants 80 credits to the organization for one year.\n\n   ```yaml\n   organizationId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   creditsAmount: 80.0\n   ```"
      operationId: gitpod.v1.BillingService.GrantCredits
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              grant_credits:
                description: Grants 80 credits to the organization for one year.
                value:
                  creditsAmount: 80
                  organizationId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.GrantCreditsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GrantCreditsResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GrantCredits
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/InsertUsageEvents:
    servers: []
    post:
      description: "Inserts usage events from an external source (e.g., backfilling missing\n LLM token usage from a provider console export). Internal admin operation."
      operationId: gitpod.v1.BillingService.InsertUsageEvents
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.InsertUsageEventsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.InsertUsageEventsResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: InsertUsageEvents
      tags:
      - gitpod.v1.BillingService
  /gitpod.v1.BillingService/ListCoupons:
    servers: []
    post:
      description: "Lists existing coupons with filtering and pagination support.\n\n Use this method to:\n - View all created coupons\n - Filter coupons by status or type\n - Monitor coupon usage and expiration"
      operationId: gitpod.v1.BillingService.ListCoupons
      parameters:
      - in: query
        name: pageSize
        schema:
          default: 25
          maximum: 100
          minimum: 0
          type: integer
      - in: query
        name: token
        schema:
          default: ''
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/gitpod.v1.ListCouponsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.ListCouponsResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/compon

# --- truncated at 32 KB (119 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gitpod/refs/heads/main/openapi/gitpod-gitpod-v1-billingservice-api-openapi.yml