---
title: "Update a honeytoken"
method: PATCH
path: "/v1/honeytokens/{honeytoken_id}"
tags: ["Honeytokens"]
---

# Update a honeytoken

`PATCH /v1/honeytokens/{honeytoken_id}`

Update a name or descriptions of an existing honeytoken.

## Path parameters

- `honeytoken_id` string, uuid, required

## Headers

- `X-Privacy-Mode` 'true' | 'false'

## Request body

- object
  - `name` string — A new honeytoken name
  - `description` string — A new honeytoken description
  - `custom_tags` object[] — A new set of custom tags for the honeytoken. Will completely override the former custom tags.
    - `id` string, uuid
    - `key` string
    - `value` string, nullable

## Response `200`

The honeytoken was updated successfully.

- object
  - `id` string, uuid
  - `name` string
  - `description` string
  - `created_at` string, date-time — Creation date of the honeytoken
  - `gitguardian_url` string
  - `status` 'active' | 'triggered' | 'revoked' — Status of the honeytoken.
  - `triggered_at` string, date-time — Date when the honeytoken was switched from active to triggered the last time
  - `revoked_at` string, date-time — Date when the honeytoken was revoked
  - `open_events_count` integer
  - `type` 'AWS' — Type of the honeytoken.
  - `creator_id` integer, nullable — Id of the member who created this honeytoken.
  - `revoker_id` integer, nullable — Id of the member who revoked this honeytoken.
  - `creator_api_token_id` string, uuid, nullable — ID of the API key which created this honeytoken. Can be null if the honeytoken was not created via the API.
  - `revoker_api_token_id` string, uuid, nullable — ID of the API key which created honeytoken note. Can be null if the honeytoken was not created via the API.
  - `token` object — Secret to be placed as a honeytoken.
  - `tags` string[]
  - `custom_tags` object[] — Custom tags set on the honeytoken.
    - `id` string, uuid
    - `key` string
    - `value` string, nullable

## Other responses

- `400` — Invalid data
- `401` — Invalid API key
- `503` — API under maintenance

---

[API](https://skmtc.net/gitguardian/apis/gitguardian-api.md) · [All operations](https://skmtc.net/gitguardian/apis/gitguardian-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitguardian/gitguardian-api/revisions/511b067cdcb1/schema)
