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

# API Reference

> FormHug public REST API v1 — programmatically manage forms, entries, and webhooks.

The FormHug API lets you manage forms, read submissions, configure webhooks, and submit entries on behalf of your users. It is a JSON REST API hosted at `https://formhug.com`.

## Conventions

* **Base URL**: `https://formhug.com`
* **Request and response keys** are `snake_case`.
* **All responses** are JSON. Successful responses wrap the payload in a `data` envelope; paginated lists add a `pagination` object.
* **Errors** return a non-2xx status with `{ "error": "...", "error_details": [...] }`. `error_details` only appears for model validation failures.

### Successful response

```json theme={null}
{
  "data": { "id": "abc123", "name": "My form" }
}
```

### Paginated response

```json theme={null}
{
  "data": [ /* items */ ],
  "pagination": { "total": 123, "next_cursor": "NQ==" }
}
```

### Error response

```json theme={null}
{
  "error": "Name can't be blank",
  "error_details": [
    { "attribute": "name", "message": "can't be blank" }
  ]
}
```

## Resources

| Resource     | What it covers                                                      |
| ------------ | ------------------------------------------------------------------- |
| **Forms**    | Create, update, list, and delete forms.                             |
| **Folders**  | Organize forms into folders.                                        |
| **Entries**  | Read submissions (private) and submit to a published form (public). |
| **Webhooks** | Subscribe to events on a form's submissions.                        |
| **OAuth**    | Authorize third-party apps to act on a user's behalf.               |
| **Me**       | Information about the authenticated user.                           |

## Next steps

* [Authentication](/api-reference/authentication) — choose between OAuth tokens and Personal Access Tokens, understand scopes.
