Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-attestly.code4source.com/llms.txt

Use this file to discover all available pages before exploring further.

The catalog stores rulesets so you can reference them by name@version on /v1/evaluate instead of sending the body inline every time.

Endpoints

MethodPathPurpose
POST/v1/rulesetsCreate a new (name, version).
GET/v1/rulesetsList rulesets (paginated).
GET/v1/rulesets/{name}Get the latest version.
GET/v1/rulesets/{name}/{version}Get a specific version.

Create

curl -X POST https://api-attestly.code4source.com/v1/rulesets \
  -H "Authorization: Bearer atk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "br-rural-credit",
    "version": 1,
    "sets":   { ... },
    "checks": [ ... ]
  }'
version is an integer. Omit it to let the API assign the next free version. (name, version) pairs are immutable — re-POSTing the same pair returns 409 RULESET_ALREADY_EXISTS.

Response

{
  "data": {
    "ruleset": "br-rural-credit",
    "version": 1,
    "body": { ... },
    "created_at": "2026-05-05T12:00:00Z"
  }
}

List

GET /v1/rulesets?page=1&page_size=20
GET /v1/rulesets?name=br-rural-credit
Returns a paginated metadata listing:
{
  "data": {
    "items": [
      {
        "ruleset": "br-rural-credit",
        "version": 1,
        "created_at": "2026-05-05T12:00:00Z"
      }
    ],
    "pagination": { "page": 1, "page_size": 20, "total_count": 42, "total_pages": 3 }
  }
}

Get

GET /v1/rulesets/br-rural-credit          # latest version
GET /v1/rulesets/br-rural-credit/1        # pinned version