Change the Organization's Compliance profile
PATCH /v1/compliance-profile
| Property | Value |
|---|---|
| Operation | update_compliance_profile |
| Group | Compliance profile |
| Scope | compliance:write |
| Route class | control |
| Idempotency | No Idempotency-Key |
| Audit | Audited compliance_profile.update (mutation) |
| Released in | 1.32.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Writes the next version of the Compliance profile at the version If-Match names and the Audit event compliance_profile.update with the values before and after, in one transaction (1.32.0, workspace ADR 0082). Session only: the api refuses the route to every API key, whatever its scopes, and to a Member who is not an owner, with 403 forbidden and the detail owner_required; only the owner holds compliance:write. A provider_regions value outside the cell's own set is refused with validation_failed and the issue region_not_in_cell. The change applies from the next Call: a Call in progress keeps the version it was admitted with. A change that leaves a published Agent version unable to run is accepted, and admission then refuses that version's Calls (provider_not_allowed).
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the compliance:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X PATCH "$VOCAL_API/v1/compliance-profile" \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H 'If-Match: "1"' \
-H "Content-Type: application/json" \
-d '{}'const response = await fetch(`${process.env.VOCAL_API}/v1/compliance-profile`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'If-Match': '"1"',
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
console.log(response.status, await response.text());import os
import requests
response = requests.patch(
f"{os.environ['VOCAL_API']}/v1/compliance-profile",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"If-Match": '"1"',
},
json={},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
if-match | header | string | yes | The revision the change was made against, quoted as the ETag returns it, or * to overwrite. |
Request body
Content type application/json, required: ComplianceProfileUpdateRequest.
| Field | Type | Required | Description |
|---|---|---|---|
byok_platform_fallback | ByokPlatformFallback | no | Whether a stage on the Organization's own key may fall back to Vocal's; forbidden by default. |
contact_inactivity_days | integer | no | Days without a Call, a message, an enrollment or an API write after which a Contact is deleted by the daily retention.scrub job (1.61.0): 30 to 365, 365 by default (targets). |
content_visibility | ContentVisibilityInput | no | The visibility matrix of the content classes by role (1.57.0), checked at read time against the profile in force. |
export_content | ExportContent | no | Whether an S3 export may carry content (1.57.0, not built); off by default. |
live_call_judging | LiveCallJudging | no | Whether live Calls may be judged (1.63.0); off by default. |
live_call_judging_sample_rate | number | no | The share of eligible Calls a judge reads while live_call_judging is on (1.63.0): 0.01 to 1, 0.1 by default (a target), drawn at finalize. |
provider_regions | array of ProviderRegion | no | The regions where the Organization's Providers may process, one to as many as ProviderRegion holds (four from 1.38.0, three before), each once; us by default. Admission and publish apply the intersection with the cell's own set, and a Provider whose descriptor names a region outside it is dropped from every chain (region_not_allowed). A region outside the cell's set is refused with validation_failed and the issue region_not_in_cell. |
recording_policy | RecordingPolicy | no | The recording policy; on_with_announcement by default. |
require_baa | boolean | no | When true, the chain resolver drops every Provider whose descriptor baa_available is neither yes nor not_applicable (baa_not_stated). Every real descriptor of 1.32.0 reads unknown, so an Organization that sets it runs only mock Providers, in test. False by default. |
reveal_approval | RevealApproval | no | Whether a reveal grant needs a second approver (1.57.0); none by default. |
revocation_scope | RevocationScope | no | How far an opt-out reaches (1.61.0): all_channels (the default) or per_channel. per_channel needs revocation_scope_attestation. |
revocation_scope_attestation | true | no | The owner's attestation that per-channel revocation fits the Organization's obligations (1.61.0), required with revocation_scope: per_channel (revocation_scope_attestation_required) and recorded in the Audit event. |
trace_retention_days | integer or null | no | Shortens the retention of stage traces below the Call row's (1.57.0): 1 day up to the platform ceiling, or null, the default, to keep them with the Call row. The api refuses a value above the ceiling with the issue trace_retention_above_ceiling. |
verbose_capture | VerboseCapture | no | Where verbose capture may run (1.57.0); allowed by default. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | ComplianceProfile | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden, org_suspended |
412 | application/json | ErrorEnvelope | revision_mismatch |
422 | application/json | ErrorEnvelope | validation_failed |
428 | application/json | ErrorEnvelope | precondition_required |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is ComplianceProfile.
| Field | Type | Required | Description |
|---|---|---|---|
byok_platform_fallback | ByokPlatformFallback | yes | Whether a stage on the Organization's own key may fall back to Vocal's; forbidden by default. |
contact_inactivity_days | integer | no | Days without a Call, a message, an enrollment or an API write after which a Contact is deleted by the daily retention.scrub job (1.61.0): 30 to 365, 365 by default (targets). Absent, from an api before 1.61.0, 365. |
content_visibility | ContentVisibility | no | The visibility matrix of the content classes by role (1.57.0), checked at read time against the profile in force. Absent from an api older than 1.57.0; a reader treats its absence as the default. |
export_content | ExportContent | no | Whether an S3 export may carry content (1.57.0, not built); off by default. Absent from an api older than 1.57.0; a reader treats its absence as the default. |
live_call_judging | LiveCallJudging | no | Whether live Calls may be judged (1.63.0); off by default. Absent from an api before 1.63.0, which a reader treats as the default. |
live_call_judging_sample_rate | number | no | The share of eligible Calls a judge reads while live_call_judging is on (1.63.0): 0.01 to 1, 0.1 by default (a target), drawn at finalize. Absent from an api before 1.63.0, which a reader treats as the default. |
object | "compliance_profile" | yes | |
provider_regions | array of ProviderRegion | yes | The regions where the Organization's Providers may process, one to as many as ProviderRegion holds (four from 1.38.0, three before), each once; us by default. Admission and publish apply the intersection with the cell's own set, and a Provider whose descriptor names a region outside it is dropped from every chain (region_not_allowed). |
recording_policy | RecordingPolicy | yes | The recording policy; on_with_announcement by default. |
require_baa | boolean | yes | When true, the chain resolver drops every Provider whose descriptor baa_available is neither yes nor not_applicable (baa_not_stated). Every real descriptor of 1.32.0 reads unknown, so an Organization that sets it runs only mock Providers, in test. False by default. |
reveal_approval | RevealApproval | no | Whether a reveal grant needs a second approver (1.57.0); none by default. Absent from an api older than 1.57.0; a reader treats its absence as the default. |
revocation_scope | RevocationScope | no | How far an opt-out reaches (1.61.0): all_channels (the default) or per_channel. Absent, from an api before 1.61.0, all_channels. |
trace_retention_days | integer or null | no | Shortens the retention of stage traces below the Call row's (1.57.0): 1 day up to the platform ceiling, or null, the default, to keep them with the Call row. The api refuses a value above the ceiling with the issue trace_retention_above_ceiling. Absent from an api older than 1.57.0; a reader treats its absence as the default. |
updated_at | Timestamp or null | yes | When the version was written; null for version 0. |
updated_by | ActorRef or null | yes | The Member who wrote the version, always an owner; null for version 0. |
verbose_capture | VerboseCapture | no | Where verbose capture may run (1.57.0); allowed by default. Absent from an api older than 1.57.0; a reader treats its absence as the default. |
version | integer | yes | The version in force: 0 for the defaults before the first update, then one more per update. Returned as the ETag and required in the If-Match of PATCH /v1/compliance-profile. |