Skip to main content

API keys and service-account access

An API key lets a script, integration or other automation call Owlie without a browser session. Each key belongs to a service account: an identity of type service account that Owlie creates together with the key. A request made with the key acts as that identity, and the roles assigned to the identity decide what the request can do.

How a key gets its access​

A new service account holds no roles, so a new key can authenticate but isn't allowed to do anything that needs a permission. Assign the service account the roles the automation needs, as you would for a person. See Assign a role.

Owlie checks the service account's current roles on each request. If you change its roles later, you don't need a new key.

Some permissions never work with a key, whatever role the service account holds. Billing, changing people's sign-in, removing identities, and changing sign-in or MFA settings need a signed-in person. The role and permission reference lists them.

A key stops working when it expires, when you revoke it, or when its service account is no longer active.

Create a key​

You need the api_key.modify permission, which Owner and Admin hold.

Owlie shows the key's value once, right after you create it. It stores only a hash of the key, so the value can't be shown again. If you lose it, revoke the key and create another.

  1. Go to Tenant Settings > API Keys and select Create API key.
  2. Enter a Service account name, such as Reporting export. Owlie creates a new service account with this name. You can't attach a key to an existing identity here.
  3. Optionally set Expiration date and time. Leave it empty for a key that never expires.
  4. Select Create API key.
  5. Copy the value under API key and store it in your secret manager, then select Done.

Then assign the service account its roles: go to Directory > Roles, open the role, and add the service account under Members.

Creating a key counts toward two plan limits: API keys, and total identities, because of the new service account. When either limit is reached, Create API key is unavailable and its tooltip explains why. See Usage and limits.

For how to send the key with a request, see the developer quickstart.

Review your keys​

Tenant Settings > API Keys lists every key with its service account, when it was last used (or Never used), when it expires (or Never expires), and its status:

StatusMeaning
ACTIVEThe key works.
EXPIREDThe expiration time passed. Owlie refuses the key.
REVOKEDAn administrator revoked the key. Owlie refuses it. This is permanent.

Viewing the list needs api_key.read, which Owner, Admin and Auditor hold. The secret value is never shown here.

The dashboard's Ahead section includes API keys that expire in the next 30 days.

Rotate a key​

Owlie has no rotate action and no way to change a key's expiration. To rotate, create a new key, move the automation to it, then revoke the old one. Each new key comes with its own new service account, so assign the new account the same roles before you switch.

Revoke a key​

  1. Go to Tenant Settings > API Keys.
  2. Select Revoke beside the key, then Revoke API key to confirm.

Anything using the key loses access immediately, and you can't undo a revocation. Revoking the key doesn't remove its service account, which stays in Directory > Identities with its role assignments.

Creating and revoking a key are recorded in the audit log as api_key.created and api_key.revoked.