Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.boostgpt.co/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The CRM API lets you programmatically manage your agent’s built-in CRM — contacts, custom fields, pipelines, deals, and tasks. Use it to sync data from external sources, build automations, or power custom dashboards.
CRM must be enabled on your bot. Configure it in Dashboard → Agent → CRM or via the Bot Management API.

Contacts

List Contacts

const result = await client.fetchContacts({
  bot_id: 'bot_abc123',
  page: 1,
  per_page: 20,
  status: 'lead'   // optional: filter by status key
});
GET /v1/bot/crm/contacts
ParameterTypeRequiredDescription
bot_idstringYesBot ID
pagenumberNoPage number (default: 1)
per_pagenumberNoResults per page (default: 10)
statusstringNoFilter by status key
status_idintegerNoFilter by status ID
status_keystringNoAlias for status

Search Contacts

const result = await client.searchContacts({
  bot_id: 'bot_abc123',
  query: 'john',
  limit: 20
});
GET /v1/bot/crm/contacts/search

Fetch Contact Statuses

Get the list of available contact status labels.
const result = await client.fetchContactStatuses({ bot_id: 'bot_abc123' });
console.log(result.response.statuses);

Create Contact

const result = await client.createContact({
  bot_id: 'bot_abc123',
  email: 'jane@example.com',
  status: 'lead',
  fields: {
    first_name: 'Jane',
    company: 'Acme Corp',
    phone: '+1 555 0100'
  }
});
POST /v1/bot/crm/contacts
ParameterTypeRequiredDescription
bot_idstringYesBot ID
emailstringNoContact email address
statusstringNoStatus key (e.g. lead, customer)
status_idintegerNoStatus ID
fieldsobjectNoKey→value pairs for custom fields

Get a Contact

const result = await client.fetchContact({
  bot_id: 'bot_abc123',
  contact_id: 'con_abc123'
});

Update a Contact

const result = await client.updateContact({
  bot_id: 'bot_abc123',
  contact_id: 'con_abc123',
  status: 'customer',
  fields: { company: 'New Corp' }
});

Delete a Contact

// Soft delete (default)
await client.deleteContact({ bot_id: 'bot_abc123', contact_id: 'con_abc123' });

// Permanent delete
await client.deleteContact({ bot_id: 'bot_abc123', contact_id: 'con_abc123', permanent: true });

Export Contacts

Download all contacts as CSV data.
const result = await client.exportContacts({ bot_id: 'bot_abc123' });

Add a Note

const result = await client.addContactNote({
  bot_id: 'bot_abc123',
  contact_id: 'con_abc123',
  content: 'Called — interested in Pro plan.',
  type: 'note'   // 'note' | 'call' | 'email' | 'meeting'
});

Custom Fields

Define additional fields to store on contacts.

List Fields

const result = await client.fetchCRMFields({ bot_id: 'bot_abc123' });

Create a Field

const result = await client.createCRMField({
  bot_id: 'bot_abc123',
  label: 'Company Size',
  field_type: 'select',
  options: ['1–10', '11–50', '51–200', '200+'],
  is_required: false
});
field_typeDescription
textSingle-line text
numberNumeric value
dateDate picker
selectSingle-choice dropdown
multiselectMulti-choice dropdown
checkboxBoolean toggle
urlURL string

Update a Field

await client.updateCRMField({
  bot_id: 'bot_abc123',
  field_id: 'fld_abc123',
  label: 'Headcount'
});

Delete a Field

await client.deleteCRMField({ bot_id: 'bot_abc123', field_id: 'fld_abc123' });

Setup & Templates

Fetch CRM Setup

Get the current CRM configuration (enabled status, active pipelines, field count).
const result = await client.fetchCRMSetup({ bot_id: 'bot_abc123' });

Fetch Templates

List available pre-built CRM pipeline templates.
const result = await client.fetchCRMTemplates({ bot_id: 'bot_abc123' });

Apply a Template

Bootstrap a new pipeline from a template (e.g. sales, support, recruiting).
const result = await client.applyCRMTemplate({
  bot_id: 'bot_abc123',
  template_key: 'sales',
  name: 'Q3 Sales Pipeline'  // optional custom name
});
ParameterTypeRequiredDescription
bot_idstringYesBot ID
template_keystringYesTemplate identifier (e.g. sales)
replacebooleanNoReplace existing pipeline with template (default: false)
create_newbooleanNoAlways create a new pipeline (default: false)
namestringNoCustom pipeline name

Pipelines

List Pipelines

const result = await client.fetchPipelines({ bot_id: 'bot_abc123' });

Create a Pipeline

const result = await client.createPipeline({
  bot_id: 'bot_abc123',
  name: 'Enterprise Sales',
  default_currency: 'USD'
});

Update a Pipeline

await client.updatePipeline({
  bot_id: 'bot_abc123',
  pipeline_id: 'pipe_abc123',
  name: 'SMB Sales',
  is_default: true
});

Delete a Pipeline

await client.deletePipeline({ bot_id: 'bot_abc123', pipeline_id: 'pipe_abc123' });

Fetch Pipeline Board

Get pipeline stages with deals grouped by stage (Kanban view).
const result = await client.fetchPipelineBoard({
  bot_id: 'bot_abc123',
  pipeline_id: 'pipe_abc123'
});

Pipeline Stages

// Create a stage
await client.createPipelineStage({
  bot_id: 'bot_abc123',
  name: 'Proposal Sent',
  pipeline_id: 'pipe_abc123',
  closed_status: null   // 'won' | 'lost' | null
});

// Update a stage
await client.updatePipelineStage({
  bot_id: 'bot_abc123',
  stage_id: 'stg_abc123',
  closed_status: 'won'
});

// Delete a stage (move existing deals elsewhere first)
await client.deletePipelineStage({
  bot_id: 'bot_abc123',
  stage_id: 'stg_abc123',
  move_deals_to_stage_id: 'stg_xyz789'  // optional
});

Deals

List Deals

const result = await client.fetchDeals({
  bot_id: 'bot_abc123',
  page: 1,
  per_page: 20,
  status: 'open',          // 'open' | 'won' | 'lost'
  pipeline_id: 'pipe_abc123'
});

Create a Deal

const result = await client.createDeal({
  bot_id: 'bot_abc123',
  title: 'Acme Corp — Pro Plan',
  status: 'open'
});

Update a Deal

await client.updateDeal({
  bot_id: 'bot_abc123',
  deal_id: 'deal_abc123',
  status: 'won'
});

Delete a Deal

await client.deleteDeal({ bot_id: 'bot_abc123', deal_id: 'deal_abc123' });

Tasks

List Tasks

const result = await client.fetchTasks({
  bot_id: 'bot_abc123',
  page: 1,
  per_page: 20,
  status: 'todo',   // 'todo' | 'in_progress' | 'done'
  view: 'today'     // optional view filter
});

Create a Task

const result = await client.createTask({
  bot_id: 'bot_abc123',
  title: 'Follow up with Jane',
  status: 'todo',
  priority: 'high'   // 'low' | 'medium' | 'high'
});

Update a Task

await client.updateTask({
  bot_id: 'bot_abc123',
  task_id: 'tsk_abc123',
  status: 'done'
});

Snooze a Task

Defer a task until tomorrow.
await client.snoozeTask({ bot_id: 'bot_abc123', task_id: 'tsk_abc123' });

Delete a Task

await client.deleteTask({ bot_id: 'bot_abc123', task_id: 'tsk_abc123' });

CRM Report

Get aggregated CRM statistics (contact counts by status, deal totals, task summary).
const result = await client.fetchCRMReport({ bot_id: 'bot_abc123' });
console.log(result.response.report);

Next Steps

Email Inbox

Manage inbound emails from contacts

API Reference

Complete method list