RelayAgentConnection
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/relay/connections |
create |
Current owner connection result |
POST |
/api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id}/setup |
create |
Current owner connection result |
GET |
/api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections |
list |
Current owner connection result |
GET |
/api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id}/change |
load |
Current owner connection result |
GET |
/api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id} |
load |
Current owner connection result |
DELETE |
/api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id} |
remove |
Current owner connection result |
PATCH |
/api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id} |
update |
Current owner connection result |
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:
relay_agent_connections, err := client.RelayAgentConnection(nil).List(map[string]any{"agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(relay_agent_connections)
relay_agent_connection, err := client.RelayAgentConnection(nil).Load(map[string]any{"agent_id": "example", "id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(relay_agent_connection)
created, err := client.RelayAgentConnection(nil).Create(map[string]any{"agent_id": "example", "organization_id": "example", "agent_card_url": "example", "auth_scheme": "example", "name": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
updated, err := client.RelayAgentConnection(nil).Update(map[string]any{"id": "example_id", "agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
removed, err := client.RelayAgentConnection(nil).Remove(map[string]any{"agent_id": "example", "id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(removed)
Lua
Construct client as shown in the Lua setup, then call the operations:
local relay_agent_connections, err = client:RelayAgentConnection():list({ agent_id = "example", organization_id = "example" })
local relay_agent_connection, err = client:RelayAgentConnection():load({ agent_id = "example", id = "example_id", organization_id = "example" })
local created, err = client:RelayAgentConnection():create({ agent_id = "example", organization_id = "example", agent_card_url = "example", auth_scheme = "example", name = "example" })
local updated, err = client:RelayAgentConnection():update({ id = "example_id", agent_id = "example", organization_id = "example" })
local removed, err = client:RelayAgentConnection():remove({ agent_id = "example", id = "example_id", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$relay_agent_connections = $client->RelayAgentConnection()->list(["agent_id" => "example", "organization_id" => "example"]);
$relay_agent_connection = $client->RelayAgentConnection()->load(["agent_id" => "example", "id" => "example_id", "organization_id" => "example"]);
$created = $client->RelayAgentConnection()->create(["agent_id" => "example", "organization_id" => "example", "agent_card_url" => "example", "auth_scheme" => "example", "name" => "example"]);
$updated = $client->RelayAgentConnection()->update(["id" => "example_id", "agent_id" => "example", "organization_id" => "example"]);
$client->RelayAgentConnection()->remove(["agent_id" => "example", "id" => "example_id", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
relay_agent_connections = client.RelayAgentConnection().list({"agent_id": "example", "organization_id": "example"})
relay_agent_connection = client.RelayAgentConnection().load({"agent_id": "example", "id": "example_id", "organization_id": "example"})
created = client.RelayAgentConnection().create({ "agent_id": "example", "organization_id": "example", "agent_card_url": "example", "auth_scheme": "example", "name": "example" })
updated = client.RelayAgentConnection().update({"id": "example_id", "agent_id": "example", "organization_id": "example"})
client.RelayAgentConnection().remove({"agent_id": "example", "id": "example_id", "organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
relay_agent_connections = client.RelayAgentConnection.list({ "agent_id" => "example", "organization_id" => "example" })
relay_agent_connection = client.RelayAgentConnection.load({ "agent_id" => "example", "id" => "example_id", "organization_id" => "example" })
created = client.RelayAgentConnection.create({ "agent_id" => "example", "organization_id" => "example", "agent_card_url" => "example", "auth_scheme" => "example", "name" => "example" })
updated = client.RelayAgentConnection.update({ "id" => "example_id", "agent_id" => "example", "organization_id" => "example" })
client.RelayAgentConnection.remove({ "agent_id" => "example", "id" => "example_id", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const relay_agent_connections = await client.RelayAgentConnection().list({ agent_id: "example", organization_id: "example" })
const relay_agent_connection = await client.RelayAgentConnection().load({ agent_id: "example", id: "example_id", organization_id: "example" })
const created = await client.RelayAgentConnection().create({ agent_id: "example", organization_id: "example", agent_card_url: "example", auth_scheme: "example", name: "example" })
const updated = await client.RelayAgentConnection().update({ id: "example_id", agent_id: "example", organization_id: "example" })
await client.RelayAgentConnection().remove({ agent_id: "example", id: "example_id", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
agent_card_url |
string |
Yes | Agent Card Url |
auth_scheme |
string |
Yes | Auth Scheme |
can_configure |
boolean |
Yes | Can Configure |
can_disconnect |
boolean |
Yes | Can Disconnect |
can_setup |
boolean |
Yes | Can Setup |
connection |
object |
Yes | Connection |
credential |
one,string,null |
No | Write-only outbound key. |
error_code |
one,string,null |
Yes | Error Code |
expected_generation |
integer |
Yes | Expected Generation |
generation |
integer |
Yes | Generation |
id |
string |
Yes | Id |
name |
string |
Yes | Name |
remote_agent |
one,string,null |
Yes | Remote Agent |
requester_id |
string |
Yes | Requester Id |
retired_at |
one,string,null |
Yes | Retired At |
revoked_at |
one,string,null |
Yes | Revoked At |
scope_key |
string |
Yes | Scope Key |
source_operation_id |
one,string,null |
Yes | Source Operation Id |
state |
string |
Yes | State |
create
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections
Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_relay_connections.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Composal-Requester-Id |
header |
string |
Yes | Retain the signed-in requester ID from list/detail with this exact intended write. |
Idempotency-Key |
header |
string |
Yes | Stable key for this exact creation intent. Retain it after uncertain delivery. |
X-Composal-Relay-Scope |
header |
string |
Yes | Retain the scope_key from list/detail with the original requester and intended write. A new membership cannot inherit that intent. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
agent_card_url |
string (uri) |
Yes | |
auth_scheme |
enum: bearer, api_key, none |
Yes | |
credential |
string,null |
No | Write-only outbound key. Required for bearer/api_key; null for none. It is never returned in owner metadata or model results. |
name |
string |
Yes | |
remote_agent |
string,null |
No | |
source_operation_id |
string,null |
No |
Responses
202: Current owner connection result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
connection |
object |
Yes | |
connection.agent_card_url |
string (uri) |
Yes | |
connection.auth_scheme |
enum: bearer, api_key, none |
Yes | |
connection.can_configure |
boolean |
Yes | |
connection.can_disconnect |
boolean |
Yes | |
connection.can_setup |
boolean |
Yes | |
connection.error_code |
string,null |
Yes | |
connection.generation |
integer (int64) |
Yes | |
connection.id |
string |
Yes | |
connection.name |
string |
Yes | |
connection.remote_agent |
string,null |
Yes | |
connection.retired_at |
string,null (date-time) |
Yes | |
connection.revoked_at |
string,null (date-time) |
Yes | |
connection.source_operation_id |
string,null |
Yes | |
connection.state |
enum: pending, configured, source_unavailable, revoked |
Yes |
400: Missing required fields
401: Authentication required
403: Current requester or source access required
404: Agent, original membership, connection or feature unavailable
409: Retained intent or generation conflict
422: Invalid bounded connection settings
POST /api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id}/setup
Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_relay_connections_connection_id_setup.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
connection_id |
path |
string |
Yes | |
X-Composal-Requester-Id |
header |
string |
Yes | Retain the signed-in requester ID from list/detail with this exact intended write. |
X-Composal-Relay-Scope |
header |
string |
Yes | Retain the scope_key from list/detail with the original requester and intended write. A new membership cannot inherit that intent. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
expected_generation |
integer (int64) |
Yes |
Responses
200: Current owner connection result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
connection |
object |
Yes | |
connection.agent_card_url |
string (uri) |
Yes | |
connection.auth_scheme |
enum: bearer, api_key, none |
Yes | |
connection.can_configure |
boolean |
Yes | |
connection.can_disconnect |
boolean |
Yes | |
connection.can_setup |
boolean |
Yes | |
connection.error_code |
string,null |
Yes | |
connection.generation |
integer (int64) |
Yes | |
connection.id |
string |
Yes | |
connection.inbound_agent_card_path |
string |
Yes | Recipient-bound inbound endpoint from the explicit owner setup response. |
connection.inbound_agent_card_url |
string (uri) |
Yes | Recipient-bound inbound endpoint from the explicit owner setup response. |
connection.inbound_rpc_path |
string |
Yes | Recipient-bound inbound endpoint from the explicit owner setup response. |
connection.inbound_rpc_url |
string (uri) |
Yes | Recipient-bound inbound endpoint from the explicit owner setup response. |
connection.inbound_token |
string |
Yes | Explicit owner setup response only. Never returned by ordinary reads or model tools. |
connection.name |
string |
Yes | |
connection.remote_agent |
string,null |
Yes | |
connection.retired_at |
string,null (date-time) |
Yes | |
connection.revoked_at |
string,null (date-time) |
Yes | |
connection.source_operation_id |
string,null |
Yes | |
connection.state |
enum: pending, configured, source_unavailable, revoked |
Yes |
400: Missing required fields
401: Authentication required
403: Current requester or source access required
404: Agent, original membership, connection or feature unavailable
409: Retained intent or generation conflict
422: Invalid bounded connection settings
list
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections
Operation ID: spark_relay_connections_api_v1_organization_persistent_agent.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
cursor |
query |
string |
No | |
limit |
query |
integer |
No | |
selected_connection_id |
query |
string |
No | Include the selected current-owner connection even if it falls outside this page. |
Responses
200: Current owner connection result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
can_connect |
boolean |
Yes | |
connections |
array of object |
Yes | |
connections[].agent_card_url |
string (uri) |
Yes | |
connections[].auth_scheme |
enum: bearer, api_key, none |
Yes | |
connections[].can_configure |
boolean |
Yes | |
connections[].can_disconnect |
boolean |
Yes | |
connections[].can_setup |
boolean |
Yes | |
connections[].error_code |
string,null |
Yes | |
connections[].generation |
integer (int64) |
Yes | |
connections[].id |
string |
Yes | |
connections[].name |
string |
Yes | |
connections[].remote_agent |
string,null |
Yes | |
connections[].retired_at |
string,null (date-time) |
Yes | |
connections[].revoked_at |
string,null (date-time) |
Yes | |
connections[].source_operation_id |
string,null |
Yes | |
connections[].state |
enum: pending, configured, source_unavailable, revoked |
Yes | |
pagination |
object |
Yes | |
pagination.limit |
integer |
Yes | |
pagination.next |
string |
No | |
requester_id |
string |
Yes | |
scope_key |
string |
Yes | |
selected_connection |
object or null |
Yes |
400: Missing required fields
401: Authentication required
403: Current requester or source access required
404: Agent, original membership, connection or feature unavailable
409: Retained intent or generation conflict
422: Invalid bounded connection settings
load
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id}/change
Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_relay_connections_connection_id_change.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
connection_id |
path |
string |
Yes | |
X-Composal-Requester-Id |
header |
string |
Yes | Retain the signed-in requester ID from list/detail with this exact intended write. |
X-Composal-Relay-Scope |
header |
string |
Yes | Retain the scope_key from list/detail with the original requester and intended write. A new membership cannot inherit that intent. |
change |
query |
enum: configure, disconnect |
Yes | |
expected_generation |
query |
integer (int64) |
Yes |
Responses
200: Current owner connection result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
change_resolved |
boolean |
Yes | The original generation can no longer apply, or this disconnect is already applied. Review current settings before preparing a new change. |
connection |
object |
Yes | |
connection.agent_card_url |
string (uri) |
Yes | |
connection.auth_scheme |
enum: bearer, api_key, none |
Yes | |
connection.can_configure |
boolean |
Yes | |
connection.can_disconnect |
boolean |
Yes | |
connection.can_setup |
boolean |
Yes | |
connection.error_code |
string,null |
Yes | |
connection.generation |
integer (int64) |
Yes | |
connection.id |
string |
Yes | |
connection.name |
string |
Yes | |
connection.remote_agent |
string,null |
Yes | |
connection.retired_at |
string,null (date-time) |
Yes | |
connection.revoked_at |
string,null (date-time) |
Yes | |
connection.source_operation_id |
string,null |
Yes | |
connection.state |
enum: pending, configured, source_unavailable, revoked |
Yes |
400: Missing required fields
401: Authentication required
403: Current requester or source access required
404: Agent, original membership, connection or feature unavailable
409: Retained intent or generation conflict
422: Invalid bounded connection settings
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id}
Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_relay_connections_connection_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
connection_id |
path |
string |
Yes |
Responses
200: Current owner connection result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
connection |
object |
Yes | |
connection.agent_card_url |
string (uri) |
Yes | |
connection.auth_scheme |
enum: bearer, api_key, none |
Yes | |
connection.can_configure |
boolean |
Yes | |
connection.can_disconnect |
boolean |
Yes | |
connection.can_setup |
boolean |
Yes | |
connection.error_code |
string,null |
Yes | |
connection.generation |
integer (int64) |
Yes | |
connection.id |
string |
Yes | |
connection.name |
string |
Yes | |
connection.remote_agent |
string,null |
Yes | |
connection.retired_at |
string,null (date-time) |
Yes | |
connection.revoked_at |
string,null (date-time) |
Yes | |
connection.source_operation_id |
string,null |
Yes | |
connection.state |
enum: pending, configured, source_unavailable, revoked |
Yes | |
requester_id |
string |
Yes | |
scope_key |
string |
Yes |
400: Missing required fields
401: Authentication required
403: Current requester or source access required
404: Agent, original membership, connection or feature unavailable
409: Retained intent or generation conflict
422: Invalid bounded connection settings
remove
DELETE /api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id}
Operation ID: delete_api_v1_organizations_organization_id_agents_id_spark_relay_connections_connection_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
connection_id |
path |
string |
Yes | |
X-Composal-Requester-Id |
header |
string |
Yes | Retain the signed-in requester ID from list/detail with this exact intended write. |
X-Composal-Relay-Scope |
header |
string |
Yes | Retain the scope_key from list/detail with the original requester and intended write. A new membership cannot inherit that intent. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
expected_generation |
integer (int64) |
Yes |
Responses
202: Current owner connection result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
connection |
object |
Yes | |
connection.agent_card_url |
string (uri) |
Yes | |
connection.auth_scheme |
enum: bearer, api_key, none |
Yes | |
connection.can_configure |
boolean |
Yes | |
connection.can_disconnect |
boolean |
Yes | |
connection.can_setup |
boolean |
Yes | |
connection.error_code |
string,null |
Yes | |
connection.generation |
integer (int64) |
Yes | |
connection.id |
string |
Yes | |
connection.name |
string |
Yes | |
connection.remote_agent |
string,null |
Yes | |
connection.retired_at |
string,null (date-time) |
Yes | |
connection.revoked_at |
string,null (date-time) |
Yes | |
connection.source_operation_id |
string,null |
Yes | |
connection.state |
enum: pending, configured, source_unavailable, revoked |
Yes |
400: Missing required fields
401: Authentication required
403: Current requester or source access required
404: Agent, original membership, connection or feature unavailable
409: Retained intent or generation conflict
422: Invalid bounded connection settings
update
PATCH /api/v1/organizations/{organization_id}/agents/{id}/spark/relay/connections/{connection_id}
Operation ID: patch_api_v1_organizations_organization_id_agents_id_spark_relay_connections_connection_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
connection_id |
path |
string |
Yes | |
X-Composal-Requester-Id |
header |
string |
Yes | Retain the signed-in requester ID from list/detail with this exact intended write. |
X-Composal-Relay-Scope |
header |
string |
Yes | Retain the scope_key from list/detail with the original requester and intended write. A new membership cannot inherit that intent. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
auth_scheme |
enum: bearer, api_key, none |
Yes | |
credential |
string,null |
No | Write-only outbound key. Required for bearer/api_key; null for none. It is never returned in owner metadata or model results. |
expected_generation |
integer (int64) |
Yes | |
name |
string |
Yes | |
remote_agent |
string,null |
No |
Responses
202: Current owner connection result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
connection |
object |
Yes | |
connection.agent_card_url |
string (uri) |
Yes | |
connection.auth_scheme |
enum: bearer, api_key, none |
Yes | |
connection.can_configure |
boolean |
Yes | |
connection.can_disconnect |
boolean |
Yes | |
connection.can_setup |
boolean |
Yes | |
connection.error_code |
string,null |
Yes | |
connection.generation |
integer (int64) |
Yes | |
connection.id |
string |
Yes | |
connection.name |
string |
Yes | |
connection.remote_agent |
string,null |
Yes | |
connection.retired_at |
string,null (date-time) |
Yes | |
connection.revoked_at |
string,null (date-time) |
Yes | |
connection.source_operation_id |
string,null |
Yes | |
connection.state |
enum: pending, configured, source_unavailable, revoked |
Yes |