Skip to main content

rejectSpawnRequest

client.swarm.rejectSpawnRequest(swarmId: string, requestId: string, data?: SpawnRequestActionBody): Promise<void>

Reject a spawn request.

Rejects a pending spawn request, preventing the creation of new agent instances. The request will be marked as rejected and no agents will be spawned.

Parameters

ParameterTypeRequiredDescription
swarmIdstringYesThe unique identifier of the swarm
requestIdstringYesThe unique identifier of the spawn request
dataSpawnRequestActionBodyNoOptional rejection information

Returns

Promise<void> — A promise that resolves when the request is rejected

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.swarm.rejectSpawnRequest('swarmId', 'requestId');
console.log(result);