Skip to main content
POST
/
preview
/
v2
/
capacity_transfers
Create capacity transfer
curl --request POST \
  --url https://api.sfcompute.com/preview/v2/capacity_transfers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from_capacity": "<string>",
  "to_capacity": "<string>",
  "allocation_schedule_delta": [
    {
      "start_at": 1738972800,
      "node_count": 123,
      "end_at": 1738972800
    }
  ],
  "instance_sku": "isku_k3R-nX9vLm7Qp2Yw5Jd8F"
}
'
{
  "object": "capacity_transfer",
  "id": "<string>",
  "created_at": 1738972800,
  "from_capacity": "<string>",
  "to_capacity": "<string>",
  "instance_sku": {
    "id": "isku_k3R-nX9vLm7Qp2Yw5Jd8F",
    "name": "<string>"
  },
  "allocation_schedule_delta": [
    {
      "start_at": 1738972800,
      "node_count": 123,
      "end_at": 1738972800
    }
  ],
  "rejected_reason": "<string>"
}

Authorizations

Authorization
string
header
required

Create an API token using sf tokens create or at https://sfcompute.com/account/api-keys.

Headers

Idempotency-Key
string | null

Unique key for idempotent transfer creation.

Body

application/json
from_capacity
string
required

Source capacity (must belong to the authenticated caller).

Pattern: (cap_[0-9a-zA-Z_-]{1,21})|(sfc:capacity:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})
Example:

"cap_k3R-nX9vLm7Qp2Yw5Jd8F"

to_capacity
string
required

Destination capacity (must belong to the authenticated caller).

Pattern: (cap_[0-9a-zA-Z_-]{1,21})|(sfc:capacity:[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+){2,2})
Example:

"cap_k3R-nX9vLm7Qp2Yw5Jd8F"

allocation_schedule_delta
object[]
required

The transfer's allocation schedule as constant-quantity rectangles. If the final entry does not have end_at: null, a zero-quantity unbounded tail is appended automatically.

instance_sku
required

Instance SKU the transfer applies to.

Pattern: isku_[0-9a-zA-Z_-]{1,21}
Example:

"isku_k3R-nX9vLm7Qp2Yw5Jd8F"

Response

Capacity transfer accepted.

object
string
default:capacity_transfer
required
read-only
Allowed value: "capacity_transfer"
id
string
required
Pattern: cxfr_[0-9a-zA-Z_-]{1,21}
Example:

"cxfr_k3R-nX9vLm7Qp2Yw5Jd8F"

status
enum<string>
required
Available options:
pending,
executed,
rejected
created_at
integer<int64>
required

Unix timestamp.

Example:

1738972800

from_capacity
string
required
Pattern: cap_[0-9a-zA-Z_-]{1,21}
Example:

"cap_k3R-nX9vLm7Qp2Yw5Jd8F"

to_capacity
string
required
Pattern: cap_[0-9a-zA-Z_-]{1,21}
Example:

"cap_k3R-nX9vLm7Qp2Yw5Jd8F"

instance_sku
object
required

Instance SKU the transfer applied to. Carries the SKU's human-readable name when one is registered.

allocation_schedule_delta
object[]
required

The transfer's allocation schedule, expanded into constant-quantity rectangles. The final rectangle has end_at: null (the unbounded tail); gaps are represented as explicit zero-quantity rectangles.

rejected_reason
string | null

Reason a capacity transfer was rejected.