post
https://www.pelcro.com/api/v1/core/memberships/ip/authorization
Check if an IP address has access to any membership subscriptions.
Overview
Use this endpoint to check if a visitor's IP address is authorized for access through a membership subscription. This is how you implement server-side paywalls for institutional customers like libraries, universities, and corporations.
Example: A visitor from IP address 128.112.45.67 requests your premium content. Your server calls this endpoint to check if that IP is authorized. If subscriptions are returned, the visitor has access. If not, show the paywall.
How IP Matching Works
The endpoint checks if the provided IP falls within any configured IP range on membership subscriptions. Supported formats:
| Format | Example | What It Matches |
|---|---|---|
| Single IP | 192.168.1.100 | Exactly that IP |
| CIDR notation | 128.112.0.0/16 | 128.112.0.0 through 128.112.255.255 |
| IPv6 | 2001:db8::/32 | All IPs in that IPv6 block |
Only subscriptions with type set to membership and a non-empty ip_addresses field are checked.
Related Endpoints
- Memberships - Overview of the memberships API
