Create a test keyopenapi.v1.yaml
Rights API
Examples use vk_test_EXAMPLE. A signed-in reader sees their own test key. The SDK sets Idempotency-Key and retries 429, 409 idempotency_key_in_use, and 5xx with that same key.
Step 1
Create a test key
curl -X POST https://www.valaritasports.com/v1/sandbox/signup \
-H "Valaritas-Version: 2026-11-02" \
-H "Idempotency-Key: signup-1" \
-H "Content-Type: application/json" \
-d '{"email":"dev@example.test","name":"Example Brand"}'
import Valaritas from '@valaritas/node';
const issued = await Valaritas.signup({
email: 'dev@example.test',
name: 'Example Brand',
});
const valaritas = new Valaritas(issued.secret);
Step 2
List athletes
curl https://www.valaritasports.com/v1/athletes \ -H "Authorization: Bearer vk_test_EXAMPLE" \ -H "Valaritas-Version: 2026-11-02"
const athletes = await valaritas.athletes.list(); const athlete = athletes.data.find((row) => row.id === 'ath_test_clears');
Step 3
Clear a use
curl -X POST https://www.valaritasports.com/v1/clearances \
-H "Authorization: Bearer vk_test_EXAMPLE" \
-H "Valaritas-Version: 2026-11-02" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"athlete":"ath_test_clears","use":"ad","category":"Telecom","territory":"US","channel":"social"}'
const clearance = await valaritas.clearances.create({
athlete: 'ath_test_clears',
use: 'ad',
category: 'Telecom',
territory: 'US',
channel: 'social',
});
Step 4
Quote
curl -X POST https://www.valaritasports.com/v1/quotes \
-H "Authorization: Bearer vk_test_EXAMPLE" \
-H "Valaritas-Version: 2026-11-02" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"athlete":"ath_test_clears","brand_name":"Northwind","offering":"Running shoes for road races","domain":"northwind.com","objective":"Launch the spring shoe","qualification_budget_cents":250000}'
const quote = await valaritas.quotes.create({
athlete: 'ath_test_clears',
brand_name: 'Northwind',
offering: 'Running shoes for road races',
domain: 'northwind.com',
objective: 'Launch the spring shoe',
qualification_budget_cents: 250000
});
Step 5
Request a licence
curl -X POST https://www.valaritasports.com/v1/licenses \
-H "Authorization: Bearer vk_test_EXAMPLE" \
-H "Valaritas-Version: 2026-11-02" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"athlete":"ath_test_clears","quote":"quo_EXAMPLE"}'
const license = await valaritas.licenses.create({
athlete: 'ath_test_clears',
quote: quote.id,
});
Step 6
Read license.approved
curl https://www.valaritasports.com/v1/events \ -H "Authorization: Bearer vk_test_EXAMPLE" \ -H "Valaritas-Version: 2026-11-02"
const events = await valaritas.events.list(); const approved = events.data.find((event) => event.type === 'license.approved');
Match a brand brief
POST /v1/matches ranks licensed adult athletes by audience, sport, region, measured engagement and the pricing engine’s price. Send a live organization key; restricted keys need matches:write. The brief uses the same fields and licence checks as the brand dashboard.
GET /v1/matches/{id} reads your organization’s shortlist with matches:read. POST /v1/matches/{id}/book takes athlete_id, expected_price_cents, expected_terms_version and expected_signature_id from the shortlist, rechecks eligibility, price and terms, and returns a booking brief. Continue in the brand dashboard to review the terms and pay. A changed price, changed licence or blocked category refuses the booking. Every POST requires an Idempotency-Key.
The athlete signs one licence and approves the brands. A shortlist never grants rights or records payment.
Sandbox athlete ath_test_clears clears, then license.approved is available from GET /v1/events after 2 seconds. The API does not approve the licence.
Signed receipts
Every recorded use returns a receipt: the use, the licence, the athlete, your organization and key, the terms version and the time, signed with Ed25519. The athlete signs one licence and approves the brands; the receipt proves each use under it.
curl -X POST https://www.valaritasports.com/v1/receipts/verify \ -H "Content-Type: application/json" \ -d @receipt.json
GET /v1/receipts/public_key publishes the public key, so you can also verify offline: the signature covers the payload as JSON with sorted keys and no whitespace. receipt_status is not_configured when no receipt was issued.