---
title: "Change app name, language or code lifetime"
method: PATCH
path: "/api/v1/auth-hooks/{hookId}"
tags: ["Auth hooks"]
---

# Change app name, language or code lifetime

`PATCH /api/v1/auth-hooks/{hookId}`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/auth-hooks/{hookId}`
- Auth: HTTP bearer

## Path parameters

- `hookId` string, required

## Request body

- UpdateInputBody3
  - `app_name` string
  - `code_ttl_seconds` integer
  - `enabled` boolean
  - `locale` string

## Response `200`

OK

- AuthHookBody
  - `app_name` string, required: Replaces {app} in the code text, empty means the project sender name
  - `code_ttl_seconds` integer, required: Code lifetime shown in the text, set it to the SMS OTP expiry in Supabase
  - `created_at` string, date-time, required
  - `enabled` boolean, required: A turned off hook answers Supabase with an error and sends no codes
  - `has_next_secret` boolean, required
  - `has_secret` boolean, required
  - `id` string, required: Public hook id, part of the hook URL
  - `last_used_at` string, date-time, nullable, required
  - `locale` string, required: Language of the code text, empty means the project language
  - `project_id` string, required
  - `provider` 'supabase', required
  - `url` string, required: Paste this URL into Supabase: Authentication, Hooks, Send SMS hook, HTTPS

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
