[Documentation](https://groundhogg.io/documentation/) » [Action Hooks](https://groundhogg.io/documentation/#doc-action-hooks)

# groundhogg/steps/benchmarks/api

Published Wednesday, June 10, 2026 · Last updated Wednesday, June 10, 2026

Fires when `do_api_benchmark()` is called, allowing extensions to hook into any API benchmark trigger fired anywhere in the system.

```

do_action( 'groundhogg/steps/benchmarks/api', $call_name, $id_or_email, $by_user_id );
```

You will receive the benchmark call name string, the contact identifier (email or ID), and a boolean indicating whether the identifier is a WordPress user ID.

## Example

```

add_action( 'groundhogg/steps/benchmarks/api', 'my_extension_log_benchmark_trigger', 10, 3 );

/**
 * Log every API benchmark trigger for debugging.
 *
 * @param string     $call_name
 * @param string|int $id_or_email
 * @param bool       $by_user_id
 *
 * @return void
 */
function my_extension_log_benchmark_trigger( $call_name, $id_or_email, $by_user_id ) {
    my_extension_debug_log( sprintf(
        'Benchmark "%s" triggered for %s',
        $call_name,
        $id_or_email
    ) );
}
```
