← Back to DocsAPI Reference

REST API Reference

Complete reference for PaywallOS API endpoints.

Check Verb Access

POST/api/openverb/check

Description

Check if a user has access to perform a specific verb action.

Request Body

{
  "verbId": "export_data",
  "userId": "user_123",
  "appId": "app_456"
}

Response

{
  "allowed": true,
  "userTier": "pro",
  "message": "Access granted",
  "usageLimit": {
    "limit": 100,
    "used": 45,
    "remaining": 55,
    "resetAt": "2024-01-01T00:00:00Z"
  }
}

Get Verb Library

GET/api/openverb/library

Description

Retrieve the complete OpenVerb library for your app.

Query Parameters

?appId=app_456

Response

{
  "namespace": "myapp.core",
  "version": "1.0.0",
  "verbs": [
    {
      "id": "verb_789",
      "name": "export_data",
      "category": "file_system",
      "description": "Export user data to CSV"
    }
  ]
}

Get User Entitlements

GET/api/openverb/entitlements

Description

Get all verbs a user is entitled to access based on their tier.

Query Parameters

?userId=user_123&appId=app_456

Response

{
  "userId": "user_123",
  "tier": "pro",
  "entitlements": [
    {
      "verbId": "export_data",
      "verbName": "export_data",
      "usageLimit": {
        "limit": 100,
        "used": 45,
        "period": "monthly"
      }
    }
  ]
}

Authentication

All API requests require authentication using your API key in the Authorization header:

Authorization: Bearer pk_live_...

Rate Limits

Free tier:1,000 requests/month
Pro tier:100,000 requests/month
Enterprise tier:Unlimited

React SDK

The React SDK provides components and hooks for easy integration:

import { 
  PaywallOSProvider,
  usePaywallOS 
} from '@paywallos/sdk'

// In your component
const { checkVerb, userTier } = usePaywallOS()

const canExport = await checkVerb('export_data')

Need help?

Check out our examples or contact support for assistance.