onlyform/onlyform-php is the official PHP 8.1+ package. It has no third-party runtime dependencies and includes a cURL transport.
The current release targets API contract 2026-08-01.
Install
Configure the client
https://api.onlyform.com by default. Use the optional baseUrl constructor argument only for private development environments.
Create a complete form
The create call accepts blocks, settings, and theme tokens insidedefinition.
Add and remove blocks
Versioned form and block operations return aVersionedResponse. Pass its ETag back with ifMatch when editing blocks.
replaceAll($formId, $blocks, $ifMatch) to atomically replace the complete ordered block collection.