CorrConnectDocs
Early accessRequest access

API reference

API reference

Generated from the OpenAPI document the CorrConnect service itself serves, so it describes the code that runs. Download it as openapi.json.

Conventions

  • Base URL. Every path is relative to your CORRCONNECT_BASE address. Token, revoke, profile and activity routes are also served on the API host if your invitation names one.
  • Versions. Data routes live under /v1. Changes inside v1 add fields and values; see versioning.
  • Formats. JSON in and out, except /oauth/token and /oauth/revoke-token, which take application/x-www-form-urlencoded bodies as OAuth requires.
  • Auth. Data routes take a Bearer access token. App and webhook management takes the console session cookie, plus Origin and X-CSRF-Token on changes. See accounts and apps.
  • Errors. {"code", "message", "request_id", "details"?}, except the token endpoint's OAuth shape. See errors.
  • Caching. Responses under /v1 and /oauth are sent with Cache-Control: no-store.
  • Browsers. There are no CORS headers, so browser JavaScript on another site can't call the API. Call it from your server or a native app.
  • Request IDs. Every response has X-Request-ID.

Samples

Every operation has a sample in cURL, JavaScript (Node.js 20 or later, run as an ES module), Python (with requests) and Swift (5.9 or later). They read these environment variables:

VariableHolds
CORRCONNECT_BASEYour CorrConnect address, for example https://corrconnect.example
CLIENT_ID, REDIRECT_URIYour app's client_id and one registered callback
ACCESS_TOKEN, REFRESH_TOKENAn athlete's tokens
CODE, CODE_VERIFIERA callback code and the PKCE verifier behind it
CORRCONNECT_COOKIE, CSRF_TOKENYour console session cookie (name=value) and its CSRF token
APP_ID, SUBSCRIPTION_ID, ACTIVITY_IDIDs used in paths

All operations

OperationEndpointGroup
Ask an athlete for accessGET /oauth/authorizeOAuth
Exchange a code or refresh a tokenPOST /oauth/tokenOAuth
Revoke one token pairPOST /oauth/revoke-tokenOAuth
End the whole grantPOST /oauth/revokeOAuth
Get the athlete's subjectGET /v1/profileAthlete data
List activitiesGET /v1/activitiesAthlete data
Get one activityGET /v1/activities/{activity_id}Athlete data
Create an accountPOST /v1/account/registerConsole session
Sign inPOST /v1/account/loginConsole session
Get the session and a fresh CSRF tokenGET /v1/account/meConsole session
Sign outPOST /v1/account/logoutConsole session
Register an appPOST /v1/developer/appsApps
List your appsGET /v1/developer/appsApps
Delete an appDELETE /v1/developer/apps/{app_id}Apps
Create a webhook subscriptionPOST /v1/developer/apps/{app_id}/webhooksWebhook subscriptions
List webhook subscriptionsGET /v1/developer/apps/{app_id}/webhooksWebhook subscriptions
Send a test eventPOST /v1/developer/apps/{app_id}/webhooks/{subscription_id}/testWebhook subscriptions
List recent deliveriesGET /v1/developer/apps/{app_id}/webhooks/{subscription_id}/deliveriesWebhook subscriptions
Turn a paused subscription back onPOST /v1/developer/apps/{app_id}/webhooks/{subscription_id}/enableWebhook subscriptions
Delete a webhook subscriptionDELETE /v1/developer/apps/{app_id}/webhooks/{subscription_id}Webhook subscriptions
Check the service is upGET /healthzService