Skip to main content
Version: 2.2

API Authentication

MaestroHub provides two mechanisms for authenticating with the platform API programmatically — Personal Access Tokens (PATs) and OAuth2 Clients. Both methods issue standard JWT bearer tokens that can be used with any HTTP client or integration.

Choosing an Authentication Method

CriteriaPersonal Access TokensOAuth2 Clients
Best forAutomation scripts, external system integrations, single-user programmatic accessThird-party applications, service-to-service integrations, multi-user apps
IdentityAlways acts as the user who created the tokenActs as the authorizing user (Authorization Code) or a designated service user (Client Credentials)
SetupCreate from your Profile → Security tabRegister from System Settings → OAuth2 Clients
Grant typesAuthorization Code, Client Credentials, Refresh Token
User consentNot requiredRequired for Authorization Code flow
Secret managementToken shown once at creationClient secret shown once at creation (confidential clients)
Expiration30 days – 1 year (configurable)Access tokens have a configurable TTL; refresh tokens extend the session
RevocationRevoke individual tokens from your profileDisable or delete the client; revoke tokens via the OAuth2 revoke endpoint

How Tokens Are Used

Both methods produce a JWT bearer token. Include it in the Authorization header of your API requests:

Authorization: Bearer <token>

The platform validates the token signature, checks expiration, verifies revocation status, and enforces the scopes embedded in the token.

Organization Context

MaestroHub is a multi-tenant platform. Most API endpoints require an X-Organization-ID header to identify which organization the request targets. Without this header, the API will not be able to resolve the correct tenant context and the request will fail.

Include it alongside the Authorization header in every request:

Authorization: Bearer <token>
X-Organization-ID: <your-organization-id>

Finding Your Organization ID

Navigate to System Management → Organizations. Click the actions menu (⋯) on your organization row and select Copy ID.

Organizations page showing the actions menu with Copy ID option highlighted

Available Scopes

Both Personal Access Tokens and OAuth2 Clients use the same set of scopes to control what the bearer can do. The available scopes depend on your organization's RBAC level:

RBAC LevelBehavior
NoneRBAC is disabled. Tokens have full API access — no scope restrictions apply.
BasicScopes are enforced. Tokens can only perform actions allowed by their granted scopes.
EnterpriseSame as Basic with additional granular scope options.

When RBAC is enabled, the following scopes are available:

GroupScopeDescription
PipelinesReadView pipelines and execution history
WriteCreate, edit, and delete pipelines
ExecuteRun, test, and retry pipeline executions
ModelsReadView data models and field definitions
WriteCreate, edit, and delete models
ConnectorsReadView connections, functions, and configurations
WriteCreate, edit, and delete connections
ExecuteStart, stop, and test connections; execute functions
UNSReadView UNS topics and data
WriteCreate, edit, and delete topics
PublishPublish data to topics
DashboardsReadView dashboards and widgets
WriteCreate, edit, and delete dashboards
OrganizationsReadView organization settings
ManageUpdate settings and manage maintenance mode

OAuth2 Clients additionally support OIDC Scopes (openid, profile, email) for identity information and Custom Scopes for application-specific needs.