Cargo A/C

API Reference

The api.cargo.ac identity contract — the shared endpoints sibling surfaces call to verify tokens, provision identities and read the app registry.

Base URLhttps://api.cargo.ac/v1

Authentication

POST
/auth/verifyService key
stable

Verify a cargo.ac JWT and return the resolved identity + roles.

Request

  • tokenstringThe cargo.ac-issued access token to validate.

Response

  • validbooleanWhether the token is authentic and unexpired.
  • user_iduuidThe subject's stable identity id.
  • rolesstring[]App roles granted to the subject.
GET
/auth/sessionBearer token
stable

Resolve the current bearer session into a profile snapshot.

Response

  • user_iduuidThe signed-in identity id.
  • emailstringPrimary email address.
  • user_type'internal' | 'client'Identity segmentation.

Provisioning

POST
/identitiesService key
beta

Provision (or upsert) an identity from a trusted spoke.

Request

  • emailstringEmail address for the new identity.
  • full_namestringDisplay name.
  • user_type'internal' | 'client'Segmentation for the identity.

Response

  • user_iduuidThe created or matched identity id.
  • createdbooleanTrue if a new identity was created.
POST
/identities/{user_id}/enrollmentsService key
beta

Enroll an identity into a registered application.

Request

  • app_keystringRegistry key of the target application.
  • rolestringInitial app role for the enrollment.

Response

  • enrollment_iduuidThe created enrollment record id.

Registry

GET
/appsBearer token
stable

Read the shared application registry served by cargo.ac.

Response

  • appsApp[]Registered apps, consoles and websites.

Telemetry

POST
/apps/{app_key}/heartbeatService key
planned

Report spoke liveness + event counts back to the hub.

Request

  • versionstringDeployed spoke version.
  • eventsEventCount[]Signup/login/role-change counts since last beat.

Response

  • ackbooleanWhether the heartbeat was recorded.

This contract is dependency-free and lifts verbatim into the future standalone api.cargo.ac deployment and each spoke's client SDK.