formcierge_rest_form_created
Action

Since v1.0.0

Fires after a new form is created via the REST API. Useful for audit logging or automatically associating new forms with a project or group.

Parameters
$form_id int The ID of the newly created form.
$data array The form data array that was saved.
Defined in
includes/API/FormsEndpoint.php
add_action( 'formcierge_rest_form_created', function ( $form_id, $data ) {
    my_audit_log( 'form_created', $form_id, get_current_user_id() );
}, 10, 2 );