Settings API
Mail addresses
URL base https://acme.yet.com.br/api/settings
As descrições dos endpoints estão em inglês.
Get a domain’s addresses
/api/settings/addresses/{domain}Its aliases, its lists and its catch-all.
Quem: Runs the company’s Settings
curl https://acme.yet.com.br/api/settings/addresses/{domain} \
-H "Authorization: Bearer $YET_API_KEY"{
"aliases": [
{
"name": "contato",
"address": "contato@acme.dev",
"account_id": "3c",
"owner": "ana@acme.dev"
}
],
"lists": [
{
"id": "l1",
"name": "team",
"address": "team@acme.dev",
"description": "Everyone",
"recipients": [
"ana@acme.dev"
]
}
],
"catch_all": "ana@acme.dev"
}Add an alias
/api/settings/addresses/{domain}/aliasesAnother address for one of the company’s people, at their own domain.
Quem: Runs the company’s Settings
Corpo
account_idstringobrigatório- The person’s id.
namestringobrigatório- The address before the @.
curl -X POST https://acme.yet.com.br/api/settings/addresses/{domain}/aliases \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"account_id": "3c",
"name": "contato"
}'Remove an alias
/api/settings/addresses/{domain}/aliasesThe same body as adding it.
Quem: Runs the company’s Settings
curl -X DELETE https://acme.yet.com.br/api/settings/addresses/{domain}/aliases \
-H "Authorization: Bearer $YET_API_KEY"Set the catch-all
/api/settings/addresses/{domain}/catch-allWhere mail to addresses that do not exist goes; null turns it off, and it bounces.
Quem: Runs the company’s Settings
Corpo
addressstring | nullobrigatório- Where it goes.
curl -X PUT https://acme.yet.com.br/api/settings/addresses/{domain}/catch-all \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"address": "ana@acme.dev"
}'Create a list
/api/settings/addresses/{domain}/listsOne address that delivers to several. Answers with the list, its id among it.
Quem: Runs the company’s Settings
Corpo
namestringobrigatório- The address before the @.
descriptionstring- What it is for.
recipientsstring[]- Who receives it.
curl -X POST https://acme.yet.com.br/api/settings/addresses/{domain}/lists \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"name": "team",
"recipients": [
"ana@acme.dev",
"bruno@acme.dev"
]
}'Get a list
/api/settings/lists/{id}Its address, description and recipients.
Quem: Runs the company’s Settings
curl https://acme.yet.com.br/api/settings/lists/{id} \
-H "Authorization: Bearer $YET_API_KEY"Change a list
/api/settings/lists/{id}Its recipients, whole, and its description.
Quem: Runs the company’s Settings
Corpo
recipientsstring[]obrigatório- Who receives it.
descriptionstring- What it is for.
curl -X PATCH https://acme.yet.com.br/api/settings/lists/{id} \
-H "Authorization: Bearer $YET_API_KEY"Delete a list
/api/settings/lists/{id}Its address stops receiving.
Quem: Runs the company’s Settings
curl -X DELETE https://acme.yet.com.br/api/settings/lists/{id} \
-H "Authorization: Bearer $YET_API_KEY"