Data

Send a form entry (public)

Called from a form on a website by form.js (<script src="https://api.hypamoon.com/form.js" defer></script>); you rarely call it yourself. Needs the project's public token in ?token= (the same token as the chat widget, from POST /chat-tokens), an Origin header in its allowed_origins, a collection with access.public_write, and always a bot token from GET /public/challenge in turnstile_token. Limits: 30 entries per hour per IP address and 500 per day per collection. The response contains the id and created_at, never the data. If the honeypot is filled in, the response is the same but nothing is stored. The collection's triggers fire as they do for the API.

post/public/collections/{name}/documents

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/public/collections/{name}/documents
  • Auth: API key in query parameter token

Path parameters

namestring required

The name of the collection, like contact.

Request body

dataobject required

The fields of the form as a JSON object, like { "name": "Anna", "email": "anna@example.com", "message": "..." }.

turnstile_tokenstring

The bot-check token from the challenge frame (GET /public/challenge). Required; form.js does this for you.

honeypotstring

The value of a hidden field that people leave empty. When it is filled in, the answer is 201 but nothing is stored.

Response

Stored.

idstring uuid required

The id of the new document.

created_atstring date-time required

When it was stored.

testboolean required

true when the public token is a test token: stored, but no email is sent.

Changes

No recorded changes to this operation across all 1 revision of this API.