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

# API Reference

> Programmatic access to the NearNode platform.

## Base URL

```
https://nearnode.io/api/v1
```

## Authentication

All API requests require a Bearer token in the `Authorization` header:

```bash theme={null}
curl -H "Authorization: Bearer sk_live_..." https://nearnode.io/api/v1/nodes
```

API keys are scoped to your organization. Generate keys in the [NearNode Console](https://nearnode.io) under **Developers → API Keys**.

<Warning>
  API keys grant full access to your organization's data. Store them securely and rotate them periodically.
</Warning>

## Response Format

All responses follow a consistent structure:

```json theme={null}
{
  "data": { ... },
  "error": null
}
```

Error responses:

```json theme={null}
{
  "data": null,
  "error": "Description of what went wrong"
}
```

## HTTP Status Codes

| Code  | Meaning                                   |
| ----- | ----------------------------------------- |
| `200` | Success                                   |
| `201` | Created                                   |
| `400` | Bad request (invalid input)               |
| `401` | Unauthorized (missing or invalid API key) |
| `404` | Resource not found                        |
| `422` | Validation error                          |
| `429` | Rate limited                              |
| `500` | Internal server error                     |

## Rate Limits

* **Standard**: 100 requests per minute per API key
* **Batch operations**: 10 requests per minute

Rate limit headers are included in every response:

```
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: 1707494400
```

## Endpoints

<CardGroup cols={2}>
  <Card title="Create Node" icon="plus" href="/api-reference/create-node">
    `POST /nodes` — Generate a new physical touchpoint.
  </Card>

  <Card title="List Nodes" icon="list" href="/api-reference/list-nodes">
    `GET /nodes` — Retrieve all nodes in your organization.
  </Card>

  <Card title="Get Node" icon="magnifying-glass" href="/api-reference/get-node">
    `GET /nodes/{slug}` — Retrieve a single node.
  </Card>

  <Card title="Update Node" icon="pen" href="/api-reference/update-node">
    `PATCH /nodes/{slug}` — Update payload, label, or status.
  </Card>

  <Card title="Delete Node" icon="trash" href="/api-reference/delete-node">
    `DELETE /nodes/{slug}` — Permanently delete a node.
  </Card>

  <Card title="Batches" icon="boxes-stacked" href="/api-reference/create-batch">
    `POST /batches` — Create nodes in bulk.
  </Card>
</CardGroup>
