Contacts
Manage contact information for partner companies.
|
Endpoints
| GET | /api/v1/crm/contacts | List contacts |
| GET | /api/v1/crm/contacts/{id} | Get contact details |
| POST | /api/v1/crm/contacts | Create a contact |
| PATCH | /api/v1/crm/contacts/{id} | Update a contact |
| DELETE | /api/v1/crm/contacts/{id} | Delete a contact |
GET
/api/v1/crm/contactsList contacts
Retrieve contacts within the organization with pagination. Supports search by name/email and filtering by company.
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 |
search | string | Optional | Partial match search by name or email |
company_id | string | Optional | Filter by company ID |
sort | string | Optional | Sort key (created_at, name) |
order | string | Optional | Sort order (asc / desc) |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| Contact[] | Optional | Array of contacts | |
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/contacts" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"items": [
{
"id": "cont_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"first_name": "太郎",
"last_name": "山田",
"email": "taro@example.com",
"phone": "090-1234-5678",
"position": "部長",
"company_id": "comp_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"created_at": "2026-01-20T10:00:00Z",
"updated_at": "2026-02-05T16:00:00Z"
}
],
"total": 35,
"limit": 50,
"offset": 0
}GET
/api/v1/crm/contacts/{id}Get contact details
Retrieve detailed information for the specified contact.
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Contact ID |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| Contact | Optional | Contact details |
Code Examples
curl "https://api.blueai.jp/api/v1/crm/contacts/cont_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"contact": {
"id": "cont_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"first_name": "太郎",
"last_name": "山田",
"email": "taro@example.com",
"phone": "090-1234-5678",
"position": "部長",
"company_id": "comp_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"created_at": "2026-01-20T10:00:00Z",
"updated_at": "2026-02-05T16:00:00Z"
}
}POST
/api/v1/crm/contactsCreate a contact
Register a new contact.
Authentication required— Include session cookie or Bearer token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
first_name | string | Required | First name |
last_name | string | Required | Last name |
email | string | Optional | Email address |
phone | string | Optional | Phone number |
position | string | Optional | Position |
company_id | string | Optional | Company ID |
note | string | Optional | Note |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| Contact | Optional | Created contact |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/crm/contacts" \
-H "Cookie: better-auth.session_token=<token>" \
-H "Content-Type: application/json" \
-d '{
"first_name": "太郎",
"last_name": "山田",
"email": "taro@example.com",
"phone": "090-1234-5678",
"position": "部長",
"company_id": "comp_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}'Response Example
{
"contact": {
"id": "cont_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"first_name": "太郎",
"last_name": "山田",
"email": "taro@example.com",
"phone": "090-1234-5678",
"position": "部長",
"company_id": "comp_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"created_at": "2026-01-20T10:00:00Z",
"updated_at": "2026-02-05T16:00:00Z"
}
}PATCH
/api/v1/crm/contacts/{id}Update a contact
Update information for the specified contact.
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Contact ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
first_name | string | Optional | First name |
last_name | string | Optional | Last name |
email | string | Optional | Email address |
phone | string | Optional | Phone number |
position | string | Optional | Position |
company_id | string | Optional | Company ID |
note | string | Optional | Note |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
| Contact | Optional | Updated contact |
Code Examples
curl -X PATCH "https://api.blueai.jp/api/v1/crm/contacts/cont_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>" \
-H "Content-Type: application/json" \
-d '{
"email": "taro.yamada@newdomain.com",
"position": "本部長"
}'Response Example
{
"contact": {
"id": "cont_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"first_name": "太郎",
"last_name": "山田",
"email": "taro.yamada@newdomain.com",
"phone": "090-1234-5678",
"position": "本部長",
"company_id": "comp_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"created_at": "2026-01-20T10:00:00Z",
"updated_at": "2026-02-05T16:00:00Z"
}
}DELETE
/api/v1/crm/contacts/{id}Delete a contact
Delete the specified contact.
Authentication required— Include session cookie or Bearer token
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Required | Contact 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/contacts/cont_123e4567e89b12d3a456426614174000" \
-H "Cookie: better-auth.session_token=<token>"Response Example
{
"success": true
}