# API Examples

### Structure of the Examples

* cURL-based examples: Every example shows the exact cURL command you can copy and run directly in your terminal.
* Endpoint-specific demonstrations: We walk through different API endpoints one by one, highlighting the required parameters and common use cases.
* Request & Response clarity: Each section contains both the request (what you send) and the response (what you get back) to illustrate expected behavior.

### Prerequisites

Before running any of the examples, make sure you have:

1. [API Key](https://docs.groundcover.com/use-groundcover/remote-access-and-apis/api-keys)
2. Backend ID

The Backend ID can be obtained from your groundcover Admin panel.

**To locate it:**

* Navigate to Settings → Access
* Open the API Keys tab
* The Backend ID appears in the section header

**When to Use**

The Backend ID is required when your account is associated with multiple backends.

In such cases, include it in your API requests using the appropriate request header to ensure the request is routed to the correct backend.

```yaml
X-Backend-Id: <YOUR_BACKEND_ID>
```


---

# 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.groundcover.com/use-groundcover/remote-access-and-apis/api-examples.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.
