# AB Tasty public API

The public API enables you to access various routes to the AB Tasty platform. This may be useful to recover information about your campaigns, carry out simple actions, or develop an Intranet-based interface.

Access can be granted to your developers or those outside your company (a tech partner or consultant, for instance). For them to use the public API, you need to generate access rights by selecting predefined roles that coincide with specific actions within AB Tasty.

Depending on the roles you grant them, your partners will be able to carry out the following actions:

* Recover information related to your campaigns
* Monitor your campaigns (running in production, pausing, scheduling, and duplicating tests and personalizations)
* Manage your account’s users
* Update the AB Tasty library
* Empty the AB Tasty library in case of emergency

If necessary, you can also remove access rights for one or more people.

To generate access using the public API, you need administrator rights for your account.

## Generating access credentials <a href="#h_01jazh9c4g3r0kkpzf67mpxp0f" id="h_01jazh9c4g3r0kkpzf67mpxp0f"></a>

<img src="/files/34EGXunp5oJW8CcNL2cw" alt="" width="563">

To generate access credentials, follow these steps:

1. From the [Public API page](https://app2.abtasty.com/settings/public-api), in the **Description** field, enter the reason why you want to grant access to your partner.
2. Select one, several, or all roles from the drop-down list. You must select at least one role. The selected roles are displayed as tags in the field. To delete a role, click the cross next to the tag.
3. Click Generate. The following message is displayed: “Your API credential was successfully created!” Two unique credentials are created: **ClientID** and **ClientSecret**.
4. Click **Copy**: The credential is automatically placed on the clipboard.
5. Forward the credentials to your partner, who will create a token, which is necessary for accessing AB Tasty routes.

If you refresh the page, the information will be lost and you will have to repeat the process.

Refer to the [***Public API Documentation***](https://developers.abtasty.com/docs/data/public-api) post in the **Developer Portal** for more information on creating a token using the credentials.

Credentials are sensitive information. Delete the email from your sent folder after sharing credentials, and ask the recipient to do the same.

Once access has been generated, it is displayed in your credential history section below the form.

## Revoking access <a href="#h_01jazh9c4gy9mncmn8w5mhzmc9" id="h_01jazh9c4gy9mncmn8w5mhzmc9"></a>

If you’d like to revoke anyone’s access and make their API keys invalid, follow these steps:

1. In **Your credential history**, click **Revoke Access**. The following message will be displayed: “Are you sure? Every integration linked to that access will not work anymore. Are you sure you want to continue?”
2. Click **Yes, revoke access** to confirm, or **No** to cancel.

Accesses that have been revoked can still be viewed in **Your credential history**.

## Searching for an access <a href="#h_01jazh9c4ga8cv5e1ztjrk2ktr" id="h_01jazh9c4ga8cv5e1ztjrk2ktr"></a>

Once created, access credentials are displayed in reverse chronological order.

<img src="/files/Z5xALSjJcouhUi1HqT46" alt="" width="563">

To search for access credentials, follow these steps:

1. Enter a word found in the **Created by**, **Description,** or **Role** columns into the search field in the top right-hand corner of the history section.
2. Click the magnifying glass or hit **Enter**.

The relevant results will be displayed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/integrations/custom-integrations/ab-tasty-public-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
