API Documentation

    Serve schema and manage pages from your server.

    Getting Started

    The v2 API lists and selects pages, starts schema generation and serves JSON-LD. Every call needs an API key.

    Authentication

    All API requests must include your API key in the Authorization header using the Bearer scheme:

    Terminal
    curl -H "Authorization: Bearer YOUR_API_KEY" \
      https://brandop.ai/api/v2/pages
    Security Note: Keep your API keys secret. Never commit them to version control or expose them in client-side code.

    Base URL

    Text
    https://brandop.ai/api/v2

    API Endpoints

    Complete REST API reference - All endpoints use API key authentication

    Pages

    GET/pages

    List all pages for the workspace (automatically determined from API key)

    Query params: page, limit, activeOnly

    POST/pages

    Create a new page manually.

    JSON
    {
      "urlPath": "/new-page"
    }
    PATCH/pages

    Select or deselect a page for schema delivery. A deselected page stops at once.

    JSON
    {
      "urlPath": "/about",
      "isSelectedForSchema": true
    }

    Schemas

    GET/schema?urlPath=/about

    Get the latest schema for a page by URL path. Send the path without a trailing slash. Query strings are ignored. A new page returns schema null until its first generation finishes. A regenerated page keeps the previous schema until the new one is ready. Brandop caches each schema for up to one hour. A new generation, an edit or a restore clears the cache.

    POST/schema/process

    All-in-one endpoint: creates the page if needed, crawls it if there is no HTML, generates schema and selects the page for delivery. A page with a manual edit starts no job.

    JSON
    {
      "urlPath": "/about"
    }

    Analytics

    GET/analytics

    Get schema delivery stats: total requests, requests this week, active pages, unique paths, the last 7 days and the top 10 paths.

    Jobs

    POST/jobs/stop

    Cancels every pending and running job in the workspace: crawls, schema generation, AI visibility scans and Content Studio jobs. Pages with no schema yet are deselected. Returns the count and details of the stopped jobs. Use it with care.

    Response: stoppedCount, jobs[] (id, type, previousStatus)

    Response Format

    All API responses follow this format:

    Success Response:
    {
      "success": true,
      "data": { ... }
    }
    Error Response:
    {
      "error": "Error message here"
    }

    Rate Limiting

    API requests are rate limited per workspace in a one-minute window. The limit depends on your plan. See the plan limits on the technical docs page.

    Rate limit information is included in response headers:

    HTTP
    X-RateLimit-Limit: 1000
    X-RateLimit-Remaining: 999
    X-RateLimit-Reset: 1640000000

    Rate limits per plan and the status codes of each endpoint are in Technical docs. Full responses are in the Quickstart.

    Example Requests

    Complete examples using cURL

    Terminal
    # List all pages for the workspace (determined by API key)
    curl -X GET https://brandop.ai/api/v2/pages \
      -H "Authorization: Bearer YOUR_API_KEY"
    
    # List only active pages (with schema enabled)
    curl -X GET "https://brandop.ai/api/v2/pages?activeOnly=true" \
      -H "Authorization: Bearer YOUR_API_KEY"
    
    # Create a new page manually
    curl -X POST https://brandop.ai/api/v2/pages \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "urlPath": "/new-page"
      }'
    
    # Select a page for schema delivery (a deselected page stops at once)
    curl -X PATCH https://brandop.ai/api/v2/pages \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "urlPath": "/about",
        "isSelectedForSchema": true
      }'
    
    # Get schema for a page by URL path (no trailing slash; query strings are ignored)
    curl -X GET "https://brandop.ai/api/v2/schema?urlPath=/about" \
      -H "Authorization: Bearer YOUR_API_KEY"
    
    # Process schema (all-in-one: create page + crawl + generate + activate)
    # A page with a manual edit starts no job (hasCustomSchema: true)
    curl -X POST https://brandop.ai/api/v2/schema/process \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "urlPath": "/about"
      }'
    
    # Get schema delivery analytics
    curl -X GET https://brandop.ai/api/v2/analytics \
      -H "Authorization: Bearer YOUR_API_KEY"
    
    # Cancel every pending and running job in the workspace (crawls, schema,
    # AI visibility scans, Content Studio). Pages with no schema yet are deselected.
    curl -X POST https://brandop.ai/api/v2/jobs/stop \
      -H "Authorization: Bearer YOUR_API_KEY"

    Best Practices

    • Store API keys securely in environment variables
    • Implement exponential backoff for rate limit errors (429)
    • Use urlPath parameter to identify pages (not internal IDs)
    • Rotate API keys regularly for security
    • The workspace is set by your API key

    HTTP Status Codes

    StatusDescription
    200Success
    201Created. Returned when a page is added or a processing job starts.
    400Bad request. A parameter is missing or invalid.
    401Unauthorized. The API key is missing or invalid. Other v2 routes also return 401 when the plan has no API access or the workspace is inactive.
    403Forbidden. Returned by GET /api/v2/schema when the plan has no API access or the workspace is inactive.
    404Not found. On GET /api/v2/schema: the page does not exist or is not selected for schema.
    409Conflict. The page already exists.
    429Too many requests. The per-minute rate limit is exceeded.
    500Internal server error.
    API Documentation | Brandop