Light Dark

Functions

create-new-api-key

fn (request: POSTApiKeysRequest): POSTApiKeysResponse

Create a new API key with specified name, permission level, and optional domain restriction.

remove-existing-api-key

fn (request: DELETEApiKeysApiKeyIdRequest): DELETEApiKeysApiKeyIdResponse

Permanently delete an API key. This cannot be undone.

retrieve-list-api-keys

fn (request: GETApiKeysRequest): GETApiKeysResponse

Retrieve all API keys in your Resend account.

Example

keys ::resend::api::keys/retrieve-list-api-keys(::resend::api::keys/GETApiKeysRequest({}))
keys.data // => [{id: "...", name: "Production Key", created_at: "..."}]

Types

ApiKey

ApiKey type {
    id: Str?,
    name: Str?,
    created_at: Str?
}

CreateApiKeyRequest

CreateApiKeyRequest type {
    name: Str,
    permission: "full_access" | "sending_access"?,
    domain_id: Str?
}

CreateApiKeyResponse

CreateApiKeyResponse type {
    id: Str?,
    token: Str?
}

DELETEApiKeysApiKeyIdRequest

DELETEApiKeysApiKeyIdRequest type {
    api-key-id: Str
}

DELETEApiKeysApiKeyIdResponse

DELETEApiKeysApiKeyIdResponse type Map

GETApiKeysRequest

GETApiKeysRequest type Map

GETApiKeysResponse

GETApiKeysResponse type {
    data: Vec?
}

ListApiKeysResponse

ListApiKeysResponse type {
    data: Vec?
}

POSTApiKeysRequest

POSTApiKeysRequest type {
    name: Str,
    permission: "full_access" | "sending_access"?,
    domain_id: Str?
}

POSTApiKeysResponse

POSTApiKeysResponse type {
    id: Str?,
    token: Str?
}