> For the complete documentation index, see [llms.txt](https://docs.sonoransoftware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonoransoftware.com/cad/api-integration.md).

# API Integration

Sonoran CAD's open API endpoints allow you to automatically update unit locations, panic statuses, send 911 calls and more from in-game.

<figure><img src="https://232668649-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4pGN81fb4R6zFhodcu%2Fuploads%2FLK84lZNRx7sYzRPHAThK%2Fapi-integration.png?alt=media&amp;token=a4edc2b3-162c-48c3-a074-90bebfeec361" alt=""><figcaption></figcaption></figure>

## How are API calls sent?

All API calls are sent via an HTTP POST with a JSON formatted body.

## Can I integrate this with my gamemode/framework?

Yes, our API calls can be integrated into nearly any gamemode with nearly any programming language.

We provide a library of drag-and-drop plugins written in Lua.<br>

You can also write your own script using our API endpoints:

{% content-ref url="/pages/-M4pV5Pnc864R0IwW6k9" %}
[API Endpoints](/cad/api-integration/api-endpoints.md)
{% endcontent-ref %}

Easily integrate external scripts with our LUA and JS export examples:

{% content-ref url="/pages/ONoZRRBy208JfLTCy8VK" %}
[Broken mention](broken://pages/ONoZRRBy208JfLTCy8VK)
{% endcontent-ref %}

Or, learn more about receiving push events directly to your game server:

{% content-ref url="/pages/-M7F7RghOsB9573hMysj" %}
[Push Events](/cad/api-integration/push-events.md)
{% endcontent-ref %}

## Are there rate limits?

Yes, Sonoran CAD will automatically block any malicious or spammed traffic. While we don't publicly publish these limits, it's best to not make more than one call per second for an extended period of time.

{% content-ref url="/pages/-M4pV13Ik4JO9SxAZzyV" %}
[Getting Started](/cad/api-integration/getting-started.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonoransoftware.com/cad/api-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
