Bulk Operations
Bulk stage changes, deletions, and CSV import/export for deals and contacts.
Endpoints
| POST | /api/v1/crm/bulk/deals/update | Bulk update deals |
| POST | /api/v1/crm/bulk/deals/delete | Bulk delete deals |
| POST | /api/v1/crm/bulk/contacts/import | Import contacts from CSV |
| GET | /api/v1/crm/bulk/deals/export | Export deals to CSV |
| GET | /api/v1/crm/bulk/contacts/export | Export contacts to CSV |
| GET | /api/v1/crm/bulk/companies/export | Export companies to CSV |
/api/v1/crm/bulk/deals/updateBulk update deals
Bulk update stage and owner for multiple deals. Processes up to 100 deals at a time.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | Required | Array of deal IDs to update (max 100) |
stage | string | Optional | Target stage |
assigned_member_id | string | Optional | Target assigned member ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
processed | number | Optional | Number of successfully processed items |
errors | string[] | Optional | Array 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": []
}/api/v1/crm/bulk/deals/deleteBulk delete deals
Bulk delete multiple deals. Processes up to 100 deals at a time.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
ids | string[] | Required | Array of deal IDs to delete (max 100) |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
processed | number | Optional | Number of successfully processed items |
errors | string[] | Optional | Array 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": []
}/api/v1/crm/bulk/contacts/importImport 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.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
file | file | Required | CSV file (multipart/form-data) |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
processed | number | Optional | Number of successfully imported items |
errors | string[] | Optional | Array 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>"/api/v1/crm/bulk/deals/exportExport 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
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
(CSV) | text/csv | Optional | CSV 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>"/api/v1/crm/bulk/contacts/exportExport contacts to CSV
Download all contacts as a CSV file. Columns: id, company_id, name, email, phone, position, notes, created_at, updated_at
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
(CSV) | text/csv | Optional | CSV 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>"/api/v1/crm/bulk/companies/exportExport 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
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
(CSV) | text/csv | Optional | CSV 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>"