# API documentation

## Overview

The SAFc Registry API is an additional mode for using the registry that can unlock some business use cases (e.g., automating reading data from the registry or taking actions on the registry).

The registry API can be used by generating an API token to securely authenticate with the registry's backend each time you make a request.  Each API token is tied to an individual and inherits all of their roles/abilities.&#x20;

So, if Alice has an API token associated with her email ([alice@energyweb.org](mailto:wendell.cathcart@energyweb.org)) and someone adds her to their account as an *Account Representative with read only access*, Alice's API token will gain access to read the data from that account.&#x20;

## Getting started

### Setting up your authentication tokens

<figure><img src="/files/YYSIDP1GKUwkMnTKCz93" alt=""><figcaption><p>Log in and click the user icon in the top right corner of the screen</p></figcaption></figure>

<figure><img src="/files/KjEQpnAIJYiLNtCLoFXc" alt=""><figcaption><p>Navigate to the Profile settings page</p></figcaption></figure>

<figure><img src="/files/OdcZnyzeiueTRyrDuVb6" alt=""><figcaption><p>Select the "Auth Tokens" tab and click "Create new Auth Token"</p></figcaption></figure>

The new Auth Token will only be displayed once for security purposes and you must record it at this time. If you lose your token, you'll need to create a new one.


---

# 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.safcregistry.org/user-guide/api-documentation.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.
