---
title: Filter whether SEOPress abilities are exposed over the REST API
url: "https://www.seopress.org/support/hooks/filter-whether-seopress-abilities-are-exposed-over-the-rest-api/"
lang: en-US
updated: 2026-06-16
hook_name: seopress_abilities_api_rest_enabled
required_version: 10.0
---

# Filter whether SEOPress abilities are exposed over the REST API

- **Hook name:** `seopress_abilities_api_rest_enabled`
- **Required version:** 10.0

```php
add_filter( 'seopress_abilities_api_rest_enabled', 'sp_abilities_api_rest_enabled', 10, 1 );
function sp_abilities_api_rest_enabled( $enabled ) {
	// Expose the SEOPress abilities over REST only on staging.
	if ( 'staging' === wp_get_environment_type() ) {
		return true;
	}

	return $enabled;
};
```

Source: [https://gist.github.com/wp-seopress/246738c7c9896e4b99e1dedd3d65675f](https://gist.github.com/wp-seopress/246738c7c9896e4b99e1dedd3d65675f)



