API

ThreadPreview

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/threads/{thread_id}/previews create Private preview URL

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:

created, err := client.ThreadPreview(nil).Create(map[string]any{"agent_id": "example", "organization_id": "example", "thread_id": "example", "port": 1}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

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

local created, err = client:ThreadPreview():create({ agent_id = "example", organization_id = "example", thread_id = "example", port = 1 })

PHP

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

$created = $client->ThreadPreview()->create(["agent_id" => "example", "organization_id" => "example", "thread_id" => "example", "port" => 1]);

Python

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

created = client.ThreadPreview().create({ "agent_id": "example", "organization_id": "example", "thread_id": "example", "port": 1 })

Ruby

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

created = client.ThreadPreview.create({ "agent_id" => "example", "organization_id" => "example", "thread_id" => "example", "port" => 1 })

TypeScript

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

const created = await client.ThreadPreview().create({ agent_id: "example", organization_id: "example", thread_id: "example", port: 1 })

Fields

Field Type Required Description
expires_at one,string,null Yes Expires At
port integer Yes Port
url string Yes Url

create

POST /api/v1/organizations/{organization_id}/agents/{id}/spark/threads/{thread_id}/previews

Operation ID: post_api_v1_organizations_organization_id_agents_id_spark_threads_thread_id_previews.

Authentication: bearer token (bearerAuth).

Parameters

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

Request body

application/json

Property Type Required Description
port integer Yes

Responses

200: Private preview URL

application/json

Property Type Required Description
expires_at string,null (date-time) Yes
url string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway