Services
PackRelay
PackRelay/WPForms contact form API integration.
PackRelay
PackRelay is a WordPress plugin that bridges mobile app contact forms to WPForms. It accepts form submissions via REST API and validates them with Firebase App Check tokens.
How It Works
- The app collects form data and a Firebase App Check token
- Data is sent to the PackRelay REST endpoint
- PackRelay validates the App Check token with Firebase
- If valid, PackRelay submits the data to WPForms
- WPForms processes the submission (sends email, stores entry)
API Endpoint
POST {PACKRELAY_API_URL}/submit/{FORM_ID}Request
{
"fields": {
"1": "First Name",
"2": "Last Name",
"3": "email@example.com",
"4": "555-0123",
"5": "Message body"
},
"app_check_token": "eyJhbGciOi..."
}The fields object maps WPForms field IDs to values. Field IDs are configured in the WPForms form builder.
Response
Success:
{
"success": true,
"message": "Form submitted successfully"
}Error:
{
"success": false,
"message": "Validation failed: invalid App Check token"
}Environment Variables
| Variable | Description |
|---|---|
EXPO_PUBLIC_PACKRELAY_API_URL | Base URL (e.g. https://example.com/wp-json/packrelay/v1) |
EXPO_PUBLIC_PACKRELAY_FORM_ID | WPForms form ID |