DDockaseAPI

Getting started

The Dockase API is a REST API over https://api.dockase.com. It speaks JSON, versioned under /v1. Create an account at /signup — your first API key is issued instantly — and you can make your first call in under a minute. Keys, usage, and billing all live in your developer dashboard right here on this site.

Authentication

Every request needs an API key in the Authorization header. Keys are prefixed dk_ and are created at /signup and revoked or regenerated from your dashboard. Keep keys server-side — never ship them in a browser or mobile client.

Header
Authorization: Bearer dk_live_...

Response envelope

Every successful response wraps its payload in data, with request metadata in meta. All responses are sent with Cache-Control: no-store.

Success envelope
{
  "data": { "..." : "..." },
  "meta": {
    "request_id": "req_9u2h1k",
    "plan": "PRO"
  }
}

Errors

Errors are Stripe-style: a single error object with a machine-readable type and a human-readable message.

Error envelope
{
  "error": {
    "type": "rate_limited",
    "message": "Rate limit exceeded: 30 requests per minute on the FREE plan."
  }
}
FieldTypeDescription
400invalid_requestMalformed JSON, missing required fields, or invalid parameters.
401authentication_errorMissing, revoked, or invalid API key.
403tier_requiredThe resource requires a higher plan (e.g. full_text on FREE).
404not_foundNo judgment, statute, or resource with that ID.
429rate_limitedPer-minute rate limit exceeded. Back off and retry.
500api_errorSomething went wrong on our side. Retry with the request_id if it persists.

Rate limits

Limits are per API key, per minute. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix timestamp for the next window).

FieldTypeDescription
FREE30 req/min1,000 calls/month. Snippet-length judgment text.
PRO120 req/min20,000 calls/month. Full judgment text.
ENTERPRISE600 req/min100,000 calls/month. Full judgment text, priority support.
POST/v1/judgments/searchNigeria

Search judgments

Semantic search over 13,000+ Nigerian judgments. Send a natural-language description of the legal issue; get back ranked authorities with citations, ratios, and relevance scores.

curl https://api.dockase.com/v1/judgments/search \
  -H "Authorization: Bearer dk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "query": "locus standi in election petitions",
    "limit": 5,
    "court_level": "SC",
    "year_from": 2015
  }'

Request body

FieldTypeDescription
queryrequiredstringNatural-language legal question or fact pattern. Semantic — describe the issue, not just keywords.
limitintegerMax results to return. Default 10, maximum 20.
court_levelstringFilter by court level, e.g. "SC" (Supreme Court), "CA" (Court of Appeal), "HC" (High Courts).
year_fromintegerOnly judgments delivered on or after this year.
year_tointegerOnly judgments delivered on or before this year.

Response

data is an array of judgment results, ranked by relevance:

FieldTypeDescription
idstringStable judgment identifier (jd_...).
case_namestringParty names as reported.
citationstringAELR citation with court suffix, e.g. "(2023) 12 AELR 45 (SC)".
courtstringCourt that delivered the judgment.
judgment_datestringISO 8601 date (YYYY-MM-DD).
ratiostringThe ratio decidendi — the binding legal principle of the decision.
summarystringEditorial summary of the facts and holding.
authority_scorenumber0–1. How authoritative this judgment is, from court level and subsequent treatment.
confidencenumber0–1. Relevance confidence for this result against your query.
snippetstringFREE plan: a ~300-character excerpt around the most relevant passage.
full_textstringPRO and ENTERPRISE: the complete judgment text. Replaces snippet.
200 OK
{
  "data": [
    {
      "id": "jd_8f3k2m1x",
      "case_name": "Adeyemi v. INEC",
      "citation": "(2023) 12 AELR 45 (SC)",
      "court": "Supreme Court",
      "judgment_date": "2023-09-14",
      "ratio": "A petitioner who seeks to nullify an election must show that the alleged non-compliance substantially affected the result...",
      "summary": "The Supreme Court restated the test for locus standi in election petitions and held that...",
      "authority_score": 0.94,
      "confidence": 0.98,
      "snippet": "...the question of locus standi is a threshold issue that goes to the jurisdiction of the tribunal..."
    }
  ],
  "meta": {
    "request_id": "req_9u2h1k",
    "plan": "FREE"
  }
}
Plan note. On the FREE plan each result includes a snippet (~300 characters). On PRO and ENTERPRISE, results include the complete full_text instead.
GET/v1/judgments/{id}Nigeria

Get a judgment

Fetch a single judgment by ID. Same shape as a search result, with the same plan-based text tiering.

curl https://api.dockase.com/v1/judgments/jd_8f3k2m1x \
  -H "Authorization: Bearer dk_live_..."

Response

data is a single judgment object with the fields listed under Search judgments.

Plan note. FREE returns metadata, ratio, summary, and a snippet. PRO and ENTERPRISE return full_text. Tiering never fails the request — FREE simply returns the snippet shape rather than an error.
GET/v1/judgments/{id}/citationsNigeria

Citation graph

The citation neighbourhood of a judgment: everything it cites, and everything that cites it. Each edge carries a treatment — followed, considered, distinguished, or overruled — with a confidence score and the passage it was extracted from.

curl https://api.dockase.com/v1/judgments/jd_8f3k2m1x/citations \
  -H "Authorization: Bearer dk_live_..."

Response

data.cites and data.cited_by are arrays of edges:

FieldTypeDescription
idstringJudgment identifier for the related case.
case_namestringParty names of the related case.
citationstringAELR citation of the related case.
treatmentstringOne of followed, considered, distinguished, overruled.
confidencenumber0–1. Confidence in the treatment classification.
context_snippetstringThe passage in which the citation and treatment appear.
200 OK
{
  "data": {
    "id": "jd_8f3k2m1x",
    "cites": [
      {
        "id": "jd_2p9q4r7w",
        "case_name": "Okafor v. Attorney-General of Lagos State",
        "citation": "(2019) 4 AELR 112 (SC)",
        "treatment": "followed",
        "confidence": 0.97,
        "context_snippet": "...as this Court held in Okafor v. A-G Lagos State, the threshold question of standing must be resolved..."
      }
    ],
    "cited_by": [
      {
        "id": "jd_5t8y1u3i",
        "case_name": "Bello v. Zamfara State Electoral Commission",
        "citation": "(2025) 2 AELR 88 (CA)",
        "treatment": "distinguished",
        "confidence": 0.91,
        "context_snippet": "...the facts before us differ materially from Adeyemi v. INEC, and we accordingly distinguish..."
      }
    ]
  },
  "meta": {
    "request_id": "req_3f7j0a",
    "plan": "PRO"
  }
}
Plan note. Always check cited_by for overruled treatments before relying on an authority — that is the whole point.
POST/v1/citations/verifyNigeria

Verify a citation

Check whether a citation or case name exists in the record. Built for the anti-hallucination workflow: run every authority an LLM drafts through this endpoint before it reaches a brief, an opinion, or a filing.

curl https://api.dockase.com/v1/citations/verify \
  -H "Authorization: Bearer dk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"citation": "(2023) 12 AELR 45 (SC)"}'

Request body

FieldTypeDescription
citationstringAn AELR-style citation, e.g. "(2023) 12 AELR 45 (SC)". At least one of citation or case_name is required.
case_namestringParty names, e.g. "Adeyemi v. INEC". At least one of citation or case_name is required.

Response

FieldTypeDescription
statusstringVERIFIED when a matching judgment exists; NOT_VERIFIED otherwise.
matchedobject | nullThe matched judgment (id, case_name, citation, court, judgment_date), or null when status is NOT_VERIFIED.
200 OK
{
  "data": {
    "status": "VERIFIED",
    "matched": {
      "id": "jd_8f3k2m1x",
      "case_name": "Adeyemi v. INEC",
      "citation": "(2023) 12 AELR 45 (SC)",
      "court": "Supreme Court",
      "judgment_date": "2023-09-14"
    }
  },
  "meta": {
    "request_id": "req_6m1z8q",
    "plan": "PRO"
  }
}
GET/v1/statutesNigeria

List statutes

Nigerian statutes as structured records. Filter by category and jurisdiction (federal or a state).

curl "https://api.dockase.com/v1/statutes?category=electoral&jurisdiction=federal" \
  -H "Authorization: Bearer dk_live_..."

Query parameters

FieldTypeDescription
categorystringSubject category, e.g. electoral, criminal, corporate, land.
jurisdictionstringfederal or a state name, e.g. lagos.
200 OK
{
  "data": [
    {
      "id": "st_electoral_act_2022",
      "title": "Electoral Act, 2022",
      "category": "electoral",
      "jurisdiction": "federal",
      "year": 2022,
      "updated_at": "2026-08-30"
    }
  ],
  "meta": {
    "request_id": "req_1x4v7n",
    "plan": "FREE"
  }
}
GET/v1/statutes/{id}Nigeria

Get a statute

The full statute, formatted as clean markdown — headings, sections, and subsections preserved. Ready to render or index.

curl
curl https://api.dockase.com/v1/statutes/st_electoral_act_2022 \
  -H "Authorization: Bearer dk_live_..."
200 OK
{
  "data": {
    "id": "st_electoral_act_2022",
    "title": "Electoral Act, 2022",
    "category": "electoral",
    "jurisdiction": "federal",
    "year": 2022,
    "updated_at": "2026-08-30",
    "body_markdown": "# Electoral Act, 2022\n\n## Part I – Establishment and Functions of INEC\n\n**1.** (1) The Independent National Electoral Commission..."
  },
  "meta": {
    "request_id": "req_8b2c5d",
    "plan": "FREE"
  }
}
POST/v1/embeddingsGlobalPro & Enterprise only

Embeddings

amicus-embed-ng-v1 is a legal-domain embedding model, trained on judgments, statutes, and legal commentary. It is a global primitive — use it to build retrieval over your own documents, contracts, briefs, or knowledge bases, in any jurisdiction. The request shape is OpenAI-compatible.

curl https://api.dockase.com/v1/embeddings \
  -H "Authorization: Bearer dk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "amicus-embed-ng-v1",
    "input": "The ratio decidendi of the judgment concerns locus standi..."
  }'

Request body

FieldTypeDescription
inputrequiredstring | string[]Text to embed. Pass an array to batch.
modelrequiredstringMust be "amicus-embed-ng-v1".
200 OK
{
  "data": {
    "object": "list",
    "data": [
      {
        "object": "embedding",
        "index": 0,
        "embedding": [0.0124, -0.0871, 0.0442, "..."]
      }
    ],
    "model": "amicus-embed-ng-v1",
    "usage": {
      "prompt_tokens": 14,
      "total_tokens": 14
    }
  },
  "meta": {
    "request_id": "req_5k9p2t",
    "plan": "PRO"
  }
}
Plan note. PRO and ENTERPRISE only. FREE keys get 402 payment_required — the error body points you to /dashboard to upgrade. Embeddings are token-metered: included usage comes from your plan's monthly call allowance; overage is billed per million tokens — $0.25/1M on PRO, $0.20/1M on ENTERPRISE.