Developer route

API documentation

A small, read-only API for approved community codes. Responses contain only the public display name, referral code, and tracked outbound link.

Base URL

https://codetoadventure.com/api.php

Only GET and OPTIONS are accepted. Requests are limited to 100 per minute per connection address.

Get a random approved code

GET /api.php?path=random

200 response

{
  "name": "Zak",
  "referral_code": "ZAK1452284",
  "link": "https://codetoadventure.com/track.php?code=ZAK1452284"
}

List approved codes

GET /api.php?path=codes&page=1&limit=25

page starts at 1. limit defaults to 25 and is capped at 50. Results are wrapped in data with a pagination object.

Error responses

Errors use an error object with a stable code and a readable message.

404 invalid path

{"error":{"code":"INVALID_ENDPOINT","message":"Use path=random or path=codes."}}

405 unsupported method

{"error":{"code":"METHOD_NOT_ALLOWED","message":"Use GET for this endpoint."}}

429 rate limit

{"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Try again in one minute."}}

Responsible use

Do not mirror personal names unnecessarily, bypass limits, or treat the API as proof that Rivian will honor a reward. Link to the current official terms when presenting program information.