# 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"
  }
}
```


---

# 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://doc.datagram.network/apis/api-reference/general.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.
