Seedy Pea

Errors

The HTTP API returns JSON errors with ok: false.

{
  "ok": false,
  "error": "write_key does not match project"
}

Status Codes

Status Meaning
400 Invalid JSON, missing field, invalid event type, invalid score, invalid timestamp, or mismatched scoring declaration.
401 Write key verification failed.
403 Write key belongs to another project, origin is not allowed, event type is reserved, or score model is undeclared.
404 Unknown project.
405 Method not allowed.
500 Internal substrate failure, such as vault mint/shred failure.
503 Required profile storage is unavailable for a route that needs it.

CORS

Public write-key routes answer OPTIONS with 204.

Requests should include the real browser Origin. If the project has an origin configured, that origin must match exactly.

Required Fields

Most public routes require:

{
  "project_id": "proj_...",
  "write_key": "wk_..."
}

Event, score, profile, delete, and decision routes also need either anonymous_id or, where supported, profile_ref.

Reserved Events

POST /v1/events rejects trusted substrate event names.

Reserved prefixes include:

sp.model.
sp.privacy.
sp.segeval.
sp.topology.
sp.profile.
sp.segment.
sp.import.
sp.connection.
sp.observation.
sp.experiment.
sp.access.

Use dedicated routes such as /v1/scores, /v1/decide, and /v1/experiment/expose for substrate-authored facts.