All authenticated FormHug API endpoints expect a bearer token in theDocumentation Index
Fetch the complete documentation index at: https://formhug.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header:
Personal Access Token (PAT)
Use this for server-to-server scripts, internal tools, or anywhere running a full OAuth flow would be overkill. A PAT belongs to a single user and is prefixed withfh_:
OAuth 2.0 access token (JWT)
Use OAuth when a third-party application acts on a FormHug user’s behalf. FormHug implements the Authorization Code flow with PKCE (RFC 7636).- Generate a
code_verifierand derive acode_challengeusing the S256 method. - Redirect the user to
GET /api/v1/oauth/authorizewith yourclient_id,redirect_uri, requestedscope,state,code_challenge, andcode_challenge_method=S256. - The user is redirected back to your
redirect_uriwith a one-timecode. - Exchange the code at
POST /api/v1/oauth/tokenwithgrant_type=authorization_code, thecode, and the originalcode_verifier. You receive anaccess_token(JWT), arefresh_token, expirations, and the grantedscope. - Call API endpoints with the JWT in the
Authorizationheader. - When the access token expires, call
/api/v1/oauth/tokenagain withgrant_type=refresh_tokenand yourrefresh_token. - Revoke a token with
POST /api/v1/oauth/revoke(RFC 7009). This also clears the underlying session.
OAuth tokens are documented here for reference. The Try it out flow in this UI doesn’t run an OAuth handshake — use a Personal Access Token to send live requests from the playground.
Scopes
Every endpoint requires a specific scope. Both PATs and OAuth tokens are checked against the same scope list:| Scope | Grants |
|---|---|
form:read | Read forms and folders. |
form:write | Create and update forms and folders. |
form:delete | Delete forms and folders. |
entry:read | Read submissions to a form. |
entry:write | Create or modify entries on the owner’s behalf. |
form:respond | Submit to a published form on a respondent’s behalf. |
integration:read | List webhooks and other integrations. |
integration:write | Configure webhooks and other integrations. |
403 Forbidden. A request with a missing or invalid token returns 401 Unauthorized.