# API Reference

Get access to management functions for your Edgegap resources using HTTP requests.

<a href="https://raw.githubusercontent.com/edgegap/openapi-specification/refs/heads/main/edgegap-v2-openapi.yaml" class="button primary" data-icon="square-down">Download openapi \[v2]</a> <a href="http://raw.githubusercontent.com/edgegap/openapi-specification/refs/heads/main/edgegap-v1-openapi.yaml" class="button secondary" data-icon="square-down">Download openapi \[v1]</a>&#x20;

{% hint style="info" %}
If you need help, [please reach out to us over Discord](https://discord.gg/MmJf8fWjnt). For live games support see our [ticketing system](https://edgegap.atlassian.net/servicedesk/customer/portal/3).
{% endhint %}

### Authentication Token

Generate (and view) your secret tokens for Edgegap API in [Dashboard - User Settings / Tokens](https://app.edgegap.com/user-settings?tab=tokens).

Add your secret token with each API request as an HTTP header (include the word `token`):

`Authorization: token xxxxxxxx-e458-4592-b607-c2c28afd8b62`

{% hint style="danger" %}
**Do not integrate Edgegap API endpoints in game client, as your API token provides unlimited access to your account. See** [integration](https://docs.edgegap.com/docs/api/integration "mention") **for secure client-facing API endpoints and functions.**
{% endhint %}

{% hint style="success" %}
In case your secret tokens are compromised, delete them, and update organization member passwords.
{% endhint %}

### Response Pagination

In case a response would contain too many items, we return a subset of data with pagination info:

<pre class="language-json"><code class="lang-json">{
  "count": 100,
  "data": ["foo-0", "[...]", "bar-9"],
  "<a data-footnote-ref href="#user-content-fn-1">pagination</a>": {
    "number": 1,
    "next_page_number": 2,
    "previous_page_number": null
    "paginator": {
      "num_pages": 10
    },
    "has_next": true,
    "has_previous": false
  }
}
</code></pre>

For paginated response, use parameters `page` and `limit`  to retrieve more results:

* second page: `https://api.edgegap.com/v1/apps?`**`page=2`**
* more results: `https://api.edgegap.com/v1/apps?`**`limit=20`**
* combined: `https://api.edgegap.com/v1/apps?`**`page=2&limit=20`**

### Rate Limiting

To ensure platform stability and prevent surprise invoices, we rate limit your organization's API usage:

* [deployments](https://docs.edgegap.com/learn/orchestration/deployments "mention") at 40 requests per second,
* [#context-and-status](https://docs.edgegap.com/learn/orchestration/deployments#context-and-status "mention") at 20 requests per second.

{% hint style="info" %}
[Contact us](mailto:info@edgegap.com) to **plan releases, run load tests, estimate launch traffic, and prepare for success.**
{% endhint %}

[^1]: contains pagination information


---

# 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://docs.edgegap.com/docs/api.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.
