Build on Petanque Life
Integrate your systems with the Petanque Life platform using our RESTful API.
Quick Start
1. Get Your API Credentials
Request M2M credentials from your federation administrator or contact our team.
curl -X POST https://api.petanque.life/auth/token \
-H "Content-Type: application/json" \
-d '{"client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_SECRET"}' 2. Make Your First Request
Use your access token to query the API. All requests require a valid tenant ID.
curl https://api.petanque.life/v1/competitions \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Tenant-ID: YOUR_TENANT_ID" 3. Explore the Response
Responses follow a consistent format with cursor-based pagination for list endpoints.
{
"data": [
{
"id": "comp_abc123",
"name": "Regional Championship 2026",
"format": "swiss",
"status": "registration_open",
"start_date": "2026-05-15T09:00:00Z"
}
],
"pagination": {
"cursor": "eyJpZCI6ImNvbXBfYWJjMTIzIn0=",
"has_more": true
}
} API Reference
REST API Reference
Interactive OpenAPI documentation with request/response examples for every endpoint.
Open docsAuthentication
JWT ES512 tokens, OAuth2 flows, M2M credentials, and multi-tenant authentication patterns.
Coming soonWebhooks
Receive real-time notifications when events occur — competition results, license changes, member updates.
Coming soonSDKs & Libraries
Official client libraries for Python, TypeScript/JavaScript, and .NET.
Coming soonRate Limiting
Understand rate limits, quota tiers, burst allowances, and best practices.
Coming soonError Handling
Standardized error responses, HTTP status codes, error codes, and troubleshooting.
Coming soonKey Concepts
Multi-Tenant Architecture
Every API request is scoped to a tenant. Include the X-Tenant-ID header. Data is fully isolated between tenants.
Authentication & Authorization
The API uses JWT ES512 tokens. User tokens via OAuth2 flows; M2M tokens via client credentials.
Cursor-Based Pagination
List endpoints use cursor-based pagination. Default page size 25, maximum 100.
Petanque data, served as APIs
Authoritative feeds for regulators, researchers, insurers and analytics teams. All four products share one OAuth client-credentials gateway, signed payloads and a versioned schema contract.
Integrity feed
Betting operators · regulators
Real-time competition events, sanctions and license eligibility — ed25519-signed, replay-safe, with SSE streaming and 30-second eligibility cache.
Research API
Universities · sport-science institutes
Anonymised cohorts with k=5 cell suppression, ethics-committee approval workflow, dataset versioning and consent-version per record.
Insurance snapshots
Underwriters · brokers
Monthly and quarterly aggregated exposure snapshots — NUTS-2 region granularity, weather joins, immutable once frozen.
GraphQL analytics
BI teams · partner platforms
Federation-wide analytics over a typed GraphQL schema. Per-tier query complexity budget, field-level scope gating, full schema introspection.
Ready to Build?
Get API credentials and start building your integration today.