SoulFire LogoSoulFire

Acquire bot control

Acquires exclusive action control for a bot. While the lease is active, action calls must include its token in the X-SoulFire-Control-Token request header.

POST
/v1/instances/{instance_id}/bots/{bot_id}/control:acquire

Acquires exclusive action control for a bot. While the lease is active, action calls must include its token in the X-SoulFire-Control-Token request header.

Authorization

AuthorizationBearer <token>

Preferred API authentication. Use a JWT with the api audience.

In: header

Path Parameters

instance_id*string
Formatuuid
bot_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Exclusive control lease for coordinating multiple SDK clients, scripts, and independent SDK controllers and server tasks against the same bot.

ttlSeconds?integer

Requested lease lifetime. The server clamps this to its configured range.

Formatint64
Range0 <= value <= 4294967295

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/control:acquire" \  -H "Content-Type: application/json" \  -d '{}'
{  "lease": {    "token": "string",    "expiresAt": "2019-08-24T14:15:22Z"  }}

How is this page?