Settings API
Mail addresses
A domain’s addresses that are not a person: aliases landing in someone’s inbox, lists that deliver to several, and the catch-all.
Base URL https://acme.yet.com.br/api/settings
Settings answer at your company’s own address — acme here — and take a key of someone who runs them.
Get a domain’s addresses
GET
/api/settings/addresses/{domain}Its aliases, its lists and its catch-all.
Who: Runs the company’s Settings
Request
curl https://acme.yet.com.br/api/settings/addresses/{domain} \
-H "Authorization: Bearer $YET_API_KEY"Response · 200
{
"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
POST
/api/settings/addresses/{domain}/aliasesAnother address for one of the company’s people, at their own domain.
Who: Runs the company’s Settings
Body
account_idstringrequired- The person’s id.
namestringrequired- The address before the @.
Request
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
DELETE
/api/settings/addresses/{domain}/aliasesThe same body as adding it.
Who: Runs the company’s Settings
Request
curl -X DELETE https://acme.yet.com.br/api/settings/addresses/{domain}/aliases \
-H "Authorization: Bearer $YET_API_KEY"Set the catch-all
PUT
/api/settings/addresses/{domain}/catch-allWhere mail to addresses that do not exist goes; null turns it off, and it bounces.
Who: Runs the company’s Settings
Body
addressstring | nullrequired- Where it goes.
Request
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
POST
/api/settings/addresses/{domain}/listsOne address that delivers to several. Answers with the list, its id among it.
Who: Runs the company’s Settings
Body
namestringrequired- The address before the @.
descriptionstring- What it is for.
recipientsstring[]- Who receives it.
Request
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
GET
/api/settings/lists/{id}Its address, description and recipients.
Who: Runs the company’s Settings
Request
curl https://acme.yet.com.br/api/settings/lists/{id} \
-H "Authorization: Bearer $YET_API_KEY"Change a list
PATCH
/api/settings/lists/{id}Its recipients, whole, and its description.
Who: Runs the company’s Settings
Body
recipientsstring[]required- Who receives it.
descriptionstring- What it is for.
Request
curl -X PATCH https://acme.yet.com.br/api/settings/lists/{id} \
-H "Authorization: Bearer $YET_API_KEY"Delete a list
DELETE
/api/settings/lists/{id}Its address stops receiving.
Who: Runs the company’s Settings
Request
curl -X DELETE https://acme.yet.com.br/api/settings/lists/{id} \
-H "Authorization: Bearer $YET_API_KEY"