Skip to documentation
Dashboard
Guides

Authentication

Authenticate server-side requests with workspace API keys and the smallest required scopes.

On this page

Bearer authentication

Send the API key in the Authorization header on every RouteKite request.

Header
Authorization: `Bearer ${process.env.ROUTEKITE_API_KEY}`

Key scopes

ScopeAllows
email:sendSend email and prepare, complete, or inspect attachments.
email:readList and retrieve transactional messages, events, and message attachments.
template:readList templates and retrieve drafts or immutable versions.
template:writeCreate, update, save, publish, duplicate, or delete templates.
audience:readList contacts, fields, topics, segments, and audience exports.
audience:writeManage contacts, fields, topics, segments, preferences, and audience exports.
campaign:readList campaigns and inspect campaign reports or schedules.
campaign:writeCreate campaigns and select their audience and topic.
campaign:sendSend or schedule campaigns and access campaign reports.
webhook:manageList, create, inspect deliveries for, and delete webhook endpoints.
email:send fallbackA sending key may also read email resources in its workspace.

Store keys safely

  • Keep keys in server environment variables.
  • Never embed keys in browser bundles or public repositories.
  • Use separate keys for applications that need independent access.
  • Remove keys that are no longer used.

Authentication failures

StatusMeaningAction
401The Bearer key is missing or invalid.Check the complete Authorization header.
403The key lacks the required scope.Use a key with the required access.
403The workspace cannot perform the operation.Resolve the workspace notice in RouteKite.
On this page