連絡先を検索

開発者はこの API を使用して、アカウント配下の連絡先一覧を照会できます。連絡先のメールアドレス、phone_number、名前、識別子による検索をサポートしています。

リクエストメソッド

GET

エンドポイント

https://livedesk-api.engagelab.com/api/v2/accounts/contacts

認証

詳細については、API Overview の認証方式に関する説明を参照してください。

リクエスト

リクエスト例

curl -X GET https://livedesk-api.engagelab.com/api/v2/accounts/contacts?q=support@engagelab.com \ -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?q=support@engagelab.com \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)'

            
このコードブロックはフローティングウィンドウ内に表示されます

リクエストヘッダー

Field Type Description
Authorization string 認証には Authorization: Basic base64(API Key:API Secret) を使用します。API Key ページで API Key と API Secret を取得し、コロンで連結したうえで Base64 エンコードしてください。
Content-Type application/json データ形式。プレーンテキストメッセージには application/json を使用します。

クエリパラメータ

Field Type Required Description
q string No クエリパラメータ。検索対象の連絡先フィールドは emailphone_numbernameidentifier です。
page integer No ページ番号。デフォルトは 1 で、1 ページあたり 15 件です。
labels string / string[] No ラベルでフィルタリングします。複数ラベルをサポートし、いずれかに一致する条件でマッチします。
include_contact_inboxes boolean No contact_inboxes を返すかどうか。デフォルトは true です。
sort string No ソートフィールド。指定可能な値: emailnamephone_numberlast_activity_atcreated_atcompanycitycountry
direction string No ソート方向。asc または desc

レスポンス例

{ "meta": { "count": 1, "current_page": 1 }, "payload": [ { "additional_attributes": { "source_id": "email:ed5c8362-425c-4589-8adb-61a033d8c5fb.support@engagelab.com" }, "availability_status": "offline", "email": "support@engagelab.com", "id": 64464046, "name": "support", "phone_number": null, "blocked": false, "identifier": null, "thumbnail": "", "custom_attributes": {}, "last_activity_at": 1778572024, "created_at": 1778570103, "contact_inboxes": [ { "source_id": "support@engagelab.com", "inbox": { "id": 985, "channel_id": 107, "name": "Email", "channel_type": "Channel::Email", "provider": null } } ] } ] }
              
              {
    "meta": {
        "count": 1,
        "current_page": 1
    },
    "payload": [
        {
            "additional_attributes": {
                "source_id": "email:ed5c8362-425c-4589-8adb-61a033d8c5fb.support@engagelab.com"
            },
            "availability_status": "offline",
            "email": "support@engagelab.com",
            "id": 64464046,
            "name": "support",
            "phone_number": null,
            "blocked": false,
            "identifier": null,
            "thumbnail": "",
            "custom_attributes": {},
            "last_activity_at": 1778572024,
            "created_at": 1778570103,
            "contact_inboxes": [
                {
                    "source_id": "support@engagelab.com",
                    "inbox": {
                        "id": 985,
                        "channel_id": 107,
                        "name": "Email",
                        "channel_type": "Channel::Email",
                        "provider": null
                    }
                }
            ]
        }
    ]
}

            
このコードブロックはフローティングウィンドウ内に表示されます

レスポンスパラメータ

Field Type Required Description
count Int No 検索結果の件数。
current_page Int No 検索結果のページ番号。
payload Object No ペイロード構造。
additional_attributes Object No 追加属性。
availability_status String No オンライン状態。デフォルトは offline です。
email String No メールアドレス。
id String No 連絡先 ID。
name String No 名前。
phone_number String No 携帯電話番号。
blocked String No 連絡先がブロックされているかどうか。デフォルトは false です。
identifier String No 連絡先の外部一意識別子で、画面に表示される UserID に対応します。
thumbnail String No アバター URL。
custom_attributes String No 連絡先属性。
created_at String No 作成タイムスタンプ。
last_activity_at String No 最新更新タイムスタンプ。
contact_inboxes Array No 関連付けられたチャネル情報。include_contact_inboxes=true の場合にのみ返されます。
source_id String No チャネル ID。
inbox Object No チャネル情報。
id String No チャネル ID。
name String No チャネル名。
channel_type String No チャネルタイプ。
provider String No プロバイダー。たとえばチャネルが WhatsApp の場合、対応する値は whatsapp_cloudengagelab_whatsapp、または twilio です。プロバイダーを区別しないチャネルでは、値は null です。
Icon Solid Transparent White Qiyu
お問い合わせ