get_form and submit_form do not require API credentials. Forms are identified by a UUID that you obtain from the Paubox dashboard. The form management methods require a scoped API key; see Manage forms.
Create a client
PauboxRails::Forms.client returns a new PauboxRails::Forms::Client instance.
Get a form
Retrieve a form’s metadata, field schema, and rendered HTML/CSS:get_form raises PauboxRails::Forms::NotFoundError if no form exists for the ID (HTTP 404).
Submit a form
submit_form returns true on a successful submission (HTTP 201).
Submitting with file attachments
The maximum total request size is 250 MB.Manage forms
The management methods require a scoped API key with theforms scope, passed as api_key: or set as PAUBOX_FORMS_API_KEY. It can be the same key as the Email API key if that key also has the forms scope.
get_form_details, list_forms (requires customer_id:), create_form, update_form, archive_form, unarchive_form, copy_form, form_stats, list_submissions, submissions_csv, and submission_pdf. Calling one without a key raises PauboxRails::Forms::MissingApiKeyError.
Error handling
All Forms errors inherit fromPauboxRails::Forms::Error: NotFoundError (HTTP 404), BadRequestError (HTTP 400 or 422), UnauthorizedError (HTTP 401), ForbiddenError (HTTP 403), and MissingApiKeyError. An empty ID, or a non-UUID form or submission ID in the URL of a management method (every method except copy_form), raises ArgumentError before a request is made.