Account
Key's account
GET
/api/v1/mehttps://tenka.app.br/api/v1/meReturns the account the key sees. It is the call to test a key and learn the account identifier.
Key scope
Any key of the account (read is enough).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | yes | Bearer followed by the key. Alternative: X-API-Key header. |
Response fields
| Name | Type | Description |
|---|---|---|
tenant | integer | Account identifier. |
nome | string | Name. |
cnpj | string | Account CNPJ. |
plano | string | Subscribed plan. |
api | string | API version that answered. |
Status codes
| HTTP | Description |
|---|---|
| 200 | OK |
| 401 | Missing or invalid key |
Error messages
| HTTP | Message (erro field) | When it happens |
|---|---|---|
| 401 | chave de API ausente ou inválida | No key header, revoked key or typo. |
| 401 | chave sem empresa vinculada | The key exists but is not linked to an account. Create another one in Settings › API. |
| 403 | conta de demonstração: a API pública está desligada na vitrine | The call reached the demo account, where the public API is turned off. |
| 403 | identidade da chave de API irregular | The account refuses keys with irregular identity (deactivated person or ownerless key). The body brings motivo and comoResolver. |
| 429 | limite de requisições excedido (120/min) | The key went over its per-minute limit. Wait for Retry-After. |
| 200, with erro in the body | não foi possível carregar o tenant | The account could not be read. Comes with status 200. |