Skip to main content

Fergus API & Personal Access Tokens (PATs)

Use the Fergus Open API to connect Fergus with external systems like CRMs, reporting tools, and automation platforms. To securely access the API, you'll need a Personal Access Token (PAT).

Written by Alyssa Smith
Updated this week

What is a Personal Access Token?

A Personal Access Token (PAT) is a secure key that allows external systems to connect to your Fergus Account.

Instead of using your login details, the token is used to authenticate API requests.

  • Each token is linked to a specific user and company

  • Any actions performed using the token are attributed to that user

  • Tokens allow external systems to read and write data in Fergus

When should I use a PAT?

PATs are used when connecting Fergus to other tools or building custom integrations.

Common use cases include:

  • Connecting CRMs to business systems

  • Automating workflows (e.g. Zapier, Make, Power Automate)

  • Building custom reports or dashboards

  • Creating internal tools

  • Developing integrations with the Fergus API.

Permissions

Only Admin and Full Users can generate and manage PATs.

How to generate a PAT

  1. Go to Settings ⚙️ → Integrations

  2. Select Fergus API

  3. Click Generate PAT

  4. Copy your token and store it securely.

Important⚠️: The token is only shown once. If you lose it, you will need to generate a new one.

Managing Your Tokens

You can manage all tokens from the Fergus API page

Click the three-dot menu to:

  • Edit a token name

  • Refresh a token (tokens expire after 365 days)

  • Delete a token

Important Notes ⚠️

  • One token per user - Each user can only have one active token

  • User-based access - Tokens use the same permissions as the user

  • Company-specific - Tokens only access data within that company

  • User dependency - If the user is removed or downgraded, the token is disabled

Using your PAT

The Fergus Open API documentation is available at: https://api.fergus.com/docs

Authentication Headers

When making requests to the Fergus Open API, include the following headers:

Header

Description

Authorisation: Bearer

Your Personal Access Token Value

Example Request

GET /api/endpoint HTTP/1.1

Host: api.fergus.com

Authorization: Bearer your-personal-access-token

If any of these headers are missing or invalid, the API will return a 401 Unauthorised response.

Security Best Practices

  • Store your token securely

Use a password manager or encrypted secrets vault. Avoid saving tokens in plain text files, emails or shared documents.

  • Do not share your token

Your PAT is linked to your user account. Any actions performed using it are attributed to you.

  • Avoid exposing tokens in code

If you are a developer, use environment variables or a secrets manager to store your PAT. Never hard-code it into application code or commit it to Git.

  • Refresh tokens before they expire

Tokens expire after 365 days. Refresh them in advance to avoid interruptions to your integrations.

  • Delete tokens you no longer use

Removing unused tokens reduces security risk.

  • Rotate tokens if compromised

If you suspect a token has been exposed, delete it immediately and generate a new one.

  • Review active tokens regularly

Check which tokens are active in your Fergus API settings to ensure they are still required.

  • User access affects tokens

If a user is removed or downgraded, their token will be automatically disabled.

Common Issues and FAQs

"A token is already created for this user"

Each user can only have one active PAT. If you need a fresh token, delete the existing one first, then generate a new one.

"I closed the modal and didn't copy the token"

The token is only displayed once at the time of creation. You will need to delete the token and generate a new one.

"My token has expired"

Go to the Fergus API integration page and click "Refresh token" from the actions menu. This will extend the expiry by 365 days. If the token is already expired, refreshing it will reactivate it.

"I don't see the Generate PAT button"

You may not have the required permissions. Only Admin and Full User roles can manage PATs. Contact your Fergus Account administrator to request access or have them generate a token on your behalf.

"My integration stopped working after a team member left"

If the user who generated the PAT has been deactivated or removed from the organisation, their token is automatically disabled. Another eligible user will need to generate a new token and update the integration configuration.

"Can I have multiple tokens for different integrations?"

Currently, each user is limited to one PAT. If you need tokens for multiple integrations, different eligible users can each generate their own token.

"Where can I find the Fergus API documentation?"

The full Fergus Open API documentation is available at https://api.fergus.com/docs

Did this answer your question?