---
title: "Create post-mapping code hook"
method: POST
path: "/v1/template-hooks/post-mapping/code"
tags: ["Code Hooks (Legacy)"]
---

# Create post-mapping code hook

`POST /v1/template-hooks/post-mapping/code`

Create a post-mapping code hook.

## Request body

- PostMappingCodeHookRequest
  - `key` string, required
  - `code` string, required
  - `idempotent` boolean

## Response `200`

200

- EmptyResponse

## Other responses

- `400` — 400

---

[API](https://skmtc.net/oneschema/apis/templates.md) · [All operations](https://skmtc.net/oneschema/apis/templates/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneschema/templates/revisions/40674aa6d4d9/schema)
