---
updatedAt: 2026-10-16T06:49:17.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# API Keys

<HTMLBlock>{`
<p align="right" style="color: gray;">
  <a href="https://docs-ua.esputnik.com/docs/api-kliuchi" style="color: gray; text-decoration: none;"><em>
    Read this article in Ukrainian ⮕
  </em></a>
</p>
`}</HTMLBlock>

<Callout icon="📘" theme="info">
  The API key is a unique identifier used to integrate with eSputnik and authorize requests. It provides access to your eSputnik account data, so it must be kept secure. The eSputnik API supports <Anchor target="_blank" href="https://en.wikipedia.org/wiki/Basic_access_authentication">Basic HTTP Access Authentication</Anchor> method with the API key used as the password.
</Callout>

To authorize:

1. In the **Username** field, enter any value.
2. In the **Password** field, enter your API key.

Example of API key authorization in the **Postman** application:

<Image src="https://files.readme.io/df0d26b-postman.png" alt="Postman Basic Auth tab with Username and Password fields highlighted for API key authorization" align="center" width="80% " />

<Callout icon="🚧" theme="warn">
  Basic authorization with an account user's login and password (the base64-encoded `login:password` pair) is tied to that user. If the user is deleted from the account, integrations authorized with their credentials stop working. To keep integrations independent of specific users, authorize requests with API keys.
</Callout>

## Creating a Key

To generate an API key:

1. Go to *your profile* → *Settings* → *API*.

2. Click *New key*.

<Image src="https://files.readme.io/05ad964ea3c096802bdbc0977ca63b1c5972c260e49b6d1271e41e6d91756892-image.png" alt="Account menu open with Settings highlighted, showing the API Keys page and New key button highlighted behind it" align="center" width="80%" />

3. In *Description*, enter the name of an application or a site, where you want to use the key to access your eSputnik account.

4. Open the dropdown menu and select the access rights for the API key.

<Image src="https://files.readme.io/b463fd8017d544dba04d0f9b41078e8f1bae514b44b353bb98fe0ebdbefeb1aa-image.png" alt="Add a key panel with a description entered and the access rights list highlighted below the access rights dropdown" align="center" width="80%" />

<Callout icon="❗️" theme="error">
  The access rules apply to all method versions (/v1, / v2, etc.) unless otherwise specified.
</Callout>

5. To set up several integrations, create a key for each. You can create several keys with different access rights for the same account.

You can find all the API keys in the *API* tab. Each key shows the following information:

A. Key number<br />B. Key description
C. Key status (enabled/disabled)
D. Accesses rights
E. Creation date and time
F. Who created

<Image src="https://files.readme.io/f4c633a3634e7b812da231dcf19b3f7410928417235efa1211de55133d6bbe0c-image.png" alt="API Keys list showing a key row labeled A key number, B description, C status toggle, D access rights, E creation date, F creator" align="center" width="80%" />

## Access Rights

Access to eSputnik resources through an API key is set up at the key creation stage.

You can give full access to all eSputnik API resources and methods by choosing **Full access to API**. Or you can limit the key to one of the following sets of permissions, which the dialog shows under the field once a set is selected:

* **Access to events** — manage events.
* **Access to events and contacts** — read contacts and segments, write contacts and segments, manage contact activity in campaigns, manage events.
* **Access to events and contacts (adding/updating)** — write contacts and segments, manage events.
* **Access to messages** — send messages.

If the access rights of a key do not cover the method a request goes to, the response is `403` with the message `User '…' is not allowed to use this REST API resource`. To fix this, change the access level of the key to one that includes the permission you need.

<Image src="https://files.readme.io/f37279d346807de96fd263f6dbeb628900da4bc0a4181fc1fb8ea5e66acd57fb-image.png" alt="Access rights dropdown expanded showing Full access to API, Access to events, Access to events and contacts, and Access to messages options" align="center" width="80%" />

## Copying a Key

To copy your key:

* Point to your key number to display the *Copy* icon.
* Click *Copy*.

<Image src="https://files.readme.io/02cca8e6e10fb590cdc6edcf5ab876be4bd5a473927c4ad8241b3d18b72f50ef-image.png" alt="API Keys page with the copy icon next to a key number highlighted in red" align="center" width="80%" />

## Enabling or Disabling a Key

When you create your key, it becomes enabled by default.

To disable your key:

1. Click the *toggle switch* on the right side of your key.

<Image src="https://files.readme.io/4766d4a7783d6f2d4f09269afd2be34afd3538cc44697e950f067a16ed77fbb7-image.png" alt="API Keys page with the enable/disable toggle switch highlighted in red" align="center" width="80%" />

2. Click *yes* on the pop-up window.

<Image src="https://files.readme.io/6de1ddc6a4b262bb5e263c4eb4eb6412534b6c7b3c7f99fe30147bae1b938e2e-image.png" alt="Confirmation dialog asking Do you really want to disable key, with the yes button highlighted" align="center" width="80%" />

Your key becomes disabled. The system blocks access to the API for this key.

<Callout icon="❗️" theme="error">
  API keys that are not used for 90 days are disabled automatically.
</Callout>

## Editing a Key

To edit your key:

1. Click the *Options* menu (...) on the right.
2. Select *Edit* from the list.

<Image src="https://files.readme.io/2032b745fb88cefd282dff0a7c955097a8607092a8e8087f0fd79a58e1fee3e4-image.png" alt="Options menu open on a key row with Edit highlighted and Delete listed below" align="center" width="80%" />

3. Edit your description and/or access rights and click *Save*.<br />Your key settings update.

<Image src="https://files.readme.io/a685e1d6681e5c97b10d0fa5d52cc61392fc4453f0ac785fd74c1adba7f47234-image.png" alt="Edit a key panel showing description and access rights fields with the Save button highlighted" align="center" width="80%" />

## Deleting a Key

If a key is compromised, you can permanently delete it and create a new one for that application or site.

To delete a key:

1. Click the *Options* menu (...) on the right.
2. Select *Delete* from the list.

<Image src="https://files.readme.io/88c06e27d473cd813f8023930061cb9d0ac623d4fe24a4ddf9d9605ff2f9df69-image.png" alt="Options menu open on a key row with Delete highlighted and Edit listed above" align="center" width="80%" />

3. Click *yes* to confirm.

<Image src="https://files.readme.io/03e7717e2ab18b4404287a6d29e37a5e5901dc6498647f762494ce8539ff8f66-image.png" alt="Confirmation dialog asking Do you really want to delete key, with the yes button highlighted" align="center" width="80%" />

The deleted key is removed from the list of API keys.

## Rules for API Key Security

The API keys provide access to all the data of your eSputnik account. Follow the rules below when working with API keys.

A key can't be restricted to a specific domain, origin, or IP address, and no access rights beyond the presets listed above are available. If you need the key to stay out of the browser, move the calls to your backend — this is implemented on your side.

<Callout icon="❗️" theme="error">
  ### Important

  **Do's**:

  - Keep your API keys secure, like passwords.
  - Periodically check you account for suspicious activity.

  **Don'ts**:

  - Do not show your API key in screenshots or videos. Remove it completely.
  - Do not email your API key; it could fall into the wrong hands.
  - Do not wait if your key is misused. Disable it and create a new one.
</Callout>