Skip to main content
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

The client uses 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 inside definition.
See Form definitions, Block types, and Theme tokens for the complete accepted schema.

Add and remove blocks

Versioned form and block operations return a VersionedResponse. Pass its ETag back with ifMatch when editing blocks.
Use replaceAll($formId, $blocks, $ifMatch) to atomically replace the complete ordered block collection.

Update a form

Cursor pagination

Other resources

Handle errors