POST /v1/api-keys
Keys are account (tenant) resources. By default a key is account-wide; pass senderId to lock it to a single project. The wire form of the secret is <keyPrefix>_<secret> — send it whole as the bearer token.
Body parameters
A label to recognize the key by, shown in the dashboard.
Scope the key to one project. Must be a project in your account. Omit for an account-wide key (callers then name the project per-request with the
X-Drin-Product header).Permission scopes to grant (e.g.
emails:send). Omit for a key with the account’s default permissions.Request
Response
Returns201 Created. The secret field is present only here; every other endpoint returns the key without it. Persist secret before discarding the response.
201 Created
Foreign project. A
senderId that doesn’t belong to your account returns 422 validation_error.