Veristiq
How It WorksPricingComplianceDocs
Sign In
Veristiq
How It WorksPricingComplianceDocs
Sign In

API Reference

Complete documentation for the Veristiq REST API. Manage competitions, process entries, and verify results programmatically.

Getting Started

  • Authentication

Competitions

  • POST
    Create competition
  • GET
    Get competition
  • PUT
    Update competition
  • POST
    Close competition
  • GET
    Get stats

Entries

  • POST
    Submit entry
  • POST
    Submit free entry
  • DELETE
    Void entry

Draws

  • POST
    Trigger draw
  • GET
    Get audit logs

Compliance

  • GET
    Get compliance
  • POST
    Log complaint

Webhooks

  • POST
    Create webhook
  • GET
    List webhooks

Authentication

The API uses Bearer Token authentication. You must send your API key in the Authorization header of every request.

Authorization: Bearer caas_live_8923n98...

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Competitions

POST

Create Competition

POST/api/v1/operator/competitions

Creates a new competition instance. Returns the created competition object with a UUID.

ParameterTypeDescription
external_id *stringYour unique identifier for this competition.
name *stringPublic name/title of the competition.
max_tickets *integerTotal available tickets.
draw_at *timestampScheduled draw time (ISO 8601 format).
prizes *arrayArray of prizes for this competition (minimum 1 prize required).
prizes[].external_id *stringYour unique identifier for this prize within the competition.
prizes[].name *stringName/title of the prize.

Example Request

{
    "id": "956774e8-9835-4c54-9eb2-ce099db4e5f0",
    "external_id": "APPLE_PRODUCTS",
    "name": "Apple Mega Giveaway",
    "max_tickets": 1000,
    "draw_at": "2025-12-25T12:00:00Z",
    "prizes": [
        {
        "external_id": "MACBOOK",
        "title": "Macbook Pro"
        },
        {
        "external_id": "IPAD", 
        "title": "iPad Air"
        },
        {
        "external_id": "IPHONE17PRO",
        "title": "iPhone 17 Pro"
        }
    ]
}
GET

Get Competition

GET/api/v1/operator/competitions/{external_id}

Retrieves details and current status of a competition by your external ID. Includes all prizes with their draw status.

{
    "id": "956774e8-9835-4c54-9eb2-ce099db4e5f0",
    "name": "Apple Products",
    // ... competition details
}
PUT

Update Competition

PUT/api/v1/operator/competitions/{external_id}

Updates an existing competition's details. Prize modifications are only allowed when status is 'pending' or 'active', and prizes that have been drawn cannot be deleted.

ParameterTypeDescription
external_id *stringYour unique identifier for this competition.
name *stringPublic name/title of the competition.
max_tickets *integerTotal available tickets.
draw_at *timestampScheduled draw time (ISO 8601 format).
prizes *arrayArray of prizes for this competition (minimum 1 prize required).
prizes[].external_id *stringYour unique identifier for this prize within the competition.
prizes[].name *stringName/title of the prize.

Example Request

{
        "external_id": "SAMSUNG_PRODUCTS",
        "name": "Samsung Products",
        "max_tickets": 20000,
        "draw_at": "2026-01-01 11:00:00",
        "prizes": [
            {
                "external_id": "GALAXY_TAB_11",
                "title": "Galaxy Tab 11"
            }
        ]
    }
POST

Close Competition

POST/api/v1/operator/competitions/{external_id}/close

Closes the competition to new entries, preparing it for the draw.

{
        "id": "956774e8-9835-4c54-9eb2-ce099db4e5f0",
        "status": "awaiting_draw",
        // ...
    }
GET

Get Competition Stats

GET/api/v1/operator/competitions/{external_id}/stats

Retrieves statistics including total entries, revenue estimates, and remaining tickets.

{
        "competition_id": "956774e8-9835-4c54-9eb2-ce099db4e5f0",
        "total_entries": 1250,
        "revenue_estimated": 12500.00,
        "tickets_sold": 1250,
        "tickets_remaining": 750,
        "percentage_sold": 62.5
    }

Entries

POST

Submit Paid Entry

POST/api/v1/operator/competitions/{competition_external_id}/entries

Registers a paid entry for a user. Returns the assigned ticket number(s).

ParameterTypeDescription
external_id *stringYour unique transaction/entry ID.
user_reference stringUser identifier (hashed/masked recommended for privacy).
eligible *booleanWhether this entry should be entered into the final draw. Only entries with true are eligible for the draw.
POST

Submit Free Entry

POST/api/v1/operator/competitions/{competition_external_id}/free-entries

Registers a postal or promotional entry. These are tracked separately for compliance reporting.

ParameterTypeDescription
external_id *stringYour unique transaction/entry ID.
user_reference *stringIdentifier for the user submitting the free entry.
reason stringReason for free entry (e.g., 'postal', 'promotional', 'compensation').
eligible *booleanWhether this entry should be entered into the final draw. Only entries with true are eligible for the draw.
DELETE

Void Entry

DELETE/api/v1/operator/competitions/{competition_external_id}/entries/{entry_external_id}

Voids a previously submitted entry. This action is recorded in the audit log.

ParameterTypeDescription
reason stringReason for cancellation. Must be one of: refund, cancellation, duplicate, fraud, other
notes stringAdditional information.

Draws

POST

Trigger Draw

POST/api/v1/operator/competitions/{competition_external_id}/draws/run

Initiates the CSPRNG draw process. You can draw a specific prize or all undrawn prizes at once. When drawing all prizes, previous winners are automatically excluded from subsequent prize draws.

{
            "success": true,
            "competition_id": "956774e8-9835-4c54-9eb2-ce099db4e5f0",
            "total_prizes_drawn": 2,
            "draws": [
                {
                    "id": "...",
                    "drawn_at": "2025-11-20T11:25:24.000000Z",
                    "signature_hash": "71b4d0f1d3e8f145b60d37f1bf2b7d7c5985bc59d408143ff4a49a969a5b5511",
                    "prize": { "title": "Galaxy Tab 11" },
                    "winner": { "entry": { "number": 1 } }
                }
            ],
            "audit_url": "https://veristiq.io/audit/956774e8..."
        }
GET

Get Audit Logs

GET/api/v1/operator/competitions/{competition_external_id}/audits

Retrieves the full cryptographic audit chain and event history for a competition. Each prize draw creates its own audit record linked to the global audit chain.

{
    "competition_id": "CHRISTMAS2025",
    "total_draws": 3,
    "audits": [
        {
        "draw_id": "draw_abc123...",
        "prize_id": "GRAND_PRIZE",
        "rng_seed_hash": "a3f8d9e2...",
        "signature_hash": "a3f8d9e2...",
        "previous_signature_hash": "f2a8c9d4...",
        "pool_hash": "d4f2a8c9..."
        }
    ]
    }

Compliance

GET

Get Compliance Summary

GET/api/v1/operator/compliance

Retrieves your current compliance score and any outstanding requirements.

{
    "overall_score": 98,
    "status": "compliant",
    "requirements": [
        {
            "id": "req_audit_logs",
            "status": "pass",
            "description": "All draws have verifiable audit logs"
        },
        {
            "id": "req_complaints",
            "status": "pass",
            "description": "Complaint resolution under 72h"
        }
    ]
}
POST

Log Complaint

POST/api/v1/operator/complaints

Log a user complaint for regulatory tracking and resolution.

ParameterTypeDescription
competition_id *stringExternal ID of the related competition.
user_reference *stringUser raising the complaint.
description *textDetails of the complaint.

Webhooks

POST

Create Subscription

POST/api/v1/operator/webhooks

Subscribe to platform events such as 'draw.completed' or 'audit.generated'.

ParameterTypeDescription
url *urlHTTPS endpoint to receive payloads.
events *arrayList of event types to subscribe to (e.g., ['draw.completed']).
GET

List Webhooks

GET/api/v1/operator/webhooks

List all active webhook subscriptions.

{
    "data": [
        {
            "id": "wh_123",
            "url": "https://yourapp.com/webhooks",
            "events": ["draw.completed"],
            "created_at": "2025-11-20T10:00:00Z"
        }
    ]
}
Veristiq

The infrastructure for provably fair competitions. Automate compliance, eliminate disputes, and verified integrity.

Product

  • How It Works
  • Pricing
  • Compliance
  • Verify your ticket

Company

  • About
  • Contact
  • Security

Developers

  • Docs
  • API Reference
  • Status
© 2025 Veristiq. All rights reserved.Privacy PolicyTerms of Service
Systems Normal

Veristiq is an independent technical service and is not affiliated with the Department for Digital, Culture, Media & Sport.