The Segment Public API uses API Tokens to authenticate and authorize requests. You can generate tokens by accessing Segment's Workspace settings. See Getting Started for more information.


API Tokens are unique and scoped to the Segment Workspace in which you create them. Tokens identify and authorize actions that users or automations can perform using the Segment Public API.

Note: You must create a separate API Token for each Workspace you want to manage using the Segment Public API.

Permissions and security

Each API Token has an associated identity and a set of permissions. These permissions set forth the actions you can perform in the Workspace.

Workspace Admins and Owners can grant or revoke a specific token's permissions by accessing Segment's Workspace settings.

Authenticating requests

Every request must include a header that contains an API token. Create these headers in the following format:

Authorization: Bearer <your_token_here>

All API requests must be over HTTPS. Plain HTTP calls and calls without authentication will fail.