API

LocalThreadDelivery

Operations

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

Method Route SDK operation Returns
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/deliveries/{delivery_id} load Original requester-scoped Relay delivery consent
PUT /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/deliveries/{delivery_id} update Original requester-scoped Relay delivery consent

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:

local_thread_delivery, err := client.LocalThreadDelivery(nil).Load(map[string]any{"agent_id": "example", "id": "example_id", "local_thread_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(local_thread_delivery)
updated, err := client.LocalThreadDelivery(nil).Update(map[string]any{"id": "example_id", "agent_id": "example", "local_thread_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)

Lua

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

local local_thread_delivery, err = client:LocalThreadDelivery():load({ agent_id = "example", id = "example_id", local_thread_id = "example", organization_id = "example" })
local updated, err = client:LocalThreadDelivery():update({ id = "example_id", agent_id = "example", local_thread_id = "example", organization_id = "example" })

PHP

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

$local_thread_delivery = $client->LocalThreadDelivery()->load(["agent_id" => "example", "id" => "example_id", "local_thread_id" => "example", "organization_id" => "example"]);
$updated = $client->LocalThreadDelivery()->update(["id" => "example_id", "agent_id" => "example", "local_thread_id" => "example", "organization_id" => "example"]);

Python

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

local_thread_delivery = client.LocalThreadDelivery().load({"agent_id": "example", "id": "example_id", "local_thread_id": "example", "organization_id": "example"})
updated = client.LocalThreadDelivery().update({"id": "example_id", "agent_id": "example", "local_thread_id": "example", "organization_id": "example"})

Ruby

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

local_thread_delivery = client.LocalThreadDelivery.load({ "agent_id" => "example", "id" => "example_id", "local_thread_id" => "example", "organization_id" => "example" })
updated = client.LocalThreadDelivery.update({ "id" => "example_id", "agent_id" => "example", "local_thread_id" => "example", "organization_id" => "example" })

TypeScript

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

const local_thread_delivery = await client.LocalThreadDelivery().load({ agent_id: "example", id: "example_id", local_thread_id: "example", organization_id: "example" })
const updated = await client.LocalThreadDelivery().update({ id: "example_id", agent_id: "example", local_thread_id: "example", organization_id: "example" })

Fields

Field Type Required Description
decision string Yes Decision
decision_pending boolean Yes Decision Pending
delivery object Yes Delivery
expected_version integer Yes Expected Version
id string No Id
policy object Yes Policy
recovery_message one,string,null Yes Recovery Message

load

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/deliveries/{delivery_id}

Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_local_threads_local_thread_id_deliveries_delivery_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
local_thread_id path string Yes
delivery_id path string Yes
expected_version query integer No Original preference version retained with an unconfirmed decision.

Responses

application/json

Property Type Required Description
decision_pending boolean Yes
delivery object Yes
delivery.consent_decision enum: automatic, approved, dismissed Yes
delivery.final_reply object or null Yes
delivery.held boolean Yes
delivery.id string Yes
delivery.operation_id string,null Yes
delivery.retryable any Yes
delivery.state enum: pending, enqueued, discarded, expired Yes
policy object Yes
policy.allowed_senders array of string Yes
policy.ask_first boolean Yes
policy.computer_restricted boolean Yes The computer-wide sender restriction also applies to this source.
policy.final_answers_available boolean Yes
policy.final_replies array of object Yes
policy.final_replies[].created_at string Yes
policy.final_replies[].delivery_id string Yes
policy.final_replies[].kind enum: automatic, native, null Yes
policy.final_replies[].operation_id string,null Yes
policy.final_replies[].state enum: waiting, pending, running, completed, uncertain, not_sent Yes
policy.held array of object Yes
policy.held[].consent_decision enum: automatic, approved, dismissed Yes
policy.held[].expires_at string Yes
policy.held[].held boolean Yes
policy.held[].id string Yes
policy.held[].operation_id string,null Yes
policy.held[].retryable any Yes
policy.held[].sender string,null Yes
policy.held[].state enum: pending, enqueued, discarded, expired Yes
policy.held[].text string,null Yes
policy.held[].text_omitted boolean Yes
policy.next_cursor string,null Yes
policy.recent_decisions array of object Yes
policy.recent_decisions[].consent_decision enum: automatic, approved, dismissed Yes
policy.recent_decisions[].final_reply object or null Yes
policy.recent_decisions[].held boolean Yes
policy.recent_decisions[].id string Yes
policy.recent_decisions[].operation_id string,null Yes
policy.recent_decisions[].retryable any Yes
policy.recent_decisions[].state enum: pending, enqueued, discarded, expired Yes
policy.reply_with_final_answer boolean,null Yes True always forwards a final answer; false disables it. Null uses native replies and the original parent-reporting default for agent-created threads.
policy.restricted boolean Yes
policy.version integer Yes
recovery_message string,null Yes

update

PUT /api/v1/organizations/{organization_id}/agents/{id}/spark/local_threads/{local_thread_id}/deliveries/{delivery_id}

Operation ID: put_api_v1_organizations_organization_id_agents_id_spark_local_threads_local_thread_id_deliveries_delivery_id_.

Authentication: bearer token (bearerAuth).

Parameters

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

Request body

application/json

Property Type Required Description
decision enum: approve, dismiss Yes
expected_version integer Yes

Responses

application/json

Property Type Required Description
delivery object Yes
delivery.consent_decision enum: automatic, approved, dismissed Yes
delivery.final_reply object or null Yes
delivery.held boolean Yes
delivery.id string Yes
delivery.operation_id string,null Yes
delivery.retryable any Yes
delivery.state enum: pending, enqueued, discarded, expired Yes
policy object No
policy.allowed_senders array of string Yes
policy.ask_first boolean Yes
policy.computer_restricted boolean Yes The computer-wide sender restriction also applies to this source.
policy.final_answers_available boolean Yes
policy.final_replies array of object Yes
policy.final_replies[].created_at string Yes
policy.final_replies[].delivery_id string Yes
policy.final_replies[].kind enum: automatic, native, null Yes
policy.final_replies[].operation_id string,null Yes
policy.final_replies[].state enum: waiting, pending, running, completed, uncertain, not_sent Yes
policy.held array of object Yes
policy.held[].consent_decision enum: automatic, approved, dismissed Yes
policy.held[].expires_at string Yes
policy.held[].held boolean Yes
policy.held[].id string Yes
policy.held[].operation_id string,null Yes
policy.held[].retryable any Yes
policy.held[].sender string,null Yes
policy.held[].state enum: pending, enqueued, discarded, expired Yes
policy.held[].text string,null Yes
policy.held[].text_omitted boolean Yes
policy.next_cursor string,null Yes
policy.recent_decisions array of object Yes
policy.recent_decisions[].consent_decision enum: automatic, approved, dismissed Yes
policy.recent_decisions[].final_reply object or null Yes
policy.recent_decisions[].held boolean Yes
policy.recent_decisions[].id string Yes
policy.recent_decisions[].operation_id string,null Yes
policy.recent_decisions[].retryable any Yes
policy.recent_decisions[].state enum: pending, enqueued, discarded, expired Yes
policy.reply_with_final_answer boolean,null Yes True always forwards a final answer; false disables it. Null uses native replies and the original parent-reporting default for agent-created threads.
policy.restricted boolean Yes
policy.version integer Yes