{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nopaque-co-uk/json-schema/nopaque-co-uk-run-compliance-batch-request-schema.json",
  "title": "RunComplianceBatchRequest",
  "description": "Body for `POST /testing/compliance-runs` (atomic batch dispatch).",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nopaque-co-uk-compliance-api-openapi.yml#/components/schemas/RunComplianceBatchRequest",
  "type": "object",
  "required": [
    "phoneNumber",
    "sector",
    "testIds"
  ],
  "properties": {
    "phoneNumber": {
      "type": "string",
      "pattern": "^\\+[1-9]\\d{1,14}$",
      "description": "Target phone number for the compliance probe, in E.164 format\n(e.g. `+442012345678`). All `testIds` in the batch are dispatched\nagainst this single number.\n"
    },
    "sector": {
      "type": "string",
      "description": "Regulatory sector to evaluate against (e.g. `financial-services`,\n`telco`, `all`). Each `testId` must declare this sector in its\ncatalogue `sectors` array, or be tagged `sectors: [all]`. See\n`listComplianceCatalogue` for the full set of available sector\nidentifiers and their applicable tests.\n"
    },
    "testIds": {
      "type": "array",
      "maxItems": 1000,
      "minItems": 1,
      "items": {
        "type": "string",
        "pattern": "^M-\\d{3}$"
      },
      "description": "Array of compliance test IDs (one per probe) to run against\n`phoneNumber`. Each ID corresponds to one entry in\n`listComplianceCatalogue` (pattern `M-NNN`). Batch size is capped\nby the workspace tier's `pickerLimit` — see the 402\n`BATCH_SIZE_EXCEEDS_TIER` response for the limit.\n"
    },
    "carrierRouteId": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128
        },
        {
          "type": "null"
        }
      ],
      "description": "Bring-your-own-carrier (invite-only). Dial every test in this audit through one of the\nworkspace's carrier routes, over the workspace's own SIP trunk, instead of nopaque's\nnetwork. Carrier routes are set up with nopaque. The route sent becomes this number's\ndefault, so later audits keep it; omit the key to use the stored default, or pass\n`null` to dial over nopaque's network and clear the default. An audit with a route\ndials through it or not at all: if the route cannot be dialled, nothing is run (409,\n429 when the trunk has used today's minutes, 403 or 503). Carrier calls are metered as\n`carrier_compliance`, from answer, and count toward the trunk's daily minutes. Each run\nrecords the route as `carrier {integrationId, routeId}`.\n"
    }
  }
}