---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Mac verify on a key"
description: "`keys.keys.mac_verify` (POST /v1/{name}:macVerify): Verifies a MAC made by a MAC key, in constant time."
type: reference
product: platform
summary: "Verifies a MAC made by a MAC key, in constant time."
updated: 2026-09-28
nav: false
---

> **This method is not served on the public API.** `api.sylphx.com` does not route this call: its backend is not deployed behind the public API, or does not implement the call. This page documents the contract. It is kept out of the sidebar and of search engines.

Verifies a MAC made by a MAC key, in constant time.

**Not available yet.** Sylphx Keys is declared in the registry but no backend serves it: every call answers `501` with the problem code `UNIMPLEMENTED`.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/keys/key:macVerify`
- **Scope** `keys:verify`
- **Effect** `read` — nothing is written.
- **Collection** [keys](/docs/api/keys)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The key to use. Required. |
| `key_version` | `string` | The version to use; default the primary version. |
| `data` | `bytes` | The message. Required. |
| `mac` | `bytes` | The MAC to check. Required. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `valid` | `bool` | The MAC is valid. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`INVALID_STATE`](/docs/api/errors/INVALID_STATE) — The Resource is in a state that forbids the call.
- [`RATE_LIMITED`](/docs/api/errors/RATE_LIMITED) — The rate limit is reached; see Retry-After.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/keys/key:macVerify" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data":"…","mac":"…"}'
```

**TypeScript**

```ts
const response = await sylphx.keys.keys.macVerify({ data: '…', mac: '…', name: 'orgs/acme/projects/shop/envs/production/keys/key' })
```

**Rust**

```rust
let mut req = sylphx::keys::MacVerifyRequest::default();
req.data = "…".to_string();
req.mac = "…".to_string();
req.name = "orgs/acme/projects/shop/envs/production/keys/key".to_string();
let response = sx.keys().keys().mac_verify(req).await?;
```

**CLI**

```bash
sylphx keys keys mac-verify orgs/acme/projects/shop/envs/production/keys/key
```

**MCP**

```json
{ "method_id": "keys.keys.mac_verify", "args": {"data":"…","mac":"…","name":"orgs/acme/projects/shop/envs/production/keys/key"} }
```
