Issue a JWT access token for client-side SDKs (Inbox, Preferences, Courier Create). The token is scoped to a specific user and set of permissions.
Scope: The scope field is a space-separated string of permissions. Common patterns: "user_id:user-123 inbox:read:write" for Inbox access, "user_id:user-123 read:preferences write:preferences" for Preferences, "user_id:user-123 tenants:read tenants:notifications:read tenants:notifications:write" for Courier Create.
Expiry: Set expires_in as a duration string (e.g., "2 hours", "30 days"). Tokens cannot be revoked once issued; use short expiries for sensitive scopes. If omitted, the token does not expire.
Generate tokens server-side only. Never expose your API key in client-side code.
Documentation Index
Fetch the complete documentation index at: https://www.courier.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Available scopes:
user_id:<user-id> - Defines which user the token will be scoped to. Multiple can be listed if needed. Ex user_id:pigeon user_id:bluebird.read:messages - Read messages.read:user-tokens - Read user push tokens.write:user-tokens - Write user push tokens.read:brands[:<brand_id>] - Read brands, optionally restricted to a specific brand_id. Examples read:brands, read:brands:my_brand.write:brands[:<brand_id>] - Write brands, optionally restricted to a specific brand_id. Examples write:brands, write:brands:my_brand.inbox:read:messages - Read inbox messages.inbox:write:events - Write inbox events, such as mark message as read.read:preferences - Read user preferences.write:preferences - Write user preferences.
Example: user_id:user123 write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brandsDuration for token expiration. Accepts various time formats: