Skip to main content

ActionPlans API

Action Plans API

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

const client = new CodeBoltClient();

Quick Reference

MethodDescription
addTaskAdds a task to an existing action plan.
createCreates a new action plan.
deleteDeletes an action plan.
getRetrieves a specific action plan by its ID.
listRetrieves all action plans.
updateUpdates an existing action plan.

Methods


addTask

client.actionPlans.addTask(planId: string, data: AddActionPlanTaskRequest): Promise<unknown>

Adds a task to an existing action plan.

Appends a new task to the plan's task list. Tasks represent individual steps that need to be completed as part of the overall plan.

ParameterTypeRequiredDescription
planIdstringYesThe unique identifier of the action plan
dataAddActionPlanTaskRequestYesThe task definition to add to the plan

Returns: Promise<unknown> — A promise that resolves when the task has been added

Full reference →


create

client.actionPlans.create(data: CreateActionPlanRequest): Promise<ActionPlan>

Creates a new action plan.

Defines a new structured workflow plan that can be populated with tasks and executed by agents.

ParameterTypeRequiredDescription
dataCreateActionPlanRequestYesThe creation payload for the new action plan

Returns: Promise<ActionPlan> — A promise that resolves to the newly created ActionPlan

Full reference →


delete

client.actionPlans.delete(planId: string): Promise<unknown>

Deletes an action plan.

Permanently removes the specified action plan and all its associated tasks.

ParameterTypeRequiredDescription
planIdstringYesThe unique identifier of the action plan to delete

Returns: Promise<unknown> — A promise that resolves when the plan has been deleted

Full reference →


get

client.actionPlans.get(planId: string): Promise<ActionPlan>

Retrieves a specific action plan by its ID.

Returns the full action plan including its tasks, status, and metadata.

ParameterTypeRequiredDescription
planIdstringYesThe unique identifier of the action plan

Returns: Promise<ActionPlan> — A promise that resolves to the ActionPlan object

Full reference →


list

client.actionPlans.list(params?: Record<string, unknown>): Promise<ActionPlan[]>

Retrieves all action plans.

Returns every action plan in the system. Use optional query parameters to paginate or filter the results.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering or pagination

Returns: Promise<ActionPlan[]> — A promise that resolves to an array of ActionPlan objects

Full reference →


update

client.actionPlans.update(planId: string, data: UpdateActionPlanRequest): Promise<ActionPlan>

Updates an existing action plan.

Modifies the properties of an action plan such as its name, description, or status.

ParameterTypeRequiredDescription
planIdstringYesThe unique identifier of the action plan to update
dataUpdateActionPlanRequestYesThe fields to update on the action plan

Returns: Promise<ActionPlan> — A promise that resolves to the updated ActionPlan

Full reference →