All endpoints are under the namespace formforge/v1. Admin endpoints require manage_options capability. Authentication uses WordPress nonces or application passwords.
Authentication
There are two authentication methods depending on whether the request originates from the browser (admin panel JavaScript) or an external tool.
Application passwords (recommended for external tools, CLI scripts, and third-party integrations):bash
# Using application passwords
curl -s -u "admin:XXXX XXXX XXXX XXXX"
https://example.com/wp-json/formforge/v1/formsjavascript
// Using nonce from the admin page
fetch( formforgeAdmin.restUrl + '/forms', {
headers: { 'X-WP-Nonce': formforgeAdmin.restNonce }
} )
.then( r => r.json() )
.then( data => console.log( data ) );javascript
// jQuery with cookie auth — nonce is still required
jQuery.ajax( {
url: formforgeAdmin.restUrl + '/forms',
method: 'GET',
beforeSend: function( xhr ) {
xhr.setRequestHeader( 'X-WP-Nonce', formforgeAdmin.restNonce );
},
success: function( data ) {
console.log( 'Forms:', data );
}
} );Error Response Format
All error responses follow a consistent structure:
json
{
"code": "error_code",
"message": "Human-readable error description.",
"data": { "status": 403 }
}Common error codes:
| Code | HTTP Status | Description |
|---|---|---|
rest_forbidden | 403 | Missing manage_options capability |
not_found | 404 | Form or submission does not exist |
pro_only | 403 | Endpoint requires PRO license |
invalid_param | 400 | Missing or invalid parameter |
rest_no_route | 404 | Endpoint does not exist |
Endpoint Summary Table
| Method | Endpoint | Auth | Plan | Description |
|---|---|---|---|---|
| GET | /forms | manage_options | Free | List all forms |
| GET | /forms/{id} | manage_options | Free | Get single form |
| POST | /forms | manage_options | Free | Create form |
| PUT | /forms/{id} | manage_options | Free | Update form |
| DELETE | /forms/{id} | manage_options | Free | Delete form + data |
| POST | /forms/{id}/submit | Public (AJAX) | Free | Submit form |
| GET | /submissions/{form_id} | manage_options | Free | List submissions |
| GET | /analytics/{form_id} | manage_options | PRO | Get form analytics |
| POST | /generate | manage_options | PRO | AI form generation |
| GET | /templates | Public | Free | List templates |
| GET | /templates/categories | Public | Free | List template categories |
| POST | /stripe/webhook | Stripe HMAC | PRO | Stripe event handler |
—