|
/ Docs /Presto Capture/ Presto Capture for Developers: REST API and PHP Filters

Presto Capture for Developers: REST API and PHP Filters

Building Presto Capture into a client site? You can change how it looks and behaves with PHP filters, and work with recordings through the REST API. This page lists what you can change and where to add your code.

Applies to: Presto Capture 1.0.0 and above.

Before You Begin

  • Some comfort with PHP and WordPress hooks.
  • A child theme or a code snippets plugin to hold your code. Don’t edit the plugin files, because updates will overwrite them.

What You Can Change with Filters

AreaWhat you can changeFilter
BrandingAccent colour, logo, product name, font and the brand header[filter name to confirm]
Rate limitsUploads per hour for logged-out visitors (default 10) and logged-in users (default 60)[filter name to confirm]
Upload sizeThe largest file allowed for Media Library uploads[filter name to confirm]
Admin permissionsWhich user roles can see the Dashboard, Recordings and Settings[filter name to confirm]

How to Add a Filter

  1. Open your child theme’s functions.php file, or add a new snippet in your snippets plugin.
  2. Paste the filter code.
  3. Save the file or snippet.
  4. Test the change on a staging site before you use it on a live site.

Example: Raise the Upload Limit for Logged-Out Visitors

This is useful when a form has several video questions, and visitors hit the 10-uploads-per-hour limit.

// [Example to confirm with the dev team]

add_filter( ‘[filter name]’, function ( $limit ) {

    return 25;

} );

REST API

Presto Capture has a REST API for working with recordings from your own code.

[Endpoint list to confirm with the dev team: base route, available endpoints, what each one returns, and how requests are authenticated.]

Note: Recording uploads use signed tokens tied to the recorder that created them. Each token is valid for 2 hours. Keep this in mind if you build your own upload flow.

Good to Know

  • Settings changes apply to new blocks only. Filters run on every request, so they affect existing recorders too.
  • Raising rate limits lowers your spam protection. Raise them only as much as you need.

The filters and REST API above cover most client customisations. If you need a hook that isn’t listed here, tell us what you’re building.

If you have any questions or need further help, feel free to reach out to our support team. We’re always happy to help!

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
Table of Contents