Skip to main content
BlueAI
Home/CRM/Contacts

Contacts

Manage contact information for partner companies.

|

Endpoints

GET/api/v1/crm/contactsList contacts
GET/api/v1/crm/contacts/{id}Get contact details
POST/api/v1/crm/contactsCreate a contact
PATCH/api/v1/crm/contacts/{id}Update a contact
DELETE/api/v1/crm/contacts/{id}Delete a contact
GET/api/v1/crm/contacts

List contacts

Retrieve contacts within the organization with pagination. Supports search by name/email and filtering by company.

Authentication requiredInclude session cookie or Bearer token

Query Parameters

NameTypeRequiredDescription
limit
integerOptionalNumber of items per page (default: 50, max: 200)
offset
integerOptionalNumber of items to skip
search
stringOptionalPartial match search by name or email
company_id
stringOptionalFilter by company ID
sort
stringOptionalSort key (created_at, name)
order
stringOptionalSort order (asc / desc)

Response Fields

NameTypeRequiredDescription
Contact[]OptionalArray of contacts
total
numberOptionalTotal count
limit
numberOptionalItems per page
offset
numberOptionalNumber 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 requiredInclude session cookie or Bearer token

Path Parameters

NameTypeRequiredDescription
id
stringRequiredContact ID

Response Fields

NameTypeRequiredDescription
ContactOptionalContact 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/contacts

Create a contact

Register a new contact.

Authentication requiredInclude session cookie or Bearer token

Request Body

NameTypeRequiredDescription
first_name
stringRequiredFirst name
last_name
stringRequiredLast name
email
stringOptionalEmail address
phone
stringOptionalPhone number
position
stringOptionalPosition
company_id
stringOptionalCompany ID
note
stringOptionalNote

Response Fields

NameTypeRequiredDescription
ContactOptionalCreated 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 requiredInclude session cookie or Bearer token

Path Parameters

NameTypeRequiredDescription
id
stringRequiredContact ID

Request Body

NameTypeRequiredDescription
first_name
stringOptionalFirst name
last_name
stringOptionalLast name
email
stringOptionalEmail address
phone
stringOptionalPhone number
position
stringOptionalPosition
company_id
stringOptionalCompany ID
note
stringOptionalNote

Response Fields

NameTypeRequiredDescription
ContactOptionalUpdated 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 requiredInclude session cookie or Bearer token

Path Parameters

NameTypeRequiredDescription
id
stringRequiredContact ID

Response Fields

NameTypeRequiredDescription
success
booleanOptionalDeletion 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
}