API Documentation
API keys
The HappyWaiver API requires API keys for authentication. These keys can be generated at the business level.
Keep your API key confidential! Never share it or expose it in client-side code (such as browsers or apps). For production requests, route them through your backend server, where your API key can be securely accessed from an environment variable or a key management service.
Include your API key in the Authorization HTTP header for all API requests, formatted as shown below:
apiKey: HAPPYWAIVER_API_KEY
Making requests
To make your first API request, paste the command below into your terminal, ensuring you replace $HAPPYWAIVER_API_KEY with your actual secret API key.
The sample will return all the documents the business has created for the specified API key.
curl http://localhost:4000/api/waiver/list \
-H "Content-Type: application/json" \
-H "apiKey: $HAPPYWAIVER_API_KEY" \
-d '❴
❵'
Get List Of Documents
Search for users who have submitted responses for a business
Request body
archived boolean Optional
- Return list of archived documents
Response
Returns json object
success: boolean
documentList: list of documents with name, waiverUrl and lastUpdated
- name: name of document
- documentIdentifier: unique identifier for the document
- waiverUrl: url of document to be filled by users
- lastUpdated: last time document was updated.
Get List of Signed Document
Search for users who have submitted responses for a business
Request body
documentIdentifier string Required
- unique identifier specifying the document to view responses for
date string Optional
- Search for submissions on specified date
startDate string Optional
- Search for submissions before specified date
- CANNOT be used with the "date" field
- CAN be used in conjunctions with "startDate"
endDate string Optional
- Search for submissions after specified date.
- CANNOT be used the "date" field
- CAN be used in conjunction with "endDate"
firstName string Optional
- Search for submissions with submitters with the specified first name.
- can be used in conjunction with date fields
lastName string Optional
- Search for submissions with submitters with the specified last name.
- can be used in conjunction with date fields
email string Optional
- Search for submissions with submitters with the specified email.
- can be used in conjunction with date fields
phone string Optional
- Search for submissions with submitters with the specified phone number.
- can be used in conjunction with date fields
birthday string Optional
- Search for submissions with submitters with the specified birthday.
- Format: yyyy-MM-dd
- can be used in conjunction with date fields
additionalFields array Optional
- List if fields to receive in response.
- potential values "email", "phone", "birthday"
Response
Returns json object
success: boolean
message: (if success is false)indicates reason for request not being successful
searchResults: (if success is true) List of users containing name, documentReviewUrl, businessId, signedAt, email, phone, birthday
- name: first and last name of submitter
- documentReviewUrl: url to view fill in document of the submitter
- businessId: id of the business the document belongs to
- signedAt: the date and time the user submitted the document
- email: only present if specified in additionalFields
- phone: only present if specified in additionalFields
- birthday: only present if specified in additionalFields