コンタクトを更新
開発者は、APIを使用してコンタクト情報を更新できます。
リクエストメソッド
PATCH
リクエストURL
https://livedesk-api.engagelab.com/api/v2/accounts/contacts/:id
認証
詳細については、API概要で説明している認証方法を参照してください。
リクエスト
コンタクト更新のリクエスト例
curl -X PATCH https://livedesk-api.engagelab.com/api/v2/accounts/contacts/:id \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
-d '{
"additional_attributes": {
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles": {
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"last_activity_at": 1765441908,
"custom_attributes": {
// オプション: カスタムフィールドをマージして更新します(差分マージ)
"vip_level": "platinum"
},
"created_at": 1765441895,
"first_name": "support",
"last_name": ""
}'
curl -X PATCH https://livedesk-api.engagelab.com/api/v2/accounts/contacts/:id \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
-d '{
"additional_attributes": {
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles": {
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"last_activity_at": 1765441908,
"custom_attributes": {
// オプション: カスタムフィールドをマージして更新します(差分マージ)
"vip_level": "platinum"
},
"created_at": 1765441895,
"first_name": "support",
"last_name": ""
}'
このコードブロックはフローティングウィンドウ内に表示されます
リクエストヘッダー
| Field | Type | Description |
|---|---|---|
| Authorization | string | 認証には Authorization: Basic base64(API Key:API Secret) を使用します。API KeysページでAPI KeyとAPI Secretを取得し、コロンで連結してBase64エンコードします。 |
| Content-Type | application/json | データ形式。通常のテキストメッセージには application/json を使用します。 |
パスパラメータ
| Field | Type | Required | Description |
|---|---|---|---|
| account | integer | Yes | LiveDeskプロジェクトID。 |
| id | integer | Yes | コンタクトID。 |
リクエストボディパラメータ
| Field | Type | Required | Description |
|---|---|---|---|
| additional_attributes | Object | No | 追加属性。 |
| description | String | No | 説明。 |
| company_name | String | No | 会社名。 |
| city | String | No | 市区町村。 |
| telegram | String | No | Telegramの連絡先情報。 |
| country | String | No | 国。 |
| country_code | String | No | 国コード。 |
| social_profiles | Object | No | ソーシャルメディアの連絡先情報。 |
| availability_status | String | No | 対応可能ステータス。デフォルトは offline です。 |
| String | No | メールアドレス。 | |
| name | String | No | 名前。 |
| phone_number | String | No | 電話番号。 |
| blocked | Boolean | No | コンタクトがブロックされているかどうか。デフォルトは false です。 |
| identifier | String | No | コンタクトの一意の外部識別子。インターフェースに表示されるUserIDに対応します。 |
| thumbnail | String | No | コンタクトのアバターURL。 |
| last_activity_at | String | No | 最終アクティビティのタイムスタンプ。 |
| created_at | String | No | 作成タイムスタンプ。 |
| first_name | String | No | コンタクトの名。 |
| last_name | String | No | コンタクトの姓。 |
| custom_attributes | Object | No | カスタムフィールド。 |
レスポンス例
{
"payload": {
"additional_attributes": {
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles": {
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"id": 318763,
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"custom_attributes": {},
"last_activity_at": 1765441908,
"created_at": 1765441895,
"contact_inboxes": [
{
"source_id": "src_001",
"inbox": {
"id": 10,
"name": "Customer Service Channel",
"channel_type": "Channel::Api"
}
}
]
}
}
{
"payload": {
"additional_attributes": {
"description": "",
"company_name": "",
"city": "",
"telegram": "",
"country": "",
"country_code": "",
"social_profiles": {
"facebook": "",
"github": "",
"instagram": "",
"linkedin": "",
"twitter": ""
}
},
"availability_status": "offline",
"email": "support@jiguang.cn",
"id": 318763,
"name": "support",
"phone_number": null,
"blocked": false,
"identifier": "2222",
"thumbnail": "",
"custom_attributes": {},
"last_activity_at": 1765441908,
"created_at": 1765441895,
"contact_inboxes": [
{
"source_id": "src_001",
"inbox": {
"id": 10,
"name": "Customer Service Channel",
"channel_type": "Channel::Api"
}
}
]
}
}
このコードブロックはフローティングウィンドウ内に表示されます
レスポンスパラメータ
| Field | Type | Required | Description |
|---|---|---|---|
| payload | Object | No | 属性構造。 |
| additional_attributes | Object | No | 追加属性。 |
| availability_status | String | No | 対応可能ステータス。デフォルトは offline です。 |
| String | No | メールアドレス。 | |
| id | String | No | コンタクトID。 |
| name | String | No | 名前。 |
| phone_number | String | No | 電話番号。 |
| blocked | Boolean | No | コンタクトがブロックされているかどうか。デフォルトは false です。 |
| identifier | String | No | コンタクトの一意の外部識別子。インターフェースに表示されるUserIDに対応します。 |
| thumbnail | String | No | アバターURL。 |
| custom_attributes | Object | 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 | チャネルタイプ。 |










