This guide will get you up and running with the Royalti.io API quickly. You’ll learn how to authenticate, make your first API call, and explore core functionality.Documentation Index
Fetch the complete documentation index at: https://apidocs.royalti.io/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, you’ll need:- A Royalti.io account (sign up here)
- API access credentials
- A tool to make HTTP requests (cURL, Postman, or your preferred programming language)
Security Requirements
We support TLSv1.2 and later versions. Ensure your client supports modern encryption standards.Step 1: Get Your Access Token
Login to get refresh token
Send your credentials to the login endpoint:This returns a
cURL
refresh_token and list of your workspaces.Exchange refresh token for access token
Use the refresh token to get an access token for your workspace:This returns an
cURL
access_token that you’ll use for all subsequent API calls.Access tokens expire after 6 hours. Refresh tokens expire after 1 day. See the Authentication guide for token lifecycle management.
Step 2: Make Your First API Call
Let’s retrieve your user information:Step 3: Common Operations
Create a New Artist
Query Artists with Filters
Pagination, Sorting & Filtering
Most endpoints support these query parameters:| Parameter | Type | Description | Default |
|---|---|---|---|
q | string | Global search across multiple fields | None |
page | number | Page number for pagination | 1 |
size | number | Items per page | 10 |
order | string | Sort order: ‘asc’ or ‘desc' | 'desc’ |
sort | string | Field to sort by | ’updatedAt’ |
attributes | string | Comma-separated fields to return | All |
statistics | boolean | Include statistical data | false |
Endpoint-Specific Filters
Artists:user- Filter by user ID(s), comma-separatedcatalog- Filter by catalog
artist- Filter by artist ID(s), comma-separatedtype- Filter by asset typesplits- Include splits information
artist- Filter by artist ID(s), comma-separatedtype- Filter by product typesplits- Include splits information
Response Format
All API responses follow this structure:Error Handling
The API uses standard HTTP status codes:| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - invalid parameters or validation failure |
| 401 | Unauthorized - invalid or expired token |
| 404 | Not Found - endpoint or entity doesn’t exist |
| 500 | Internal Server Error |
Error Response Format
Best Practices
Performance Optimization
- Use the
attributesparameter to limit response payload size - Implement proper pagination for large datasets
- Cache responses where appropriate
- Use
statistics=falseunless statistical data is needed
Error Handling
- Always check HTTP status codes
- Implement retry logic for 5xx errors
- Validate input data before sending requests
- Handle rate limiting gracefully
Security
- Never expose access tokens in client-side code
- Use HTTPS for all requests
- Validate SSL certificates
- Rotate access tokens regularly
Next Steps
Now that you’ve made your first API calls, explore:- Authentication Reference - Complete guide to all authentication methods
- API Reference - Comprehensive endpoint documentation
- Artist Management - Deep dive into artist and catalog management
- Payment Processing - Handle financial transactions and distributions
Support
Need help? We’re here for you:- Full API Documentation
- Support Center
- API Status Page