Bridge Levels REST API
Endpoints for reading the active subscription plugin’s membership levels for a show, and for reading and setting each mapped level’s signup page. Useful for add-ons that need to populate a tier picker without going through the bridge directly.
GET /benecaster/v1/bridge/levels
Returns all membership levels available from the active bridge for a specific show.
Auth: manage_options + X-WP-Nonce
Parameters:
| Param | Type | Required | Description |
|---|---|---|---|
show_id |
int | Yes | Show to query bridge levels for |
Response:
{
"levels": [
{ "id": 1, "name": "Gold Member" },
{ "id": 2, "name": "Silver Member" },
{ "id": 3, "name": "Free" }
]
}
When no bridge is configured for the show, the endpoint returns an empty array:
{
"levels": []
}
Errors:
| Code | HTTP | Condition |
|---|---|---|
show_not_found |
404 | show_id does not exist |
invalid_param |
400 | show_id missing or not an integer |
Notes:
idvalues correspond to the bridge’s external tier identifier — the same values used when configuring tier mappings inPOST /shows/{id}/tiers.- The response reflects what
BridgeManager::get_active_bridge()->get_all_tiers()returns at call time. If the active bridge cannot connect to the membership plugin, it returns an empty levels array rather than an error. - Levels are not filtered or sorted — they are returned in the order the bridge provides them.
- Add-ons that present a tier picker should call this endpoint rather than calling
get_all_tiers()directly — the REST layer applies nonce verification and permission checks that a direct PHP call skips.
GET /benecaster/v1/bridge/signup-pages
Returns the signup page for each mapped membership level — where [benecaster_subscribe]‘s Subscribe button sends a visitor. This is what Show Settings → Subscription → Signup pages reads.
Auth: manage_options + X-WP-Nonce
Parameters:
| Param | Type | Required | Description |
|---|---|---|---|
show_id |
int | Yes | Show to read signup pages for |
Response:
{
"plugin_slug": "paid-memberships",
"site_host": "example.com",
"levels": [
{
"level_id": "2",
"level_name": "Gold Monthly",
"tier_slug": "supporter",
"tier_name": "Supporter",
"is_free": false,
"suggested_url": "https://example.com/checkout/?level=2",
"url": ""
}
]
}
levelsholds the active membership plugin’s levels that are mapped to a tier, leaving out levels mapped to a public tier. It is empty on a show using built-in membership or no membership plugin.suggested_urlis the page worked out from the plugin’s settings, ornullwhen there is none.urlis the page the podcaster entered, or""when they have not entered one. The button usesurlwhen it is set and on this site, otherwisesuggested_url, otherwise there is no button.site_hostis this site’s domain — the only host a signup page may use.
Errors:
| Code | HTTP | Condition |
|---|---|---|
invalid_show_id |
400 | show_id missing or not a positive integer |
PUT /benecaster/v1/bridge/signup-pages
Confirms or replaces signup pages, per level.
Auth: manage_options + X-WP-Nonce
Body:
{
"show_id": 3,
"urls": {
"2": "https://example.com/join-gold/",
"5": ""
}
}
urlsmaps a level ID to an address. A level left out is untouched; an empty string clears it back to the suggestion.- Only addresses on this site are accepted — the host must match the site’s exactly, so a subdomain is refused. One off-site address refuses the whole save; nothing is stored.
- Response: the same shape as
GET, after the save.
Errors:
| Code | HTTP | Condition |
|---|---|---|
invalid_show_id |
400 | show_id missing or not a positive integer |
no_active_bridge |
400 | The show does not use a membership plugin |
invalid_urls |
400 | urls is not an object of level IDs to addresses |
benecaster_signup_page_off_site |
400 | An address is not on this site. data.level_ids lists the levels that were refused |
Relationship to other endpoints:
To read the tier mappings Benecaster has already configured for a show (mapping external bridge levels to Benecaster internal tiers), use GET /shows/{id}/tiers. Use GET /bridge/levels to read what the bridge has available; use GET /shows/{id}/tiers to read what’s been mapped.
See Also
Need this built rather than just documented? See our services →