Activities
Record activities (notes, calls, emails, etc.) associated with deals and contacts.
|
Endpoints
| GET | /api/v1/crm/activities | List activities |
| POST | /api/v1/crm/activities | Create an activity |
| PATCH | /api/v1/crm/activities/{id} | Update an activity |
| DELETE | /api/v1/crm/activities/{id} | Delete an activity |
GET
/api/v1/crm/activitiesList activities
Retrieve activities within the organization with pagination. Supports filtering by activity type, deal, and contact.
Authentication required— Include session cookie or Bearer token
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | Optional | Number of items per page (default: 50, max: 200) |
offset | integer | Optional | Number of items to skip |
type | string | Optional | Filter by activity type (note, call, email, meeting) |
deal_id | string | Optional | Filter by deal ID |
contact_id | string | Optional | Filter by contact ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| Activity[] | Optional | Array of activities | |
total | number | Optional | Total count |
limit | number | Optional | Items per page |
offset | number | Optional | Number of items skipped |
Code Examples
curl "https://api.blueai.jp/api/v1/crm/activities" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"items": [
{
"id": "act_cccccccccccccccccccccccccccccccc",
"type": "note",
"content": "初回ヒアリング実施。予算感は1000万円前後。",
"deal_id": "deal_11111111111111111111111111111111",
"contact_id": null,
"created_by": "usr_99999999999999999999999999999999",
"created_at": "2026-02-10T14:30:00Z"
}
],
"total": 12,
"limit": 50,
"offset": 0
}POST
/api/v1/crm/activitiesCreate an activity
Record an activity associated with a deal or contact. Types include note, call, email, and meeting.
Authentication required— Include session cookie or Bearer token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Required | Activity type (note, call, email, meeting) |
content | string | Required | Activity content |
deal_id | string | Optional | Associated deal ID |
contact_id | string | Optional | Associated contact ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| Activity | Optional | Created activity |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/crm/activities" \
-H "Cookie: better-auth.session_token=<token>" \
-H "Content-Type: application/json" \
-d '{
"type": "note",
"content": "初回ヒアリング実施。予算感は1000万円前後。",
"deal_id": "deal_11111111111111111111111111111111"
}'Response Example
{
"activity": {
"id": "act_cccccccccccccccccccccccccccccccc",
"type": "note",
"content": "初回ヒアリング実施。予算感は1000万円前後。",
"deal_id": "deal_11111111111111111111111111111111",
"contact_id": null,
"created_by": "usr_99999999999999999999999999999999",
"created_at": "2026-02-10T14:30:00Z"
}
}PATCH
/api/v1/crm/activities/{id}Update an activity
Update the specified activity. Only submitted fields are updated.
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Activity ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Optional | Activity type (note, call, email, meeting) |
content | string | Optional | Activity content |
deal_id | string | Optional | Associated deal ID |
contact_id | string | Optional | Associated contact ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| Activity | Optional | Updated activity |
Code Examples
curl -X PATCH "https://api.blueai.jp/api/v1/crm/activities/act_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>" \
-H "Content-Type: application/json" \
-d '{
"content": "初回ヒアリング実施。予算感は1500万円に上方修正。"
}'Response Example
{
"activity": {
"id": "act_cccccccccccccccccccccccccccccccc",
"type": "note",
"content": "初回ヒアリング実施。予算感は1500万円に上方修正。",
"deal_id": "deal_11111111111111111111111111111111",
"contact_id": null,
"created_by": "usr_99999999999999999999999999999999",
"created_at": "2026-02-10T14:30:00Z"
}
}DELETE
/api/v1/crm/activities/{id}Delete an activity
Delete the specified activity.
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Activity ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
success | boolean | Optional | Deletion success flag |
Code Examples
curl -X DELETE "https://api.blueai.jp/api/v1/crm/activities/act_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"success": true
}