curl --request PUT \
--url https://coreapi.io/api/tenant/sandbox-mail-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedRecipientDomains": [
"firma.example"
]
}
'import requests
url = "https://coreapi.io/api/tenant/sandbox-mail-settings"
payload = { "allowedRecipientDomains": ["firma.example"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowedRecipientDomains: ['firma.example']})
};
fetch('https://coreapi.io/api/tenant/sandbox-mail-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/api/tenant/sandbox-mail-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allowedRecipientDomains' => [
'firma.example'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"allowedRecipientDomains": [
"firma.example"
],
"recipientFilterActive": true
}{
"status": 123,
"type": "ORGANISATION__NOT_FOUND",
"title": "<string>",
"detail": "<string>",
"requestId": "<string>"
}{
"status": 123,
"type": "ORGANISATION__NOT_FOUND",
"title": "<string>",
"detail": "<string>",
"requestId": "<string>"
}{
"status": 422,
"violations": [
{
"propertyPath": "username",
"message": "<string>",
"code": "ORGANISATION__USERNAME_INVALID"
}
],
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"requestId": "<string>"
}Replace the allowed recipient domains of a Sandbox
Replaces the list of domains whose addresses get mail from this Sandbox besides the members of its organisation. Any domain is accepted, such as a domain used only for tests; public mailbox providers are refused. Requires the permission sandbox-mail-settings:write in a signed-in session; API tokens and service accounts are refused. Available in Sandbox environments only.
Needs the token of a person signed in to the app. API tokens of an environment, personal API tokens, OAuth access tokens and service accounts are refused.
curl --request PUT \
--url https://coreapi.io/api/tenant/sandbox-mail-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedRecipientDomains": [
"firma.example"
]
}
'import requests
url = "https://coreapi.io/api/tenant/sandbox-mail-settings"
payload = { "allowedRecipientDomains": ["firma.example"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowedRecipientDomains: ['firma.example']})
};
fetch('https://coreapi.io/api/tenant/sandbox-mail-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://coreapi.io/api/tenant/sandbox-mail-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allowedRecipientDomains' => [
'firma.example'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"allowedRecipientDomains": [
"firma.example"
],
"recipientFilterActive": true
}{
"status": 123,
"type": "ORGANISATION__NOT_FOUND",
"title": "<string>",
"detail": "<string>",
"requestId": "<string>"
}{
"status": 123,
"type": "ORGANISATION__NOT_FOUND",
"title": "<string>",
"detail": "<string>",
"requestId": "<string>"
}{
"status": 422,
"violations": [
{
"propertyPath": "username",
"message": "<string>",
"code": "ORGANISATION__USERNAME_INVALID"
}
],
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"requestId": "<string>"
}Autorisierungen
Header
Body
The recipient domains a Sandbox may mail besides the members of its organisation.
The complete list of allowed domains, at most 20, each a plain domain such as firma.example (no @, no wildcard). Any domain is accepted, such as a domain used only for tests; public mailbox providers are not. Matched exactly: a subdomain needs its own entry. Stored in lower case, internationalised domains in their ASCII form. An empty list removes every domain.
["firma.example"]
Antwort
The stored domains.
Who receives mail from this Sandbox besides the members of its organisation.
War diese Seite hilfreich?