> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.gracehill.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.gracehill.com/_mcp/server.

# Overview

The Grace Hill Customer API lets you pull your organization's employees, open training assignments and training completions into your own systems. Every response is automatically scoped to the organization that owns the API key.

| Endpoint              | Returns                                        |
| --------------------- | ---------------------------------------------- |
| `GET /v1/employees`   | Employees (active by default)                  |
| `GET /v1/assignments` | Open training assignments                      |
| `GET /v1/completions` | Completed training (last 12 months by default) |

Base URL: `https://api.gracehill.com`

## Authentication

Send your API key on every request as a Bearer token:

```bash
curl https://api.gracehill.com/v1/employees \
  -H "Authorization: Bearer ghk_YOUR_API_KEY"
```

Your organization's System Admins create keys in PerformanceHQ on the **Integrations** page (**Create Integration → Customer API**). A key is shown only once, so store it securely. Revoking a key takes effect immediately.

> **Note**
>
> The Customer API must be enabled for your organization. If it isn't, requests return `403 customer_api_not_enabled`. Contact your Grace Hill account team to enable it; access can take up to 5 minutes to become active.

## Query parameters

Filters use `filter[name]=value` and combine with AND. Most ID filters accept comma-separated lists.

Parameters are validated strictly: an unknown `filter[...]` or `page[...]` name returns `400 invalid_parameter` instead of being ignored. Names are case-sensitive.

> **Tip**
>
> Filter groups by ID rather than name. Name matches are exact.

## Pagination

* `page[size]`: default 50, maximum 200.
* `page[number]`: 1-based.
* Each response includes `meta.page.totalCount` and `meta.page.totalPages`. Keep requesting pages until `meta.page.number` equals `meta.page.totalPages`.

## Completions date window

Each completions request covers at most one year. By default it returns the last 12 months, and `meta.window` shows the window applied. To get older history, request one year at a time, for example `filter[completedFrom]=2024-01-01&filter[completedTo]=2024-12-31`.

## Rate limits

Requests are rate limited per account: all of your organization's API keys share one budget, with a request-rate limit and a daily quota that depend on your plan.

* Exceeding the rate limit returns `429 rate_limited` with a `Retry-After` header (seconds). Wait and retry.
* Exceeding the daily quota returns `429 quota_exceeded`. The quota resets at 00:00 UTC.

## Errors

All errors share one shape:

```json
{
  "errors": [
    { "status": "400", "code": "invalid_parameter", "title": "Bad Request", "detail": "..." }
  ]
}
```

| Status | Code                                                                 | Meaning                                                                                         |
| ------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| 400    | `invalid_parameter`                                                  | Invalid or unknown filter/page parameter, or an invalid date window                             |
| 401    | `unauthorized`                                                       | Missing, invalid, expired or revoked API key                                                    |
| 403    | `customer_api_not_enabled`, `product_not_in_plan`, `access_disabled` | API access isn't allowed for your account                                                       |
| 429    | `rate_limited`, `quota_exceeded`                                     | Rate limit or daily quota exceeded                                                              |
| 503    | `query_timeout`                                                      | The query took too long. Wait for `Retry-After`, then narrow filters or use a smaller page size |