連絡先一覧
開発者は API を通じてアカウント配下の連絡先一覧を取得できます。
リクエストメソッド
GET
リクエスト URL
https://livedesk-api.engagelab.com/api/v2/accounts/contacts
認証
認証方式の詳細については、API 概要 を参照してください。
リクエスト
リクエスト例
curl -X GET https://livedesk-api.engagelab.com/api/v2/accounts/contacts?include_contact_inboxes=false&page=1&sort=last_activity_at&page_size=10 \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
curl -X GET https://livedesk-api.engagelab.com/api/v2/accounts/contacts?include_contact_inboxes=false&page=1&sort=last_activity_at&page_size=10 \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
このコードブロックはフローティングウィンドウ内に表示されます
リクエストヘッダー
| フィールド | 型 | 説明 |
|---|---|---|
| Authorization | string | 認証には Authorization: Basic base64(API Key:API Secret) を使用します。API Key ページで API Key と API Secret を取得し、コロンで連結した後に Base64 エンコードしてください。 |
| Content-Type | application/json | リクエストのデータ形式です。application/json を使用します。 |
クエリパラメータ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| page | integer | いいえ | ページ番号。デフォルトは 1、1 ページあたり 15 件です。 |
| labels | string / string[] | いいえ | ラベルでフィルタリングします。複数ラベルを指定でき、いずれかに一致すれば返されます。 |
| include_contact_inboxes | boolean | いいえ | contact_inboxes を返すかどうか。デフォルトは true です。 |
| sort | string | いいえ | ソート項目です。指定可能な値: email、name、phone_number、last_activity_at、created_at、company、city、country |
| direction | string | いいえ | ソート順。asc または desc を指定します。 |
成功レスポンス
レスポンス例
{
"meta": {
"count": 1,
"current_page": "1"
},
"payload": [
{
"additional_attributes": {
"city": "",
"country": "",
"telegram": "",
"description": "",
"company_name": "",
"country_code": "",
"social_profiles": {
"github": "",
"twitter": "",
"facebook": "",
"linkedin": "",
"instagram": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"id": 318763,
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "4444",
"thumbnail": "",
"custom_attributes": {},
"last_activity_at": 1765441908,
"created_at": 1765441895,
"contact_inboxes": [ // include_contact_inboxes=true の場合に返されます
{
"source_id": "src_001",
"inbox":
{
"id": 10,
"name": "カスタマーサービスチャネル",
"channel_type": "Channel::Api"
}
}
]
}
]
}
{
"meta": {
"count": 1,
"current_page": "1"
},
"payload": [
{
"additional_attributes": {
"city": "",
"country": "",
"telegram": "",
"description": "",
"company_name": "",
"country_code": "",
"social_profiles": {
"github": "",
"twitter": "",
"facebook": "",
"linkedin": "",
"instagram": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"id": 318763,
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "4444",
"thumbnail": "",
"custom_attributes": {},
"last_activity_at": 1765441908,
"created_at": 1765441895,
"contact_inboxes": [ // include_contact_inboxes=true の場合に返されます
{
"source_id": "src_001",
"inbox":
{
"id": 10,
"name": "カスタマーサービスチャネル",
"channel_type": "Channel::Api"
}
}
]
}
]
}
このコードブロックはフローティングウィンドウ内に表示されます
レスポンスパラメータ
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| meta | Object | いいえ | メタデータオブジェクト。 |
| count | Int | いいえ | 検索結果件数。 |
| current_page | Int | いいえ | 現在のページ番号。 |
| payload | Object | いいえ | 属性情報。 |
| additional_attributes | Object | いいえ | 追加属性。 |
| availability_status | String | いいえ | オンライン状態。デフォルトは offline です。 |
| String | いいえ | メールアドレス。 | |
| id | String | いいえ | 連絡先 ID。 |
| name | String | いいえ | 名前。 |
| phone_number | String | いいえ | 電話番号。 |
| blocked | String | いいえ | ブロックされているかどうか。デフォルトは false です。 |
| identifier | String | いいえ | ユーザー識別子。 |
| thumbnail | String | いいえ | サムネイル。 |
| custom_attributes | Object | いいえ | カスタム属性。 |
| created_at | String | いいえ | 作成タイムスタンプ。 |
| last_activity_at | String | いいえ | 最終アクティビティのタイムスタンプ。 |
| created_at | String | いいえ | この連絡先の作成タイムスタンプ。 |
| contact_inboxes | array | include_contact_inboxes=true の場合にのみ返される関連チャネル情報。 |
|
| source_id | String | いいえ | ソース ID。 |
| inbox | Object | いいえ | 受信箱情報。 |
| id | Integer | いいえ | 受信箱 ID。 |
| name | String | いいえ | 受信箱名。 |
| channel_type | String | いいえ | チャネルタイプ。 |
エラーレスポンス
レスポンスパラメータ
| HTTP ステータスコード | 説明 |
|---|---|
| 401 | 未認証。トークンが無効、または不足しています。 |
| 403 | 権限が不足しています。 |










