AgentInteraction
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/interactions/{request_id}/cancel |
create |
Interaction cancelled, or durable cancellation receipt replayed |
POST |
/api/v1/organizations/{organization_id}/agents/{id}/spark/interactions/{request_id}/connect |
create |
Bound setup and transient secure authorization link |
GET |
/api/v1/organizations/{organization_id}/agents/{id}/spark/interactions |
list |
Current authorized interaction states in the explicit conversation |
GET |
/api/v1/organizations/{organization_id}/agents/{id}/spark/interactions/{request_id} |
load |
Current authorized interaction state and durable response receipt |
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_interactions, err := client.AgentInteraction(nil).List(map[string]any{"agent_id": "example", "organization_id": "example", "conversation_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(agent_interactions)
agent_interaction, err := client.AgentInteraction(nil).Load(map[string]any{"agent_id": "example", "id": "example_id", "organization_id": "example", "conversation_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(agent_interaction)
Lua
Construct client as shown in the Lua setup, then call the operations:
local agent_interactions, err = client:AgentInteraction():list({ agent_id = "example", organization_id = "example", conversation_id = "example" })
local agent_interaction, err = client:AgentInteraction():load({ agent_id = "example", id = "example_id", organization_id = "example", conversation_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$agent_interactions = $client->AgentInteraction()->list(["agent_id" => "example", "organization_id" => "example", "conversation_id" => "example"]);
$agent_interaction = $client->AgentInteraction()->load(["agent_id" => "example", "id" => "example_id", "organization_id" => "example", "conversation_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
agent_interactions = client.AgentInteraction().list({"agent_id": "example", "organization_id": "example", "conversation_id": "example"})
agent_interaction = client.AgentInteraction().load({"agent_id": "example", "id": "example_id", "organization_id": "example", "conversation_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
agent_interactions = client.AgentInteraction.list({ "agent_id" => "example", "organization_id" => "example", "conversation_id" => "example" })
agent_interaction = client.AgentInteraction.load({ "agent_id" => "example", "id" => "example_id", "organization_id" => "example", "conversation_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const agent_interactions = await client.AgentInteraction().list({ agent_id: "example", organization_id: "example", conversation_id: "example" })
const agent_interaction = await client.AgentInteraction().load({ agent_id: "example", id: "example_id", organization_id: "example", conversation_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id |
string |
No | Id |
interactions |
array |
Yes | Interactions |
create
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/interactions/{request_id}/cancel
Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_interactions_request_id_cancel.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
request_id |
path |
string |
Yes | |
Idempotency-Key |
header |
string |
Yes | Stable unique operation key; reuse only for the identical request, including expected versions. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
conversation_id |
string |
Yes | Explicit conversation identity, including an agent-scoped native session alias. |
expected_revision |
integer |
Yes |
Responses
200: Interaction cancelled, or durable cancellation receipt replayed
application/json
The response is object and object or object and object or object and object or object and object or object and object.
401: Authentication required
403: Agent access or experiment gate unavailable, or visible interaction lacks current operation authority
404: Authorized agent, conversation, or interaction not found; cross-scope IDs disclose nothing
409: Stale revision, competing decision, or changed key/body; current state is returned only when readable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes | |
interaction |
object and object or object and object or object and object or object and object or object and object |
Yes | A registered interaction, one variant per kind. Choice, records, changes and form cards each require their own payload, and a records question its actions; every other kind shares the common fields. |
422: Invalid conversation, interaction IDs, revision, confirmation answer, or idempotency key
502: Bad gateway
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/interactions/{request_id}/connect
Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_interactions_request_id_connect.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
request_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
conversation_id |
string |
Yes | Explicit conversation identity, including an agent-scoped native session alias. |
expected_revision |
integer |
Yes |
Responses
200: Bound setup and transient secure authorization link
application/json
| Property | Type | Required | Description |
|---|---|---|---|
expires_at |
string,null (date-time) |
Yes | |
interaction |
object and object or object and object or object and object or object and object or object and object |
Yes | A registered interaction, one variant per kind. Choice, records, changes and form cards each require their own payload, and a records question its actions; every other kind shares the common fields. |
redirect_url |
string,null (uri) |
Yes | Null only when no-auth setup is already connected |
401: Authentication required
403: Agent access or experiment gate unavailable, or visible interaction lacks current operation authority
404: Authorized agent, conversation, or interaction not found; cross-scope IDs disclose nothing
409: Setup changed or authorization is already in progress
422: Invalid conversation, interaction IDs, revision, confirmation answer, or idempotency key
502: Bad gateway
503: Authorization outcome unavailable; refresh before retrying
list
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/interactions
Operation ID: spark_interactions_api_v1_organization_persistent_agent.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
conversation_id |
query |
string |
Yes | |
ids[] |
query |
array of string |
No | Explicit interaction IDs. When omitted, Rails selects up to 50 skill-share offers for this target and conversation, prioritizing the oldest unexpired awaiting or processing offers, then recent terminal receipts. Answering open offers reveals the next batch. |
Responses
200: Current authorized interaction states in the explicit conversation
application/json
| Property | Type | Required | Description |
|---|---|---|---|
interactions |
array of object and object or object and object or object and object or object and object or object and object |
Yes |
401: Authentication required
403: Agent access or experiment gate unavailable, or visible interaction lacks current operation authority
404: Authorized agent, conversation, or interaction not found; cross-scope IDs disclose nothing
422: Invalid conversation, interaction IDs, revision, confirmation answer, or idempotency key
502: Bad gateway
load
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/interactions/{request_id}
Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_interactions_request_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
request_id |
path |
string |
Yes | |
conversation_id |
query |
string |
Yes |
Responses
200: Current authorized interaction state and durable response receipt
application/json
The response is object and object or object and object or object and object or object and object or object and object.