GetPublicForm and SubmitForm are public and need no credentials. All other Forms methods require an API key with the forms scope, sent as Authorization: Bearer YOUR_API_KEY. Forms are identified by a UUID that you obtain from the Paubox dashboard.
Creating a client
PAUBOX_FORMS_API_KEY is a convention. On a client without a key, the protected methods return an error without calling the API.
Optional configuration is available via FormsOption values:
Get a form
Retrieve a form’s metadata, field schema, and rendered HTML/CSS.GetPublicForm works without a key; GetForm returns the same Form but requires one.
Form struct includes:
Submit a form
SubmitForm returns only an error; nil means the submission was accepted.
Submitting with file attachments
Pass the raw file bytes. The SDK base64-encodes them, so do not encode them yourself:FormSubmissionAttachment struct:
Manage forms
These methods require a client created with aforms-scoped API key.