Reference
Platform API
Automate Maskflare with an API client: keys, providers, masking rules, devices and audit events over a versioned OpenAPI 3.1 API.
Terraform, scripts and MCP servers manage an organization through the same API the console uses, with an API client instead of a person's login. Create one under Settings › API clients with one role (admin, security, developer or auditor) and a client secret or a public key (private_key_jwt).
Authenticate
Shell
TOKEN=$(curl -s -X POST "$MASKFLARE_TOKEN_URL" \
-d grant_type=client_credentials -d client_id="$MASKFLARE_CLIENT_ID" -d client_secret="$MASKFLARE_CLIENT_SECRET" \
| jq -r .access_token)
curl -s https://YOUR_GATEWAY_HOST/api/platform/v1/organizations/current/api-keys \
-H "Authorization: Bearer $TOKEN"Contract
- OpenAPI 3.1 at
/api/platform/v1/openapi.json, browsable at/api/platform/v1/docson your gateway. It lists exactly the operations an API client may call; members, approvals, billing and webhooks stay with people. - The version is in the path. Within v1 changes are additive only.
- Rate limit: 600 requests per minute per client by default, with
RateLimit-*headers; over it, `rate_limited` withRetry-After. - Masking rule changes made by a client are proposals a person approves.
Operations
The 88 operations an API client may call in v1.
| Method | Path | What it does |
|---|---|---|
| GET | /api/platform/v1/me | Me |
| GET | /api/platform/v1/organizations/current | Current Organization |
| GET | /api/platform/v1/organizations/current/agent-policy | Get Agent Policy |
| PUT | /api/platform/v1/organizations/current/agent-policy | Publish Agent Policy |
| POST | /api/platform/v1/organizations/current/agent-policy/rollback | Rollback Agent Policy |
| GET | /api/platform/v1/organizations/current/agent-rollouts | List Rollouts |
| PUT | /api/platform/v1/organizations/current/agent-rollouts/{ring} | Start Rollout |
| DELETE | /api/platform/v1/organizations/current/agent-rollouts/{ring} | Stop Rollout |
| POST | /api/platform/v1/organizations/current/agent-rollouts/{ring}/pause | Pause Rollout |
| POST | /api/platform/v1/organizations/current/agent-rollouts/{ring}/resume | Resume Rollout |
| GET | /api/platform/v1/organizations/current/api-keys | List Api Keys |
| POST | /api/platform/v1/organizations/current/api-keys | Create Api Key |
| PATCH | /api/platform/v1/organizations/current/api-keys/{key_id} | Update Api Key |
| DELETE | /api/platform/v1/organizations/current/api-keys/{key_id} | Revoke Api Key |
| GET | /api/platform/v1/organizations/current/audit-events | List Audit Events |
| GET | /api/platform/v1/organizations/current/audit-events/actions | List Audit Actions |
| GET | /api/platform/v1/organizations/current/audit-events/export | Export Audit Events |
| GET | /api/platform/v1/organizations/current/browser-dlp | Get Browser Dlp |
| PUT | /api/platform/v1/organizations/current/browser-dlp | Update Browser Dlp |
| PUT | /api/platform/v1/organizations/current/browser-dlp/apps/{key} | Update Browser Dlp App |
| GET | /api/platform/v1/organizations/current/device-enrollment-tokens | List Enrollment Tokens |
| POST | /api/platform/v1/organizations/current/device-enrollment-tokens | Create Enrollment Token |
| DELETE | /api/platform/v1/organizations/current/device-enrollment-tokens/{token_id} | Revoke Enrollment Token |
| GET | /api/platform/v1/organizations/current/device-groups | List Groups |
| POST | /api/platform/v1/organizations/current/device-groups | Create Group |
| PUT | /api/platform/v1/organizations/current/device-groups/order | Order Groups |
| PATCH | /api/platform/v1/organizations/current/device-groups/{group_id} | Update Group |
| DELETE | /api/platform/v1/organizations/current/device-groups/{group_id} | Delete Group |
| GET | /api/platform/v1/organizations/current/device-lifecycle | Get Device Lifecycle |
| PUT | /api/platform/v1/organizations/current/device-lifecycle | Update Device Lifecycle |
| GET | /api/platform/v1/organizations/current/device-self-enrollment | Get Self Enrollment |
| PUT | /api/platform/v1/organizations/current/device-self-enrollment | Update Self Enrollment |
| GET | /api/platform/v1/organizations/current/devices | List Devices |
| GET | /api/platform/v1/organizations/current/devices/export.csv | Export Devices |
| GET | /api/platform/v1/organizations/current/devices/{device_id} | Get Device |
| PATCH | /api/platform/v1/organizations/current/devices/{device_id} | Update Device |
| DELETE | /api/platform/v1/organizations/current/devices/{device_id} | Revoke Device |
| POST | /api/platform/v1/organizations/current/devices/{device_id}/pause-code | Issue Pause Code |
| GET | /api/platform/v1/organizations/current/devices/{device_id}/timeline | Device Timeline |
| POST | /api/platform/v1/organizations/current/devices/{device_id}/uninstall-code | Issue Uninstall Code |
| GET | /api/platform/v1/organizations/current/end-user-messages | Get End User Messages |
| PUT | /api/platform/v1/organizations/current/end-user-messages | Update End User Messages |
| GET | /api/platform/v1/organizations/current/environments/{environment}/compliance-coverage | Environment Compliance Coverage |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-allowlist | Get Masking Allowlist |
| PUT | /api/platform/v1/organizations/current/environments/{environment}/masking-allowlist | Propose Masking Allowlist |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-change-sets/{change_set_id} | Get Masking Change Set |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-change-sets/{change_set_id}/lint | Lint Masking Change Set |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-profiles | Environment Masking Profiles |
| POST | /api/platform/v1/organizations/current/environments/{environment}/masking-profiles/{profile_id}/apply | Apply Masking Profile |
| POST | /api/platform/v1/organizations/current/environments/{environment}/masking-profiles/{profile_id}/upgrade | Upgrade Masking Profile |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-rule-changes | List Masking Rule Changes |
| POST | /api/platform/v1/organizations/current/environments/{environment}/masking-rule-changes/batch | Propose Masking Change Set |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-rule-changes/{change_id}/lint | Lint Masking Rule Change |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-rule-changes/{change_id}/terms | Get Masking Rule Change Terms |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-rule-lint | Lint Masking Rules |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-rule-packs | List Masking Rule Packs |
| POST | /api/platform/v1/organizations/current/environments/{environment}/masking-rule-packs/{pack} | Propose Masking Rule Pack Toggle |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-rules | List Masking Rules |
| POST | /api/platform/v1/organizations/current/environments/{environment}/masking-rules | Propose Masking Rule Create |
| POST | /api/platform/v1/organizations/current/environments/{environment}/masking-rules/preview | Preview Masking |
| PATCH | /api/platform/v1/organizations/current/environments/{environment}/masking-rules/{rule_id} | Propose Masking Rule Update |
| DELETE | /api/platform/v1/organizations/current/environments/{environment}/masking-rules/{rule_id} | Propose Masking Rule Delete |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-rules/{rule_id}/terms | Get Masking Rule Terms |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-scope | Get Masking Scope |
| PUT | /api/platform/v1/organizations/current/environments/{environment}/masking-scope/exclude | Set Masking Scope Exclude |
| PUT | /api/platform/v1/organizations/current/environments/{environment}/masking-scope/include | Set Masking Scope Include |
| GET | /api/platform/v1/organizations/current/environments/{environment}/masking-thresholds | Get Masking Thresholds |
| PUT | /api/platform/v1/organizations/current/environments/{environment}/masking-thresholds/{scope}/{key} | Set Masking Threshold |
| DELETE | /api/platform/v1/organizations/current/environments/{environment}/masking-thresholds/{scope}/{key} | Delete Masking Threshold |
| GET | /api/platform/v1/organizations/current/environments/{environment}/mcp-servers | List Mcp Servers |
| POST | /api/platform/v1/organizations/current/environments/{environment}/mcp-servers | Create Mcp Server |
| DELETE | /api/platform/v1/organizations/current/environments/{environment}/mcp-servers/{server_id} | Delete Mcp Server |
| PUT | /api/platform/v1/organizations/current/environments/{environment}/provider-passthrough | Set Provider Passthrough |
| PUT | /api/platform/v1/organizations/current/environments/{environment}/rules | Update Rules |
| GET | /api/platform/v1/organizations/current/masking-change-sets | List Masking Change Sets |
| GET | /api/platform/v1/organizations/current/masking-profiles | List Masking Profiles |
| GET | /api/platform/v1/organizations/current/masking-rule-changes | List Organization Masking Rule Changes |
| GET | /api/platform/v1/organizations/current/masking-settings | Get Masking Settings |
| GET | /api/platform/v1/organizations/current/masking-validators | List Masking Validators |
| GET | /api/platform/v1/organizations/current/provider-connections | List Connections |
| POST | /api/platform/v1/organizations/current/provider-connections/validate | Validate Connection |
| PUT | /api/platform/v1/organizations/current/provider-connections/{environment}/{provider} | Upsert Connection |
| DELETE | /api/platform/v1/organizations/current/provider-connections/{environment}/{provider} | Delete Connection |
| GET | /api/platform/v1/organizations/current/provider-passthrough | List Provider Passthrough |
| GET | /api/platform/v1/organizations/current/proxy-ca | Get Proxy Ca |
| POST | /api/platform/v1/organizations/current/proxy-ca | Provision Proxy Ca |
| GET | /api/platform/v1/organizations/current/proxy-ca/certificate | Download Proxy Ca Certificate |
| GET | /api/platform/v1/organizations/current/usage | Current Organization Usage |