Skip to main content
Developer guide: Records and organisations

API referenceContract v3.58.0

Add your approval to a decision

Records and organisations

POST/v1/reader/relationships/{ke}/decisions/{decision_id}/approvals

Request

Example request

curl -X POST "$KARIBU_ID_API/v1/reader/relationships/<ke>/decisions/<decision_id>/approvals" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Set KARIBU_ID_API to the API address your organisation was given and ACCESS_TOKEN to an access token (see Authentication). Values in angle brackets and in the body are placeholders.

Path parameters

  • decision_idstringRequired
  • kestringRequired

Headers

  • Idempotency-KeystringOptional

    Replays the first answer for 24 hours.

  • X-Karibu-MatterstringOptional

    The firm's matter id its read is labelled with.

  • X-Karibu-Organisationstringmay be nullOptional

Responses

  • 201Success

    The decision with its approval count.

    Body

    application/jsonReaderDecisionOut

    Example shape
    {
      "approvals": 0,
      "approvers_required": 0,
      "automated": true,
      "conditions": [
        "string"
      ],
      "decided_by": "string",
      "decision_id": "string",
      "digest": "string",
      "is_decider": true,
      "key_id": "string",
      "next_review_on": "string",
      "outcome": "approve",
      "overridden_by": "string",
      "presented_as": "string",
      "rationale_draft": {
        "drafted_by": "software",
        "edited_at": "string",
        "edited_by": "string",
        "edited_narrative": "string",
        "edited_rationale": "string",
        "kept_at": "string",
        "kept_by": "string",
        "kept_narrative": true,
        "kept_rationale": true,
        "label": "string",
        "narrative": {
          "rules": [
            "string"
          ],
          "text": "string"
        },
        "rationale": [
          {
            "rules": [
              "string"
            ],
            "text": "string"
          }
        ],
        "reverted_at": "string",
        "reverted_by": "string",
        "withdrawn": true,
        "withdrawn_at": "string",
        "withdrawn_by": "string"
      },
      "reasoning": "string",
      "recorded_at": "2026-01-31T09:00:00Z",
      "rule_id": "string",
      "rules_version": 0,
      "state": "awaiting_approval",
      "tier_id": "string"
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

Errors

Every error is a problem document (RFC 9457) sent as application/problem+json. Its code is stable: branch on it, not on the wording of title or detail.

  • 401Error

    invalid_token: No bearer token, or one does not accept.

    Body

    application/problem+jsonProblem

    Example shape
    {
      "characters": 0,
      "code": "body_too_large",
      "detail": "string",
      "drafts_remaining_today": 0,
      "errors": [
        null
      ],
      "file_problem": "unsupported",
      "limit": 0,
      "reason": "malformed",
      "reference": "string",
      "refusal": "string",
      "reset_at": "2026-01-31T09:00:00Z",
      "ruleErrors": [
        {
          "message": "string",
          "rule": "string"
        }
      ],
      "shortfall": 0,
      "status": 0,
      "title": "string",
      "top_up": {
        "amount_minor": 0,
        "credits": 0,
        "currency": "KES",
        "lines": [
          {
            "amount_minor": 0,
            "credits": 0,
            "kind": "credits",
            "label": "string",
            "unit_minor": 0
          }
        ],
        "note": "string",
        "order_href": "string",
        "total_minor": 0,
        "unit_minor": 0
      },
      "type": "https://example.com",
      "unmet": [
        "string"
      ],
      "unmet_items": [
        {
          "code": "string",
          "label": "string"
        }
      ]
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

  • 404Error

    not_found: The resource does not exist, or the caller may not see it; the two are never told apart.

    Body

    application/problem+jsonProblem

    Example shape
    {
      "characters": 0,
      "code": "body_too_large",
      "detail": "string",
      "drafts_remaining_today": 0,
      "errors": [
        null
      ],
      "file_problem": "unsupported",
      "limit": 0,
      "reason": "malformed",
      "reference": "string",
      "refusal": "string",
      "reset_at": "2026-01-31T09:00:00Z",
      "ruleErrors": [
        {
          "message": "string",
          "rule": "string"
        }
      ],
      "shortfall": 0,
      "status": 0,
      "title": "string",
      "top_up": {
        "amount_minor": 0,
        "credits": 0,
        "currency": "KES",
        "lines": [
          {
            "amount_minor": 0,
            "credits": 0,
            "kind": "credits",
            "label": "string",
            "unit_minor": 0
          }
        ],
        "note": "string",
        "order_href": "string",
        "total_minor": 0,
        "unit_minor": 0
      },
      "type": "https://example.com",
      "unmet": [
        "string"
      ],
      "unmet_items": [
        {
          "code": "string",
          "label": "string"
        }
      ]
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

  • 409Error

    four_eyes: You recorded the decision or have already added an approval.; idempotency_conflict: The Idempotency-Key was used within 24 hours with a different request.; idempotency_in_progress: A request with this Idempotency-Key is still being processed.; illegal_transition: The decision was overridden or already has every approval it needs.

    Body

    application/problem+jsonProblem

    Example shape
    {
      "characters": 0,
      "code": "body_too_large",
      "detail": "string",
      "drafts_remaining_today": 0,
      "errors": [
        null
      ],
      "file_problem": "unsupported",
      "limit": 0,
      "reason": "malformed",
      "reference": "string",
      "refusal": "string",
      "reset_at": "2026-01-31T09:00:00Z",
      "ruleErrors": [
        {
          "message": "string",
          "rule": "string"
        }
      ],
      "shortfall": 0,
      "status": 0,
      "title": "string",
      "top_up": {
        "amount_minor": 0,
        "credits": 0,
        "currency": "KES",
        "lines": [
          {
            "amount_minor": 0,
            "credits": 0,
            "kind": "credits",
            "label": "string",
            "unit_minor": 0
          }
        ],
        "note": "string",
        "order_href": "string",
        "total_minor": 0,
        "unit_minor": 0
      },
      "type": "https://example.com",
      "unmet": [
        "string"
      ],
      "unmet_items": [
        {
          "code": "string",
          "label": "string"
        }
      ]
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

  • 422Error

    validation_failed: The request does not match the contract; errors lists {field, code} pairs.

    Body

    application/problem+jsonProblem

    Example shape
    {
      "characters": 0,
      "code": "body_too_large",
      "detail": "string",
      "drafts_remaining_today": 0,
      "errors": [
        null
      ],
      "file_problem": "unsupported",
      "limit": 0,
      "reason": "malformed",
      "reference": "string",
      "refusal": "string",
      "reset_at": "2026-01-31T09:00:00Z",
      "ruleErrors": [
        {
          "message": "string",
          "rule": "string"
        }
      ],
      "shortfall": 0,
      "status": 0,
      "title": "string",
      "top_up": {
        "amount_minor": 0,
        "credits": 0,
        "currency": "KES",
        "lines": [
          {
            "amount_minor": 0,
            "credits": 0,
            "kind": "credits",
            "label": "string",
            "unit_minor": 0
          }
        ],
        "note": "string",
        "order_href": "string",
        "total_minor": 0,
        "unit_minor": 0
      },
      "type": "https://example.com",
      "unmet": [
        "string"
      ],
      "unmet_items": [
        {
          "code": "string",
          "label": "string"
        }
      ]
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

  • 429Error

    rate_limited: The caller's limit for this route class is spent; see RateLimit-*.

    Body

    application/problem+jsonProblem

    Example shape
    {
      "characters": 0,
      "code": "body_too_large",
      "detail": "string",
      "drafts_remaining_today": 0,
      "errors": [
        null
      ],
      "file_problem": "unsupported",
      "limit": 0,
      "reason": "malformed",
      "reference": "string",
      "refusal": "string",
      "reset_at": "2026-01-31T09:00:00Z",
      "ruleErrors": [
        {
          "message": "string",
          "rule": "string"
        }
      ],
      "shortfall": 0,
      "status": 0,
      "title": "string",
      "top_up": {
        "amount_minor": 0,
        "credits": 0,
        "currency": "KES",
        "lines": [
          {
            "amount_minor": 0,
            "credits": 0,
            "kind": "credits",
            "label": "string",
            "unit_minor": 0
          }
        ],
        "note": "string",
        "order_href": "string",
        "total_minor": 0,
        "unit_minor": 0
      },
      "type": "https://example.com",
      "unmet": [
        "string"
      ],
      "unmet_items": [
        {
          "code": "string",
          "label": "string"
        }
      ]
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

  • 500Error

    internal_error: Something failed; nothing more is said.

    Body

    application/problem+jsonProblem

    Example shape
    {
      "characters": 0,
      "code": "body_too_large",
      "detail": "string",
      "drafts_remaining_today": 0,
      "errors": [
        null
      ],
      "file_problem": "unsupported",
      "limit": 0,
      "reason": "malformed",
      "reference": "string",
      "refusal": "string",
      "reset_at": "2026-01-31T09:00:00Z",
      "ruleErrors": [
        {
          "message": "string",
          "rule": "string"
        }
      ],
      "shortfall": 0,
      "status": 0,
      "title": "string",
      "top_up": {
        "amount_minor": 0,
        "credits": 0,
        "currency": "KES",
        "lines": [
          {
            "amount_minor": 0,
            "credits": 0,
            "kind": "credits",
            "label": "string",
            "unit_minor": 0
          }
        ],
        "note": "string",
        "order_href": "string",
        "total_minor": 0,
        "unit_minor": 0
      },
      "type": "https://example.com",
      "unmet": [
        "string"
      ],
      "unmet_items": [
        {
          "code": "string",
          "label": "string"
        }
      ]
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

  • Any other statusError

    An error (RFC 9457); code says which.

    Body

    application/problem+jsonProblem

    Example shape
    {
      "characters": 0,
      "code": "body_too_large",
      "detail": "string",
      "drafts_remaining_today": 0,
      "errors": [
        null
      ],
      "file_problem": "unsupported",
      "limit": 0,
      "reason": "malformed",
      "reference": "string",
      "refusal": "string",
      "reset_at": "2026-01-31T09:00:00Z",
      "ruleErrors": [
        {
          "message": "string",
          "rule": "string"
        }
      ],
      "shortfall": 0,
      "status": 0,
      "title": "string",
      "top_up": {
        "amount_minor": 0,
        "credits": 0,
        "currency": "KES",
        "lines": [
          {
            "amount_minor": 0,
            "credits": 0,
            "kind": "credits",
            "label": "string",
            "unit_minor": 0
          }
        ],
        "note": "string",
        "order_href": "string",
        "total_minor": 0,
        "unit_minor": 0
      },
      "type": "https://example.com",
      "unmet": [
        "string"
      ],
      "unmet_items": [
        {
          "code": "string",
          "label": "string"
        }
      ]
    }

    Built from the contract’s types. The values are placeholders, not data.

    Headers (1)
    • X-Request-Id

      The request's reference: the caller's own when it matches ^[A-Za-z0-9._-]{8,64}$, else one Karibu ID made; quote it to support.

Error codes (35)
  • body_too_large
  • conflict
  • conflicted_staff
  • credits_insufficient
  • four_eyes
  • guard_unmet
  • hash_mismatch
  • idempotency_conflict
  • idempotency_in_progress
  • illegal_transition
  • insufficient_user_authentication
  • internal_error
  • invalid_credential
  • invalid_token
  • jurisdiction_not_enabled
  • method_not_allowed
  • not_found
  • pack_purpose_required
  • payer_shape_required
  • policy_invalid
  • precondition_failed
  • precondition_required
  • purpose_required
  • quota_exhausted
  • rate_limited
  • record_expired
  • record_not_maintained
  • scope_below_floor
  • seats_required
  • service_unavailable
  • staff_role_required
  • two_person
  • unsupported_media_type
  • upgrade_required
  • validation_failed

Schemas

Every object this operation sends or returns, field by field.

  • ReaderDecisionOut

    • approvalsnumberRequired
    • approvers_requirednumberRequired
    • automatedbooleanRequired
    • conditionsstring[]Required
    • decided_bystringmay be nullOptional

      v3.4.0. The user id of the member of the reader who recorded the decision; null for an automated decision (it has no decider).

    • decision_idstringRequired
    • digeststringRequired
    • is_deciderbooleanRequired

      v3.4.0. Whether the CALLER is the decider: only the decider keeps, edits, reverts or withdraws the draft rationale (others read what was kept); offer those acts when true.

    • key_idstringRequired
    • next_review_onstringmay be nullRequired
    • outcomeDecisionOutcomeRequired
    • overridden_bystringmay be nullRequired
    • presented_asstringRequired
    • rationale_draftRationaleDraftOutmay be nullOptional
    • reasoningstringRequired
    • recorded_atstringdate-timeRequired
    • rule_idstringmay be nullRequired
    • rules_versionnumbermay be nullRequired
    • statestringRequired
      One of
      • awaiting_approval
      • recorded
      • overridden
    • tier_idstringmay be nullRequired
  • DecisionOutcome

    One of
    • approve
    • decline
    • approve_with_conditions
  • RationaleDraftOut

    What our software drafted of the rationale of a recorded decision.

    • drafted_by"software"Required

      Always software: the draft is never relabelled.

    • edited_atstringmay be nullOptional

      When they edited it.

    • edited_bystringmay be nullOptional

      The ROLE the decider edited in (never a name), where edited.

    • edited_narrativestringmay be nullOptional

      The decider's own words for the audit-pack paragraph, likewise.

    • edited_rationalestringmay be nullOptional

      The decider's own words for the rationale, where they edited it and kept it; they stand beside the software's sentences, never over them.

    • kept_atstringmay be nullOptional

      v3.4.0. When they last kept it.

    • kept_bystringmay be nullOptional

      v3.4.0. The ROLE the decider last kept it in (never a name); null if never.

    • kept_narrativebooleanRequired

      Whether the decider kept the paragraph.

    • kept_rationalebooleanRequired

      Whether the decider kept the sentences.

    • labelstringRequired

      drafted by software, or drafted by software, edited by <role> where the decider kept any of it.

    • narrativeRationaleSentenceOutmay be nullRequired

      The draft's paragraph for the audit pack (past tense), where the reader may see it.

    • rationaleRationaleSentenceOut[]may be nullRequired

      The draft's sentences, where the reader may see them.

    • reverted_atstringmay be nullOptional

      v3.4.0. When they did.

    • reverted_bystringmay be nullOptional

      v3.4.0. The ROLE the decider last reverted their edit in; null if never, and for the reader's other members, who see only what was kept.

    • withdrawnbooleanRequired

      Whether the decider withdrew what they kept.

    • withdrawn_atstringmay be nullOptional

      v3.4.0. When they did.

    • withdrawn_bystringmay be nullOptional

      v3.4.0. The ROLE the decider last withdrew it in; null if never, and for the reader's other members.

  • RationaleSentenceOut

    • rulesstring[]Required

      The ids of the rules whose results the sentence rests on.

    • textstringRequired

      One plain sentence on what the recorded outcome rests on.

  • Problem

    RFC 9457 problem details; code is stable.

    • charactersnumberOptional
    • codestringRequired

      Which error; clients localise by it, never by the message. - body_too_large (413): The request body is above the route's limit. - conflict (409): The request conflicts with the resource's current state. - conflicted_staff (409): A staff member with a declared conflict with this company cannot take this role. - credits_insufficient (402): The organisation's spendable credits cannot cover the action; nothing was reserved. A top-up is offered (the pricing rulebook §3). - four_eyes (409): The same person may not both prepare and sign or confirm. - guard_unmet (409): A precondition of the action is not yet recorded; unmet names which. - hash_mismatch (422): The uploaded bytes do not hash to the confirmed sha256. - idempotency_conflict (409): The Idempotency-Key was used within 24 hours with a different request. - idempotency_in_progress (409): A request with this Idempotency-Key is still being processed. - illegal_transition (409): The resource's state does not allow this action. - insufficient_user_authentication (401): The action needs a passkey authentication (acr level 2) within the last 5 minutes. - internal_error (500): Something failed; nothing more is said. - invalid_credential (401): An internal caller's credential is missing or wrong. - invalid_token (401): No bearer token, or one Karibu ID does not accept. - jurisdiction_not_enabled (422): The organisation is registered in a jurisdiction Karibu ID has not enabled. - method_not_allowed (405): The route does not take this method. - not_found (404): The resource does not exist, or the caller may not see it; the two are never told apart. - pack_purpose_required (409): The purpose question has not been answered; it is the journey's first step after the quote is accepted, and the person's next act on the journey (the authority upload, the invoice's acceptance, the checkout) and adding a pack to the organisation wait for the answer (pack specification 8.5). - payer_shape_required (409): The quote declares subsidiaries and the customer has not chosen who pays (the parent on Verified Group, the parent sponsoring its subsidiaries, or each subsidiary on its own plan); the shape is chosen before the quote is accepted (pack specification 7.1). - policy_invalid (422): The policy's rules do not validate against the check library and the default tolerances; errors says why, rule by rule. - precondition_failed (412): If-Match does not name the resource's current version. - precondition_required (428): This update needs If-Match with the current version. - purpose_required (422): While purpose-based sharing is on, a request or an invitation states its purpose from the catalogue in use. - quota_exhausted (429): The organisation's monthly allowance for this action is used up; it renews on the first of the month. - rate_limited (429): The caller's limit for this route class is spent; see RateLimit-*. - record_expired (409): The company's record expired at the end of its grace: no new statement can be run against it until it is renewed and re-checked; its last version stays readable. - record_not_maintained (409): The record has not been maintained since its plan lapsed; no new statement is made on it until the plan is renewed (the gap report §8 S3). - scope_below_floor (422): Registration and status, and sanctions and PEPs, are always shared at least at summary level; a scope below that floor is never recorded. - seats_required (409): Every seat of the firm's plan is taken; a seat is added before another member is invited (the pricing rulebook §4). - service_unavailable (503): A dependency Karibu ID needs for this route is not configured. - staff_role_required (403): Your staff roles do not admit this action; the route's roles are in the contract's x-roles. - two_person (409): A second, different member of staff must approve this action. - unsupported_media_type (415): The media type is not one the route accepts. - upgrade_required (409): The reader has no plan in force on the track that pays for this (readers always pay to read), or has read twice its plan's limit of distinct organisations this term, or holds every custom policy its plan allows; a plan, or a larger one, is needed first (the pricing rulebook §2 principle 2, §4). - validation_failed (422): The request does not match the contract; errors lists {field, code} pairs.

      One of
      • body_too_large
      • conflict
      • conflicted_staff
      • credits_insufficient
      • four_eyes
      • guard_unmet
      • hash_mismatch
      • idempotency_conflict
      • idempotency_in_progress
      • illegal_transition
      • insufficient_user_authentication
      • internal_error
      • invalid_credential
      • invalid_token
      • jurisdiction_not_enabled
      • method_not_allowed
      • not_found
      • pack_purpose_required
      • payer_shape_required
      • policy_invalid
      • precondition_failed
      • precondition_required
      • purpose_required
      • quota_exhausted
      • rate_limited
      • record_expired
      • record_not_maintained
      • scope_below_floor
      • seats_required
      • service_unavailable
      • staff_role_required
      • two_person
      • unsupported_media_type
      • upgrade_required
      • validation_failed
    • detailstringOptional
    • drafts_remaining_todaynumberOptional
    • errorsany[]Optional
    • file_problemstringOptional
      One of
      • unsupported
      • too_large
      • mismatch
      • biometric
      • identity_document
      • face
      • unanalysable
      • encrypted
      • active_content
    • limitnumberOptional
    • reasonstringOptional
      One of
      • malformed
      • algorithm
      • signature
      • expired
      • not_yet_valid
      • issuer
      • audience
      • claims
      • invalid
      • unknown_user
      • deactivated
      • organisation
    • referencestringOptional
    • refusalstringOptional
    • reset_atstringdate-timeOptional
    • ruleErrorsProblemRuleErrorsItem[]Optional
    • shortfallnumberOptional
    • statusnumberRequired
    • titlestringRequired
    • top_upProblemTopUpmay be nullOptional
    • typestringuriOptional
    • unmetstring[]Optional
    • unmet_itemsProblemUnmetItemsItem[]Optional
  • ProblemRuleErrorsItem

    • messagestringRequired
    • rulestringmay be nullRequired
  • ProblemTopUp

    • amount_minornumberRequired
    • creditsnumberRequired
    • currency"KES" | "USD"Required
    • linesProblemTopUpLinesItem[]Optional
    • notestringOptional
    • order_hrefstringmay be nullRequired
    • total_minornumberOptional
    • unit_minornumberRequired
  • ProblemTopUpLinesItem

    • amount_minornumberRequired
    • creditsnumbermay be nullOptional
    • kind"credits" | "tax"Required
    • labelstringmay be nullOptional
    • unit_minornumbermay be nullOptional
  • ProblemUnmetItemsItem

    • codestringRequired
    • labelstringRequired

Karibu ID uses cookies to keep you signed in and to remember your choices, such as your theme. Read the privacy notice