---
updatedAt: 2026-10-29T22:25:32.000Z
agentTools:
  projectIndex: https://api.pencilspaces.com/llms.txt
---

# 🔐 Generating your key

Authentication is performed by bearer token with your account’s API key. To access your API key, visit [Spaces Manager](https://my.pencilapp.com/) > Settings

![](https://files.readme.io/2d5e176d89da9cfd136380f21333bf20deded17475e58a2c9a05ccf55505cebc-generating-your-key-1.png)

Navigate to **API Key** > **Generate&#x20;**&#x61;nd follow the onscreen instructions to generate your key. If you do not see this option in Settings, either your account has not been configured correctly or you do not have sufficient permissions to create an API key. Only Institution Admins can create API keys.

Once your key is generated, for security reasons, it can only be viewed once. After you refresh the page, you’ll only be able to revoke your key.

<Image src="https://files.readme.io/f020f4dbca4a24be029c76068efeede2a4beca35062332f25a32b9a8354718b8-generating-your-key-2.png" width="500px" />

In case you need to revoke an existing key, you can do so on the same page. Once a key is revoked, you and all other clients logged into your admin account will be logged-out. You will need to log-in to Pencil Spaces again to regenerate your key.

## Environments

We provide access to two different environments for development. Our staging environment is a restricted environment that is exclusively accessible for developers for limited testing. This environment **is not stable&#x20;**&#x61;nd can not be used for production deployments.

**Staging Environment**

* Available at <https://staging.pencilapp.com>

* Server URL at: [*https://staging-apis.pencilapp.com/public/api/*](https://staging-apis.pencilapp.com/public/api/)

**Production Environment**

* Available at [my.pencilapp.com](https://my.pencilapp.com)

* Server URL at: [*https://apis.pencilapp.com/public/api/*](https://apis.pencilapp.com/public/api/)

In both cases, you’ll need a **usage-based** o&#x72;**&#x20;Enterprise&#x20;**&#x61;ccount to access our API. You can verify you current tier by visiting your [billing](https://helpdesk.pencilspaces.com/en/articles/10435775-accessing-billing-usage-for-you-institution) page. If you’re not on the correct tier, please contact Pencil Spaces support at <support@pencilspaces.com> and we’d be more than happy to assist.