Keys API
API keys of the project, and the calling key itself.
4 operations. Guide: Create and manage API keys, Send your first email. Requests and responses are JSON with snake_case fields; authenticate with Authorization: Bearer <api key>. The examples assume a client built as in SDKs and the command line.
List API keys of the project
GET /v1/keys
Active keys of the calling key's environment, newest first. Never the keys themselves.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Default 20. |
after | query | string | no | A UUID. |
before | query | string | no | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
object | "list" | yes | |
data | array of Key | yes | |
data[]. | string | yes | A UUID. |
data[]. | "key" | yes | |
data[]. | string | yes | A UUID. |
data[]. | string | yes | A UUID. |
data[]. | string | yes | |
data[]. | one of "live", "test" | yes | |
data[]. | one of "full_access", "sending_access", "inbound_read" | yes | |
data[]. | string or null | yes | A UUID. |
data[]. | integer | yes | |
data[]. | string | yes | |
data[]. | string | no | |
data[]. | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
data[]. | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
has_more | boolean | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/keys \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.keys.list();minket api listKeysfrom minket.api.keys import list_keys
result = list_keys.sync(client=client)res, err := client.ListKeysWithResponse(ctx, &minket.ListKeysParams{})Create an API key
POST /v1/keys
The token is returned once. Needs a live full-access key; the new key stays in its environment, with the same domain restriction and a rate limit no higher.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | 1 to 100 characters. |
environment_id | string | yes | A UUID. |
mode | one of "live", "test" | yes | |
scope | one of "full_access", "sending_access", "inbound_read" | no | Default "full_access". |
domain_id | string or null | no | A UUID. |
rate_limit_per_second | integer | no | 1 to 100. |
Response
201 Created; `token` is returned once: Key.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "key" | yes | |
project_id | string | yes | A UUID. |
environment_id | string | yes | A UUID. |
name | string | yes | |
mode | one of "live", "test" | yes | |
scope | one of "full_access", "sending_access", "inbound_read" | yes | |
domain_id | string or null | yes | A UUID. |
rate_limit_per_second | integer | yes | |
display | string | yes | |
token | string | no | |
last_used_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
created_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
revoked_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X POST https://api.minket.com/v1/keys \
-H "Authorization: Bearer $MINKET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"backend","environment_id":"019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b","mode":"live","scope":"sending_access"}'const result = await minket.keys.create({
name: "backend",
environment_id: "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b",
mode: "live",
scope: "sending_access"
});minket api createKey --body '{"name":"backend","environment_id":"019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b","mode":"live","scope":"sending_access"}'from minket.api.keys import create_key
from minket.models import CreateKeyBody
result = create_key.sync(client=client, body=CreateKeyBody.from_dict({"name":"backend","environment_id":"019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b","mode":"live","scope":"sending_access"}))var body minket.CreateKeyJSONRequestBody
res, err := client.CreateKeyWithResponse(ctx, body)Describe the key making the request
GET /v1/keys/current
The project, environment, mode and scope of the calling key. Every scope may call this.
Response
200 Success: Key.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "key" | yes | |
project_id | string | yes | A UUID. |
environment_id | string | yes | A UUID. |
name | string | yes | |
mode | one of "live", "test" | yes | |
scope | one of "full_access", "sending_access", "inbound_read" | yes | |
domain_id | string or null | yes | A UUID. |
rate_limit_per_second | integer | yes | |
display | string | yes | |
token | string | no | |
last_used_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
created_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
revoked_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/keys/current \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.keys.current();minket api getCurrentKeyfrom minket.api.keys import get_current_key
result = get_current_key.sync(client=client)res, err := client.GetCurrentKeyWithResponse(ctx)Revoke an API key
DELETE /v1/keys/{id}
Revokes a key of the calling key's environment; its next request is refused.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "key" | yes | |
revoked_at | string (date-time) or null | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X DELETE https://api.minket.com/v1/keys/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.keys.revoke("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api revokeKey 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.keys import revoke_key
result = revoke_key.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.RevokeKeyWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")