> For the complete documentation index, see [llms.txt](https://doc.datagram.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.datagram.network/apis/api-reference/general.md).

# General

## 🔗 Base URLs

You can use the following environments depending on your development stage:

<table><thead><tr><th width="175.33331298828125">Environment</th><th>Base URL</th></tr></thead><tbody><tr><td><strong>Production</strong></td><td><code>https://link.api.datagram.network</code></td></tr><tr><td><strong>Staging</strong></td><td><code>https://link-staging.api.datagram.network</code></td></tr></tbody></table>

Use the appropriate base URL depending on whether you're integrating into a live environment or testing.

## 🧩 API Structure

All endpoints follow a consistent versioned path:

* `/api/v1/` — Public endpoints
* `/organization/api/v1/` — Private organization-level endpoints (require authentication)

All requests and responses use the `JSON` format unless otherwise specified.

## 🔐 Authentication

All `/organization/api/v1/` Endpoints require a valid **Organization Token** in the request headers.

**Where to get it:**

* **Production Dashboard:** <https://dashboard.datagram.network/sdk>
* **Staging Dashboard:** <https://staging.datagram.network/sdk>

**Header Format:**

```
makefileCopyEditAuthorization: <token>
```

Make sure the token is valid and associated with your organization. If the token has expired, you’ll receive an `401 Unauthorized` error.

## 🚦 Rate Limits

To ensure fair usage and optimal performance, the Datagram API enforces rate limiting.

* **Current rate limit:**`60 requests per second`
* If the limit is exceeded, you may receive an `429 Too Many Requests`error. We recommend implementing retries with exponential backoff.

## ✅ Response Format

All successful responses will return a `200 OK` or appropriate success status (e.g., `201 Created`), along with a `data` object.

Error responses are returned with standard HTTP status codes (`400`, `401`, `404`, etc.) and contain a descriptive `message`.

**Example:**

```json
{
  "error": {
    "message": "Unauthorized"
  }
}
```
