---
title: "HMAC Hash"
method: POST
path: "/hash/hmac"
---

# HMAC Hash

`POST /hash/hmac`

## Request

- Base URL: `https://client.apimetrics.io/api/2`
- URL: `https://client.apimetrics.io/api/2/hash/hmac`
- Auth: none required
- TypeScript: <https://skmtc.dev/apicontext/apis/api-settings/docs/hash/hmac/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `alg` string: The algorthim to use for hashing, e.g. sha256
  - `key` string, required: The key to use for the hash. Must be compatible with the algorithm chosen.
  - `msg` string, required: The message to hash

## Response `200`

200

- object
  - `alg` string
  - `digest` string
  - `hex_digest` string

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/apicontext/apis/api-settings.md) - [All operations](https://skmtc.dev/apicontext/apis/api-settings/llms.txt) - [OpenAPI document](https://skmtc.dev/apicontext/apis/api-settings/revisions/2e9a62324e82?raw)
