Talk with Archie
API reference › Audit
Skills › Audit

Test Internal Controls

POST/api/v1/skills/controls.test/invoke
Tests a client's internal controls for design or operating effectiveness, with sample selection and exception reporting. You must supply client_id, and can choose the control set, test type, sample size and period. It returns an overall conclusion, the controls tested with their results, exceptions and recommendations.
Body parameters
client_idstring · uuidRequired
UUID of the client whose internal controls are tested.
control_setenum · default payment_authorisation
Set of controls to test; choose custom to test the controls you list.
payment_authorisationjournal_approvaluser_accesssegregation_of_dutiesexpense_approvalcustom
test_typeenum · default operating
Whether to test design effectiveness, operating effectiveness or both.
designoperatingboth
sample_sizeinteger · default 25
Number of items to sample for each control tested.
periodstring
Period the controls are tested over, as a free-text label such as 2026-Q2.
custom_controlsarray of strings
Names of the controls to test when control_set is custom; otherwise empty.
Returns

Skill executed successfully

skillstringRequired
Example test_controls
outputobjectRequired
output.artifact_idstring · uuid
output.download_urlstring · default
output.summarystring · default
output.citationsarray of values
output.warningsarray of strings
output.stub_fieldsarray of strings
output.test_idstring · uuid
output.overall_conclusionenum · default effective
effectivedeficientmaterial_weakness
output.controls_testedarray of values
output.exceptionsarray of values
output.recommendationsarray of strings
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALIDAuthentication required
403PERMISSION.CAPABILITY_DENIEDInsufficient permissions
404SKILL.NOT_FOUNDSkill not found
422VALIDATION.INVALID_FORMATValidation error
429RATE_LIMIT.USERRate limit exceeded
5XXINTERNAL.UNKNOWNInternal server error
curl https://uk.heyarchie.com/api/v1/skills/controls.test/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "client_id": "00000000-0000-0000-0000-000000000000",
       "control_set": "payment_authorisation",
       "test_type": "design",
       "sample_size": 0,
       "period": null,
       "custom_controls": [
         "string"
       ]
     }'
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "controls.test",
    client_id="00000000-0000-0000-0000-000000000000",
    control_set="payment_authorisation",
    test_type="design",
    sample_size=0,
    period=None,
    custom_controls=["string"],
)
print(result)
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("controls.test", {
  "client_id": "00000000-0000-0000-0000-000000000000",
  "control_set": "payment_authorisation",
  "test_type": "design",
  "sample_size": 0,
  "period": null,
  "custom_controls": [
    "string"
  ]
});
console.log(result);
Response
{
  "skill": "test_controls",
  "output": {
    "controls_tested": [
      {
        "conclusion": "deficient",
        "control_id": "PAY-01",
        "description": "Payments above GBP 10,000 need a second approver.",
        "exceptions": 2,
        "sample_size": 25,
        "test_type": "operating"
      }
    ],
    "exceptions": [
      {
        "area": "Payment authorisation",
        "description": "Two payments above GBP 10,000 had a single approver.",
        "recommendation": "Enforce dual approval in the payment system.",
        "severity": "high"
      }
    ],
    "overall_conclusion": "deficient",
    "recommendations": [
      "Enforce dual approval for payments above GBP 10,000."
    ],
    "summary": "Payment authorisation controls tested over Q2 2026.",
    "test_id": "0b8f2c1e-5d34-4e6a-9a7f-3c2d1e4f5a6b"
  },
  "correlation_id": "<string>"
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}

Every response also carries X-Request-ID. Quote it if you write to us about a call.