# Test Internal Controls

> Tests a client's internal controls for design or operating effectiveness, with sample selection and exception reporting. You must supply client_id, and…

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_id string · uuid Required

UUID of the client whose internal controls are tested.

control_set enum · default payment_authorisation

Set of controls to test; choose custom to test the controls you list.

payment_authorisation journal_approval user_access segregation_of_duties expense_approval custom

test_type enum · default operating

Whether to test design effectiveness, operating effectiveness or both.

design operating both

sample_size integer · default 25

Number of items to sample for each control tested.

period string

Period the controls are tested over, as a free-text label such as 2026-Q2.

custom_controls array of strings

Names of the controls to test when control_set is custom; otherwise empty.

Returns

Skill executed successfully

skill string Required

Example test_controls

output object Required

output.artifact_id string · uuid

output.download_url string · default

output.summary string · default

output.citations array of values

output.warnings array of strings

output.stub_fields array of strings

output.test_id string · uuid

output.overall_conclusion enum · default effective

effective deficient material_weakness

output.controls_tested array of values

output.exceptions array of values

output.recommendations array of strings

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Previous ← Review an Audit Workpaper](https://heyarchie.com/en-gb/developers/api-reference/audit/review-an-audit-workpaper/)[Next Prepare an Audit Working Paper →](https://heyarchie.com/en-gb/developers/api-reference/audit/prepare-an-audit-working-paper/)

```
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>"
  }
}
```

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