API keys. Input maps are sent as given: name, permission
(:full_access, the default, or :sending_access) and domain_id
(restrict a sending key to one domain).
{:ok, key} = MillionSend.ApiKeys.create(%{name: "ci", permission: :sending_access})
key.token
Summary
Functions
POST /api-keys — the response carries the one-time token.
GET /api-keys — accepts limit:, after:, before:.
DELETE /api-keys/:id
Functions
@spec create(MillionSend.Client.t(), map()) :: {:ok, MillionSend.ApiKeys.ApiKey.t()} | {:error, MillionSend.Error.t()}
POST /api-keys — the response carries the one-time token.
GET /api-keys — accepts limit:, after:, before:.
@spec list(MillionSend.Client.t() | keyword()) :: {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}
@spec list( MillionSend.Client.t(), keyword() ) :: {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}
@spec remove(MillionSend.Client.t(), String.t()) :: {:ok, MillionSend.ApiKeys.ApiKey.t()} | {:error, MillionSend.Error.t()}
DELETE /api-keys/:id