API

AgentSubscription

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/subscriptions create Agent subscription settings
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/subscriptions load Agent subscription settings

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

agent_subscription, err := client.AgentSubscription(nil).Load(map[string]any{"agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(agent_subscription)
created, err := client.AgentSubscription(nil).Create(map[string]any{"agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local agent_subscription, err = client:AgentSubscription():load({ agent_id = "example", organization_id = "example" })
local created, err = client:AgentSubscription():create({ agent_id = "example", organization_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$agent_subscription = $client->AgentSubscription()->load(["agent_id" => "example", "organization_id" => "example"]);
$created = $client->AgentSubscription()->create(["agent_id" => "example", "organization_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

agent_subscription = client.AgentSubscription().load({"agent_id": "example", "organization_id": "example"})
created = client.AgentSubscription().create({ "agent_id": "example", "organization_id": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

agent_subscription = client.AgentSubscription.load({ "agent_id" => "example", "organization_id" => "example" })
created = client.AgentSubscription.create({ "agent_id" => "example", "organization_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const agent_subscription = await client.AgentSubscription().load({ agent_id: "example", organization_id: "example" })
const created = await client.AgentSubscription().create({ agent_id: "example", organization_id: "example" })

Fields

Field Type Required Description

create

POST /api/v1/organizations/{organization_id}/agents/{id}/spark/subscriptions

Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_subscriptions.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Request body

application/json

The request body is object or object or object or object or object or object or object or object or object or object.

Responses

200: Agent subscription settings

application/json

The response is object or object.

202: Enterprise subscription selection accepted; the new revision must qualify before use

application/json

Property Type Required Description
available boolean Yes
can_make_private boolean No
pending boolean Yes
profile_id string No Canonical saved account prepared for this selection. Use this identity to qualify the subsequent ready read.
reason string,null No
selection_ready boolean Yes
sharing_version integer No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/subscriptions

Operation ID: spark_subscriptions_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
refresh_provider query enum: anthropic, openai, xai No Request fresh model discovery for this subscription provider.

Responses

200: Agent subscription settings

application/json

The response is object or object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway