第三方邮件服务更新
POST
/api/v2/email/provider
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer token
x-authing-userpool-id
string
用户池 ID
示例值:
59f86b4832eb28071bdd9214
Body 参数application/json
enabled
boolean
可选
provider
string
可选
name
string
可选
logo
string
可选
description
null
可选
fields
array [object {2}]
可选
key
string
必需
value
string | integer
必需
示例
{
"enabled": true,
"provider": "string",
"name": "string",
"logo": "string",
"description": null,
"fields": [
{
"key": "string",
"value": "string"
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://core.authing.cn/api/v2/email/provider' \
--header 'Authorization: Bearer token' \
--header 'x-authing-userpool-id: 59f86b4832eb28071bdd9214' \
--header 'Content-Type: application/json' \
--data-raw '{
"enabled": true,
"provider": "string",
"name": "string",
"logo": "string",
"description": null,
"fields": [
{
"key": "string",
"value": "string"
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
createdAt
string
必需
updatedAt
string
必需
userPoolId
string
必需
enabled
boolean
必需
provider
string
必需
name
string
必需
logo
string
必需
description
null
必需
fields
array [object {2}]
必需
示例
{
"code": 200,
"message": "更新成功",
"data": {
"id": "61c9307ba9e5de5a02f59a06",
"createdAt": "2021-12-27T03:18:19.330Z",
"updatedAt": "2022-01-12T09:25:21.671Z",
"userPoolId": "59f86b4832eb28071bdd9214",
"enabled": true,
"provider": "custom",
"name": "",
"logo": "",
"description": null,
"fields": [
{
"key": "smtp_host",
"value": "http://hhhhh"
},
{
"key": "smtp_port",
"value": 296
}
]
}
}
修改于 2022-01-14 11:59:02