---
title: "Record the rival this organization is switching from, before its first top-up."
method: POST
path: "/v1/switching"
tags: ["switching"]
---

# Record the rival this organization is switching from, before its first top-up.

`POST /v1/switching`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/switching`
- Auth: HTTP bearer

Once per organization, and only before its first top-up is paid. It records where the organization came from; the reward is the welcome match: credit added within 30 days of signing up is matched, up to $1,000 in total, as each payment settles, and a referral, which matches the same payments and is never less, applies instead, never both. A refund or chargeback of a payment takes back that payment's match. Recording the same provider again answers the same summary; a different one is refused with 409.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `provider` 'e2b' | 'daytona' | 'vercel' | 'modal' | 'cloudflare' | 'fly' | 'blaxel', required

## Response `200`

Success

- object
  - `enabled` boolean, required: False while the programme is paused.
  - `maxMicros` string, required: The most the organization's payments are matched to, in total. Integer microdollars, as a string (1,000,000 = $1).
  - `providers` string[], required
  - `eligible` boolean, required: Whether this organization can record a switch now: none recorded yet, and no top-up paid yet.
  - `switch` object, nullable, required: The switch this organization recorded, or null when it has not.
    - `provider` 'e2b' | 'daytona' | 'vercel' | 'modal' | 'cloudflare' | 'fly' | 'blaxel'
    - `status` 'pending' | 'paid' | 'superseded' | 'refused' | 'reversed': pending: no payment decided yet. paid: some payment's match is kept. superseded: a referral matches the payments instead, which is never less. refused: see refusedReason. reversed: every matched payment was refunded or disputed.
    - `refusedReason` 'program_off' | 'suspended' | 'same_card' | 'fraud' | 'too_late' | 'null', nullable
    - `recordedAt` string, date-time
    - `creditMicros` string: The matches this organization got and kept. Integer microdollars, as a string (1,000,000 = $1).
  - `welcome` object, required
    - `enabled` boolean, required: False while the match is paused.
    - `maxMicros` string, required: The most the organization's payments are matched to, in total. Integer microdollars, as a string (1,000,000 = $1).
    - `endsAt` string, date-time, required: When the offer ends: 30 days after the organization signed up.
    - `eligible` boolean, required: Whether credit added now would be matched: some of maxMicros is left and the offer is open.
    - `toppedUp` boolean, required: Whether credit has been added.
    - `status` 'pending' | 'paid' | 'superseded' | 'refused' | 'reversed' | 'null', nullable, required: Null until a payment is decided. paid: some payment's match is kept. superseded: a referral matches the payments instead, which is never less. refused: the latest payment was not matched. reversed: every matched payment was refunded or disputed.
    - `creditMicros` string, required: The matches this organization got and kept. Integer microdollars, as a string (1,000,000 = $1).
    - `usedMicros` string, required: The part of maxMicros used: creditMicros. Integer microdollars, as a string (1,000,000 = $1).
    - `leftMicros` string, required: What credit added now could still get; 0 once the offer ends. Integer microdollars, as a string (1,000,000 = $1).

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
