# REST API quickstart

## Make your first request

Use a workspace API key. For hosted Retainer, create one in **Settings → Agents**. For a self-hosted instance, see [workspace keys](/docs/self-hosting/#workspaces-and-api-keys). Store the key in `RETAINER_API_KEY` before running the request.



**Hosted**

```sh
curl https://retainer.tamloot.cc/v1/me \
  -H "Authorization: Bearer ${RETAINER_API_KEY}"
```





**Local Compose**

```sh
curl http://localhost:8787/v1/me \
  -H "Authorization: Bearer ${RETAINER_API_KEY}"
```



Check the **workspace**, **actor**, and **scopes** in the response. Then read the workspace schema before building queries or sending field values. Retainer accepts the API field names from that schema.


- [Read the caller identity](/docs/api/workspace/get-caller/)


- [Read the workspace schema](/docs/api/schema/get-schema/)


- [Authentication, errors, and pagination](/docs/api/rest-api/)


- [Use the TypeScript SDK](/docs/sdk/)


[Download the OpenAPI contract](/openapi.json) for the workspace data, schema,
memory, review, and file operations in this reference.
