GET /api/teams/{teamId}/mail/api-keys/
Lista chaves do team (ativas + revogadas)
- Access: Team admin
- Service:
https://mail-api.axuz.net
Accepted authentication
sessionCookie— Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.bearerSession— JWT de acesso da sessão em `Authorization: Bearer`.
— GET /api/teams/:teamId/mail/api-keys. Lista TODAS as chaves do team (ativas e revogadas), ordenadas por criação decrescente. Chamado pela UI de admin do team. Não paginado (volume baixo — chaves por team em ordem de unidades).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes |
Responses
200
Coleção ordenada por created_at DESC
| Name | Type | Required | Description |
|---|---|---|---|
items | array<MailApiKeyListItem> | no | |
items[].id | string<uuid> | yes | |
items[].name | string | yes | |
items[].key_prefix | string | yes | 8 primeiros chars do plaintext (para display). |
items[].scopes | array<string> | yes | |
items[].rate_limit_per_min | integer | yes | |
items[].allowed_from_addresses | array<string<email>> | no | |
items[].enabled | boolean | yes | |
items[].last_used_at | string<date-time> | null | no | |
items[].created_at | string<date-time> | yes | |
items[].revoked_at | string<date-time> | null | no |
401
Sem credencial valida
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Não é owner/admin do team
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X GET 'https://mail-api.axuz.net/api/teams/TEAM_ID/mail/api-keys/' \
-H "Authorization: Bearer $AXUZ_TOKEN"Node.js
const res = await fetch("https://mail-api.axuz.net/api/teams/TEAM_ID/mail/api-keys/", {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"GET",
"https://mail-api.axuz.net/api/teams/TEAM_ID/mail/api-keys/",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())