Settings API
Sending, storage, logo
URL base https://acme.yet.com.br/api/settings
As descrições dos endpoints estão em inglês.
Get sending
/api/settings/sendingWhich SES the mail leaves through, and whether Yet’s is open to the company.
Quem: Runs the company’s Settings
curl https://acme.yet.com.br/api/settings/sending \
-H "Authorization: Bearer $YET_API_KEY"{
"sending": "yet",
"ses_allowed": true
}Set sending
/api/settings/sendingyet, Yet’s SES; or own, the company’s, through its AWS account.
Quem: Runs the company’s Settings
Corpo
sending"yet" | "own"obrigatório- Which SES.
curl -X PUT https://acme.yet.com.br/api/settings/sending \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"sending": "own"
}'Get Drive’s bucket
/api/settings/storageIts bucket and folder, or null while Drive keeps the files itself.
Quem: Runs the company’s Settings
curl https://acme.yet.com.br/api/settings/storage \
-H "Authorization: Bearer $YET_API_KEY"{
"storage": {
"bucket": "acme-drive",
"prefix": "files"
}
}Set Drive’s bucket
/api/settings/storageIn the company’s AWS account; written to once, to be sure it works.
Quem: Runs the company’s Settings
Corpo
bucketstringobrigatório- The bucket.
prefixstring- A folder in it.
curl -X PUT https://acme.yet.com.br/api/settings/storage \
-H "Authorization: Bearer $YET_API_KEY"Remove Drive’s bucket
/api/settings/storageIts files stay in it.
Quem: Runs the company’s Settings
curl -X DELETE https://acme.yet.com.br/api/settings/storage \
-H "Authorization: Bearer $YET_API_KEY"Get the logo
/api/settings/logoIts type and bytes, in base64 — or null, Yet’s mark.
Quem: Runs the company’s Settings
curl https://acme.yet.com.br/api/settings/logo \
-H "Authorization: Bearer $YET_API_KEY"{
"logo": {
"content_type": "image/png",
"data": "iVBORw0KGgo…"
}
}Set the logo
/api/settings/logoShown on the sign-in page: PNG, JPEG, WebP, GIF or SVG, up to 256 KB.
Quem: Runs the company’s Settings
Corpo
content_typestringobrigatório- Its type.
datastringobrigatório- Its bytes, in base64.
curl -X PUT https://acme.yet.com.br/api/settings/logo \
-H "Authorization: Bearer $YET_API_KEY"Remove the logo
/api/settings/logoBack to Yet’s mark.
Quem: Runs the company’s Settings
curl -X DELETE https://acme.yet.com.br/api/settings/logo \
-H "Authorization: Bearer $YET_API_KEY"