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.

URL base https://acme.yet.com.br/api/settings

Settings respondem no endereço da sua empresa — acme aqui — e aceitam a key de quem administra o Settings.

As descrições dos endpoints estão em inglês.

Get a domain’s addresses

GET/api/settings/addresses/{domain}

Its aliases, its lists and its catch-all.

Quem: Runs the company’s Settings

Requisição
curl https://acme.yet.com.br/api/settings/addresses/{domain} \
  -H "Authorization: Bearer $YET_API_KEY"
Resposta · 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}/aliases

Another 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 @.
Requisição
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}/aliases

The same body as adding it.

Quem: Runs the company’s Settings

Requisição
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-all

Where 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.
Requisição
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}/lists

One 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.
Requisição
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.

Quem: Runs the company’s Settings

Requisição
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.

Quem: Runs the company’s Settings

Corpo

recipientsstring[]obrigatório
Who receives it.
descriptionstring
What it is for.
Requisição
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.

Quem: Runs the company’s Settings

Requisição
curl -X DELETE https://acme.yet.com.br/api/settings/lists/{id} \
  -H "Authorization: Bearer $YET_API_KEY"