最终用户 API 端点提供对最终用户对象的访问权限。系统会为 Contact Center AI 平台 (CCAI Platform) 的每个最终用户创建一个最终用户对象。
以下是调用 API 端点:
更新最终用户
您可以通过此端点更新最终用户的详细信息,包括:
电子邮件地址
name
电话号码
{
"identifier": "string",
"email": "string",
"name": "string",
"phone": "string"
}
端点:
Method: POST
Type: RAW
URL: https://{subdomain}.{domain}/apps/api/v1/end_users
标头:
| 键 | 值 | 说明 |
|---|---|---|
| Content-Type | application/json | |
| 接受 | application/json |
正文:
{
"identifier": "abc123",
"email": "joe@mydomain.com",
"name": "Joe Smith",
"phone": "+16171231234"
}
请求和响应示例
以下部分提供了向端点发送的请求示例。
最终用户 ID 和标识符
此示例展示了如何通过提供 ID 来更新最终用户。
请求
标头:
| 键 | 值 | 说明 |
|---|---|---|
| Content-Type | application/json |
正文:
{
"identifier": "string",
"email": "string",
"name": "string",
"phone": "string"
}
响应
{
"id": "integer",
"identifier": "string"
}
状态代码: 200
获取最终用户
此端点支持使用 id 或 identifier 检索最终用户。
端点:
Method: GET
Type:
URL: https://{subdomain}.{domain}/apps/api/v1/end_users
标头:
| 键 | 值 | 说明 |
|---|---|---|
| Content-Type | application/json |
查询:
| 键 | 值 | 说明 |
|---|---|---|
| id | 整数 | 最终用户的内部 ID |
| 标识符 | 字符串 | 最终用户的外部标识符 |
请求和响应示例
以下部分提供了向端点发送的请求示例。
按 ID 获取
此示例展示了如何通过提供 ID 来检索最终用户。
请求
标头:
| 键 | 值 | 说明 |
|---|---|---|
| Content-Type | application/json |
查询:
| 键 | 值 | 说明 |
|---|---|---|
| id | 整数 | 最终用户的内部 ID |
响应
{
"id": "integer",
"identifier": "string"
}
状态代码: 200
按标识符获取
此示例展示了如何通过提供标识符来检索最终用户。
请求
标头:
| 键 | 值 | 说明 |
|---|---|---|
| Content-Type | application/json |
查询:
| 键 | 值 | 说明 |
|---|---|---|
| identifier | 字符串 | 最终用户的外部标识符 |
响应
{
"id": "integer",
"identifier": "string"
}
状态代码: 200