A service account is a non-human identity that your integrations use to call the Freshdesk API. It does not use an agent seat, cannot sign in to Freshdesk, and is never assigned tickets. This article explains how service accounts work and how to create them, manage their API keys, and rotate keys without downtime.

TABLE OF CONTENTS

Prerequisites

  • Ensure your role has the Manage service accounts privilege, with either Manage personal service accounts or Manage all service accounts selected. You can set this privilege under Admin > Team > Roles. Account Administrators can view and manage all service accounts. Administrators can view and manage only the service accounts they own. On the Enterprise plan, you can use custom roles to let Administrators view all service accounts.
  • Ensure that your plan includes service accounts. Service accounts are available in Freshdesk and Freshdesk Omni on the Growth, Pro, and Enterprise plans.

Overview of service accounts

Integrations such as reporting tools, middleware, and scheduled scripts need an identity to call the Freshdesk API. Before service accounts, that identity was a regular agent. A service account is built for this purpose:

  • No seat: A service account does not use a paid agent seat.
  • No sign-in: A service account cannot sign in to the Freshdesk web or mobile app.
  • No routing: A service account is excluded from ticket routing and cannot be assigned tickets.
  • Independent of people: The integration keeps working when the agent who set it up leaves your organization.
  • Safe key rotation: Each service account can have up to two active API keys, so you can replace a key without downtime.

The following table compares a support agent with a service account.

CapabilitySupport agentService account
Signs in to FreshdeskYesNo
Uses a paid agent seatYesNo
Can be assigned ticketsYesNo
Included in ticket routingYesNo
Active API keysOneUp to two, each with an optional expiry

Note: Roles, ticket scope, and groups work the same way for a service account as they do for an agent. Give a service account only the access its integration needs. API calls made by a service account count toward your account-level API rate limit (requests per minute). A service account can call any API that its role and scope allow. Freshdesk does not restrict API actions for service accounts. The number of service accounts you can create depends on your plan: Growth 5, Pro 15, and Enterprise 50.

Create a service account

To create a service account, follow these steps:

  1. Go to Admin > Agents.
  2. Click the Service Accounts tab, and then click New agent. Agent type is set to Service account.
  3. Enter a Name for the service account, for example, Reporting sync.
  4. (Optional) Add a Description and a photo.
  5. Under Roles, keep Agent or add the roles the integration needs.
  6. Under Scope for ticket visibility, select All tickets or Tickets in a group.
  7. (Optional) Under Add to groups, choose the groups the service account belongs to.
  8. Under API keys, select an Expiry for the first key. The default is 90 days.
  9. Click Create agent. The API key appears on the page.

Important: The full API key is shown only once. Copy it and store it securely before you leave the page. If you lose it, revoke the key permanently and generate a new one, or rotate the key to create a new one.

Rotate an API key

Rotate a key to replace it without downtime. Rotation creates a second key that works alongside the current one, so you can move your integrations over before the old key stops working.

To rotate an API key, follow these steps:

  1. Go to Admin > Agents > Service Accounts.
  2. Click the name of the service account.
  3. Under API keys, click Rotate key.
  4. Select an Expiry for the secondary key. You can choose No expiry, 1 day, 7 days, 30 days, 90 days, 180 days, or a custom date.
  5. Click Create secondary key, and copy the new key. The full key is shown only once. If you lose it, revoke the secondary key and start the rotation again.
  6. Update your integration to use the secondary key and confirm that it works.
  7. Click Finish key rotation, and then click Finish rotation to confirm.

The secondary key becomes the primary key, and the old key stops working immediately. Make sure all services have moved to the new key before you finish the rotation.

Note: While a secondary key exists, you cannot rotate again or revoke the primary key. Finish the rotation, or revoke the secondary key, first. You can also create and rotate API keys programmatically. For details, see Service accounts in the Freshdesk API documentation.

Deactivate an API key

Deactivate a key to disable it temporarily, for example, while you investigate unexpected activity. A deactivated key does not authenticate any requests. To use the key again, open the service account and click Activate key under API keys.

To deactivate an API key, follow these steps:

  1. Go to Admin > Agents > Service Accounts.
  2. Click the name of the service account.
  3. Under API keys, click Deactivate key for the key you want to disable.
  4. In the confirmation message, click Deactivate key.

Revoke an API key

Revoke a key to remove it permanently. Any service that uses the key loses access immediately, and you cannot undo this action.

To revoke an API key, follow these steps:

  1. Go to Admin > Agents > Service Accounts.
  2. Click the name of the service account.
  3. Under API keys, click Revoke key permanently for the key you want to remove.
  4. Type REVOKE to confirm.
  5. Click Revoke key.

Convert an existing agent to a service account

If an integration already uses a support agent's API key, you can convert that setup to a service account without changing the key in the integration. The agent's API key moves to the new service account, and the agent gets a new key.

To create a service account from an existing agent, follow these steps:

  1. Go to Admin > Agents.
  2. On the Support Agents tab, find the agent.
  3. Click More (the three dots) at the end of the row, and then click Create service account.
  4. Review what carries over and what changes.
  5. Click Create.

The following items carry over to the service account:

  • The agent's roles, groups, and ticket scope.
  • The agent's current API key.

The following changes take effect:

  • The agent gets a new API key and can no longer use the previous one.
  • The service account does not use a seat, cannot sign in, and cannot be assigned tickets.

Important: Converting an agent cannot be undone.

Manage service accounts

To edit a service account, go to Admin > Agents > Service Accounts, and click the service account name. To deactivate or delete a service account, click More at the end of its row, and then select Deactivate or Delete. When you deactivate a service account, its API keys stop working, and any secondary key created for rotation is permanently deleted. When you delete a service account, it becomes a contact, and its API keys are unmapped and deleted.

Track service account activity

Freshdesk records service account events in the audit log. To view them, go to Admin > Audit Log. The log shows who performed the action, the event, and what changed. The following events are recorded:

  • A service account is created.
  • A primary or secondary API key is created.
  • A service account is deactivated or reactivated.
  • An API key is revoked.

Freshdesk sends an email notification for each of these events. In addition, Freshdesk sends email reminders 14, 7, 3, and 1 day before an API key expires, and again on the day it expires. The emails go to the administrators in the notification list under Admin > Security, and to the administrator who created the service account.

Also see