> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onlyform.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> Interactive reference for the Onlyform Public API.

The reference is generated from the canonical OpenAPI 3.1 document checked into this repository. It contains 29 operations across identity, workspaces, forms, submissions, analytics, and webhooks.

## Base URL

```text theme={null}
https://api.onlyform.com
```

## Authentication

Authenticated endpoints require a scoped key in the `X-API-Key` header.

```bash theme={null}
curl https://api.onlyform.com/v1/me \
  --header "X-API-Key: $ONLYFORM_API_KEY"
```

The `GET /v1/openapi.json` endpoint is public and does not require a key.

## Resources

| Resource    | Operations                                                      |
| ----------- | --------------------------------------------------------------- |
| Identity    | Inspect the key owner and effective scopes.                     |
| Workspaces  | List, create, read, update, and delete workspaces.              |
| Forms       | List, create, read, update, trash, and inspect form blocks.     |
| Submissions | List, read, and permanently delete completed responses.         |
| Analytics   | Read aggregate views, starts, submissions, and completion rate. |
| Webhooks    | Manage completed-response webhooks and inspect deliveries.      |

## OpenAPI

* [Open the hosted OpenAPI document](https://api.onlyform.com/v1/openapi.json).
* Use **Download API spec** in the page menu to download the documentation copy.

<Note>
  The OpenAPI file is the source of truth for endpoint paths, parameters, schemas, security requirements, response codes, and generated code samples.
</Note>

## Before you integrate

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/guides/authentication">
    Select minimum scopes and manage key rotation.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/guides/errors">
    Handle stable error codes and request IDs.
  </Card>

  <Card title="Pagination" icon="list-ol" href="/guides/pagination">
    Traverse list endpoints with opaque cursors.
  </Card>

  <Card title="Form definitions" icon="file-pen" href="/guides/form-definitions">
    Update blocks and themes without losing content.
  </Card>
</CardGroup>
