# API Introduction

This reference is your key to a comprehensive understanding of the HeyGov API.

Integrations use the API to access a jurisdiction's departments, forms, payments and users. Integrations can connect services to HeyGov and build interactive experiences.

The base URL to send all API requests is `https://api.heygov.com`.

* Each HeyGov jurisdiction is identified by a unique ID as first path of API endpoint:

```bash
# URL format
https://api.heygov.com/{jurisdiction_id}

# HeyGov test jurisdiction
https://api.heygov.com/heyville.org
```

* HTTPS is required for all API requests.
* The API follows RESTful conventions when possible, with most operations performed via `GET`, `POST`, `PATCH`, and `DELETE` requests on page and database resources. Request and response bodies are encoded as JSON.


---

# 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://developers.heygov.com/heygov-api/api-introduction.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.
