> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate API requests

> Authenticate Nixflex API requests with a server-side key. Understand account ownership, personal sessions and Owner, Admin and Member permissions.

**FIXED · platform** Raw HTTP base URL: `https://api.nixflex.com/v1`. Node and Python SDK base URL: `https://api.nixflex.com`. The SDK adds `/v1`. Keep the credential on your server.

**NOT OFFERED → do this instead · platform** There is one public API: `https://api.nixflex.com/v1`. There is no sandbox. Test with your own number on production. Use local fixtures when you do not need a real call or text.

**YOU CAN CHANGE · account** Rotate the credential and update its callers together.

**SCOPE · account** A platform uses one Nixflex account for all its businesses, with one agent per business or a shared agent. Separate accounts only when businesses sign up themselves. No platform account-creation loop. Sub-accounts are not offered. Authorise each tenant on your server.

In Help choose New request for a capacity review, complaint or problem, abuse report, or other issue. Follow Your open chats. Owners and Admins see organisation tickets. Members see their own while authorised. Close chat removes it from the open list. A staff-closed chat can surface until its final reply is read. `POST /v1/support/tickets/chat-summary` is a read. Use watch\_ticket to check a displayed ticket outside the current page.

Use /v1/support/tickets. A personal session sends X-Nixflex-Expected-Account with the original workspace’s public key\_id for list, detail, chat-summary, writes and receipt lookup. Organisation keys select their own account. On 409 account\_changed, discard the stale draft and refresh Help in the intended workspace.

Create, reply and solve each need an Idempotency-Key. Reply uses X-Expected-Revision. Solve sends version in JSON. Lost response? The original person can `GET /v1/support/tickets/requests/{request_key}` with the original account header. A 200 returns the current ticket and original receipt. 404 means missing or inaccessible. Never resend in a different workspace. Organisation keys can replay only the identical write with its key, body and revision.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#account-access)

Authenticate server requests with the owning account credential and follow the permission rule for each operation.

Guide: **API reference** · Topic: **Authentication**

**The important part**

* Keep the full account credential on your server.
* Personal roles and organisation API keys have different authority; follow the operation-specific rule.

[Business guide](https://docs.nixflex.com/guides/business/team.md) · [Developer guide](https://docs.nixflex.com/authentication.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Send your API key

Most public operations require this header:

```http theme={"dark"}
Authorization: Bearer KEY_ID:KEY_SECRET
Content-Type: application/json
```

The credential is the key ID, a colon, and the key secret. A verified personal dashboard Bearer session is a separate credential and is accepted only where an operation explicitly documents it. Keep the entire credential server-side; never put it in a widget, query string, or support screenshot.

## Accounts and permissions

| Situation | Behaviour | What to do |
| - | - | - |
| Missing or invalid API key | HTTP 401, `unauthorized` | Check the complete account credential. |
| Key belongs to another account | It cannot access your resources | Use the owning account's key and resource IDs. |
| Organisation policy refuses an operation | HTTP 403, usually `permission_denied` | Check authority and the operation's permissions. |
| Organisation API key | Acts for the organisation with Owner authority | Restrict it to trusted server processes. |
| Invitation or ownership acceptance | Requires the person's verified dashboard sign-in | Complete the human workflow there. An API key cannot accept ownership. |

Where organisation controls are enabled, Owner, Admin, and Member roles govern human dashboard actions. An organisation API key has Owner authority; it is not an individual Member or Admin session. Personal sessions use their current organisation role. Resources remain with the organisation when ownership changes.

## Create an account once

[POST /keys](https://docs.nixflex.com/api-reference/account/create-key.md) is unauthenticated signup: it creates a **new API account** and returns its credential once. It does not add another key to an existing organisation. Signup is limited to three attempts per address per hour and can return `429 key_creation_rate_limited`.

If you already belong to an organisation, recover its access or ask its owner. Do not create a replacement account to solve a login problem.

## Rotate a credential

[Rotate the API key](https://docs.nixflex.com/api-reference/account/rotate-key.md) with the current credential. The key ID stays the same; the old secret stops working immediately. Save the new secret securely and update applications. There is no promised overlap period.

A lost rotation response is an uncertain write. Do not repeat rotation automatically. Check which saved credential works with a read; if the new secret was not saved, use account recovery.

The organisation signing secret is separate. API-key rotation does not rotate it. Retrieve signing material only through its authorised operation and keep it out of ordinary request logs.

## Minimal read example

```bash theme={"dark"}
curl 'https://api.nixflex.com/v1/agents?limit=1' -H "Authorization: Bearer $NIXFLEX_API_KEY"
```

A valid empty list is successful. Authentication failure uses the [standard error shape](https://docs.nixflex.com/api-reference/errors.md#response-shape). For throttling, read `Retry-After` and follow the [retry rules](https://docs.nixflex.com/api-reference/retries.md).

## Next steps

* [API overview](https://docs.nixflex.com/api-reference/introduction.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md)
* [Retry rules](https://docs.nixflex.com/api-reference/retries.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.