API & Developer

Integrate WEIR licensing verification into your applications.

WEIR Developer API

The WEIR API allows developers to integrate license verification, identity lookup, and mention monitoring into their own applications. Use the API to verify whether content is licensed, look up license details, or receive webhooks when license status changes.

API access is available on Studio plans and above. Each plan includes different rate limits and capabilities.

Full API documentation: developers.weir.ai

Getting Started

  1. Ensure you have a Studio plan or higher (API access is not available on lower tiers)
  2. Navigate to Settings → Developers
  3. Click "Create API Credential" to generate a new key pair
  4. Give your credential a descriptive name (e.g., "Production Backend")
  5. Select the scopes you need (license:read, license:verify, mentions:read, etc.)
  6. Copy and securely store your API key and secret (the secret is shown only once)
  7. Use the API key in your Authorization header as a Bearer token

Security: Never expose your API secret in client-side code. API calls should be made from your server, not from browsers.

API Capabilities

  • License Verification
    Verify if content usage is covered by a valid WEIR license. Returns license status, terms, and coverage details.
    GET /v1/licenses/{id}/verify
  • License Lookup
    Retrieve license details including title, description, terms, pricing, and images.
    GET /v1/licenses/{id}
  • Identity Search
    Search for licensed identities by name, handle, or other attributes.
    GET /v1/search?q={name}
  • Webhooks
    Receive real-time notifications when licenses are created, updated, revoked, or when new mentions are detected.
    POST /v1/webhooks (to register)

Authentication

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

curl -X GET "https://api.weir.ai/v1/licenses/abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Note: API keys are tied to your account and inherit your permissions. A key can only access data you have permission to view.

Rate Limits

Rate limits vary by plan and are applied per API credential:

Plan Requests/min Requests/day
Studio 60 10,000
Enterprise 300 100,000
Custom Negotiated Negotiated

Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.

Webhook Events

Configure webhooks to receive real-time notifications:

  • license.created - New license published
  • license.updated - License details changed
  • license.revoked - License unpublished or deleted
  • mention.detected - New mention found for a license
  • subscription.started - Someone subscribed to a license
  • subscription.ended - Subscription cancelled or expired

Tip: Webhook payloads are signed with your webhook secret. Always verify signatures before processing events.

SDKs & Libraries

Official SDKs are available to simplify integration:

  • JavaScript/TypeScript: npm install @weir/sdk
  • Python: pip install weir-sdk
  • REST API: Direct HTTP calls for any language

Community libraries for other languages may be available on GitHub. Check the developer portal for the latest.

Error Handling

The API returns standard HTTP status codes and JSON error responses:

{
  "error": {
    "code": "license_not_found",
    "message": "No license exists with the specified ID",
    "status": 404
  }
}
  • 400: Bad request (invalid parameters)
  • 401: Unauthorized (missing or invalid API key)
  • 403: Forbidden (insufficient permissions)
  • 404: Resource not found
  • 429: Rate limit exceeded
  • 500: Server error (retry with backoff)