> For the complete documentation index, see [llms.txt](https://docs.nectarliquid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nectarliquid.com/builders/registration-and-api-keys.md).

# Registration & API Keys

Anyone with an EVM-compatible wallet on Asset Chain can register as a builder and generate API keys to begin integrating Nectar Liquid.

***

### Self-Service Registration

Builder registration is completely self-service and executed through standard Sign-In with Ethereum (SIWE) authentication.

#### Prerequisites

1. An EVM-compatible wallet address on Asset Chain to receive fee payouts.
2. A valid SIWE session token (`Bearer <jwt>`). (See [SIWE Authentication](/builders/ai-agents.md#headless-siwe-authentication-workflow) for generating this headlessly).

#### Registration Request

```http
POST /v1/builders/register
Host: api.nectarliquid.com
Authorization: Bearer <jwt-token>
Content-Type: application/json

{
  "name": "Apex Trading Terminal",
  "slug": "apex-terminal",
  "contactEmail": "dev@apexterminal.io",
  "walletAddress": "0x284d323a81d12E01ac195D940Eb7Cb08a139B7dF"
}
```

#### Field Specifications

| Field           | Type   | Required | Description                                                              |
| --------------- | ------ | -------- | ------------------------------------------------------------------------ |
| `name`          | string | Yes      | The public display name of your application or bot (2-60 characters).    |
| `slug`          | string | Yes      | Unique URL-safe identifier (lowercase alphanumeric and hyphens).         |
| `contactEmail`  | string | No       | Developer contact email for governance and integration alerts.           |
| `walletAddress` | string | Yes      | The EVM address where builder fees and volume rewards will be disbursed. |

#### Successful Response

```json
{
  "builder": {
    "id": "c1f7b028-4ef3-4819-bb20-21db3342ce14",
    "name": "Apex Trading Terminal",
    "slug": "apex-terminal",
    "status": "active",
    "registeredAt": "2026-10-15T12:00:00.000Z",
    "primaryWallet": "0x284d323a81d12E01ac195D940Eb7Cb08a139B7dF",
    "feeRateBps": 0,
    "feeCapBps": 5
  }
}
```

Upon registration:

* A new builder account is created.
* Your payout wallet is registered as active and primary.
* A default fee policy is created at 0 bps.

***

### Dual-Key Architecture

Nectar Liquid separates API credentials into two distinct key types to protect backend secrets while supporting public frontend embeds:

| Key Type           | Prefix Format       | Exposure                  | Usage                                                                                                                         |
| ------------------ | ------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| **Secret API Key** | `nct_live_<32 hex>` | **Private / Server-Only** | Used in backend servers, automated trading scripts, and administrative operations via `X-API-Key` or `Authorization: Bearer`. |
| **Public API Key** | `pk_live_<32 hex>`  | **Public / Client-Side**  | Embedded in frontend web applications, mobile client apps, and SIWE challenge validations.                                    |

***

### Generating API Keys

To issue a new key pair:

```http
POST /v1/builders/me/api-keys
Host: api.nectarliquid.com
Authorization: Bearer <jwt-token>
Content-Type: application/json

{
  "label": "Production Backend Worker"
}
```

#### Response

```json
{
  "id": "e83f2a1b-94c0-4382-b7ef-6346bc781da2",
  "label": "Production Backend Worker",
  "publicKey": "pk_live_8f3a1290bb244e8992ca3b776a0129bc",
  "secretKey": "nct_live_72ea004491c13bc498e8fba10034a781",
  "status": "active",
  "createdAt": "2026-10-15T12:05:00.000Z"
}
```

> \[!CAUTION] Your `secretKey` (`nct_live_...`) is revealed **only once** upon creation. It is hashed with SHA-256 prior to storage in the protocol database.
>
> * Store the secret key securely in an encrypted vault or server environment variables.
> * **Never commit private keys or API secret keys to git repositories, cloud storage, or client-side bundles.**

***

### Managing and Revoking Keys

#### List Active Keys

```http
GET /v1/builders/me/api-keys
Host: api.nectarliquid.com
Authorization: Bearer <jwt-token>
```

#### Revoke a Compromised Key

If a secret key is compromised or rotated, revoke it immediately:

```http
DELETE /v1/builders/me/api-keys/e83f2a1b-94c0-4382-b7ef-6346bc781da2
Host: api.nectarliquid.com
Authorization: Bearer <jwt-token>
```

Revoked keys are permanently deactivated and cannot authenticate subsequent requests.

***

### Authenticating with API Keys

Once generated, use your secret key in either the `X-API-Key` header or as a `Bearer` token:

```bash
# Using X-API-Key Header
curl -X GET https://api.nectarliquid.com/v1/builders/me \
  -H "X-API-Key: nct_live_72ea004491c13bc498e8fba10034a781"

# Using Authorization Bearer Header
curl -X GET https://api.nectarliquid.com/v1/builders/me \
  -H "Authorization: Bearer nct_live_72ea004491c13bc498e8fba10034a781"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nectarliquid.com/builders/registration-and-api-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
