Skip to main content
BlueAI
Home/CRM/Bulk Operations

Bulk Operations

Bulk stage changes, deletions, and CSV import/export for deals and contacts.

|

Endpoints

POST/api/v1/crm/bulk/deals/updateBulk update deals
POST/api/v1/crm/bulk/deals/deleteBulk delete deals
POST/api/v1/crm/bulk/contacts/importImport contacts from CSV
GET/api/v1/crm/bulk/deals/exportExport deals to CSV
GET/api/v1/crm/bulk/contacts/exportExport contacts to CSV
GET/api/v1/crm/bulk/companies/exportExport companies to CSV
POST/api/v1/crm/bulk/deals/update

Bulk update deals

Bulk update stage and owner for multiple deals. Processes up to 100 deals at a time.

Authentication requiredInclude session cookie or Bearer token

Request Body

NameTypeRequiredDescription
ids
string[]RequiredArray of deal IDs to update (max 100)
stage
stringOptionalTarget stage
assigned_member_id
stringOptionalTarget assigned member ID

Response Fields

NameTypeRequiredDescription
processed
numberOptionalNumber of successfully processed items
errors
string[]OptionalArray of error messages (if any failures)

Code Examples

curl -X POST "https://api.blueai.jp/api/v1/crm/bulk/deals/update" \
  -H "Cookie: better-auth.session_token=<token>" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "deal_11111111111111111111111111111111",
    "deal_22222222222222222222222222222222",
    "deal_33333333333333333333333333333333"
  ],
  "stage": "proposal",
  "assigned_member_id": "usr_99999999999999999999999999999999"
}'

Response Example

{
  "processed": 3,
  "errors": []
}
POST/api/v1/crm/bulk/deals/delete

Bulk delete deals

Bulk delete multiple deals. Processes up to 100 deals at a time.

Authentication requiredInclude session cookie or Bearer token

Request Body

NameTypeRequiredDescription
ids
string[]RequiredArray of deal IDs to delete (max 100)

Response Fields

NameTypeRequiredDescription
processed
numberOptionalNumber of successfully processed items
errors
string[]OptionalArray of error messages

Code Examples

curl -X POST "https://api.blueai.jp/api/v1/crm/bulk/deals/delete" \
  -H "Cookie: better-auth.session_token=<token>" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "deal_11111111111111111111111111111111",
    "deal_22222222222222222222222222222222"
  ]
}'

Response Example

{
  "processed": 2,
  "errors": []
}
POST/api/v1/crm/bulk/contacts/import

Import contacts from CSV

Bulk import contacts from a CSV file. CSV headers should map to: first_name, last_name, email, phone, position, company_id, note.

Authentication requiredInclude session cookie or Bearer token

Request Body

NameTypeRequiredDescription
file
fileRequiredCSV file (multipart/form-data)

Response Fields

NameTypeRequiredDescription
processed
numberOptionalNumber of successfully imported items
errors
string[]OptionalArray of error messages

Code Examples

curl -X POST "https://api.blueai.jp/api/v1/crm/bulk/contacts/import" \
  -H "Cookie: better-auth.session_token=<token>"
GET/api/v1/crm/bulk/deals/export

Export deals to CSV

Download all deals as a CSV file. Response is returned as text/csv. Columns: id, name, customer_name, company_id, contact_id, amount, stage, expected_close_date, assigned_member_id, created_at, updated_at

Authentication requiredInclude session cookie or Bearer token

Response Fields

NameTypeRequiredDescription
(CSV)
text/csvOptionalCSV file with UTF-8 BOM

Code Examples

curl "https://api.blueai.jp/api/v1/crm/bulk/deals/export" \
  -H "Cookie: better-auth.session_token=<token>"
GET/api/v1/crm/bulk/contacts/export

Export contacts to CSV

Download all contacts as a CSV file. Columns: id, company_id, name, email, phone, position, notes, created_at, updated_at

Authentication requiredInclude session cookie or Bearer token

Response Fields

NameTypeRequiredDescription
(CSV)
text/csvOptionalCSV file with UTF-8 BOM

Code Examples

curl "https://api.blueai.jp/api/v1/crm/bulk/contacts/export" \
  -H "Cookie: better-auth.session_token=<token>"
GET/api/v1/crm/bulk/companies/export

Export companies to CSV

Download all companies as a CSV file. Columns: id, name, name_kana, department, industry, employee_count, website_url, postal_code, address, phone, email, notes, created_at, updated_at

Authentication requiredInclude session cookie or Bearer token

Response Fields

NameTypeRequiredDescription
(CSV)
text/csvOptionalCSV file with UTF-8 BOM

Code Examples

curl "https://api.blueai.jp/api/v1/crm/bulk/companies/export" \
  -H "Cookie: better-auth.session_token=<token>"