latestOpenAPI 3.0.3GitGuardian2026-08-201871515.0 MB

511b067cdcb1

Honeytokens

Create a honeytoken

This endpoint allows you to create a honeytoken of a type.

If you are using a personal access token, you need to have an access level superior or equal to manager.

post/v1/honeytokens

Request body

namestring required

honeytoken name.

descriptionstring

honeytoken description.

type'AWS' required

honeytoken type

Example request

{
  "name": "honeytoken name",
  "description": "This honeytoken was placed in the repository test",
  "type": "AWS",
  "custom_tags": [
    {
      "id": "d45a123f-b15d-4fea-abf6-ff2a8479de5b",
      "key": "env",
      "value": "prod"
    }
  ]
}

Response

Honeytoken created

idstring uuid
namestring
descriptionstring
created_atstring date-time

Creation date of the honeytoken

gitguardian_urlstring
status'active' | 'triggered' | 'revoked'

Status of the honeytoken.

triggered_atstring date-time

Date when the honeytoken was switched from active to triggered the last time

revoked_atstring date-time

Date when the honeytoken was revoked

open_events_countinteger
type'AWS'

Type of the honeytoken.

creator_idinteger nullable

Id of the member who created this honeytoken.

revoker_idinteger nullable

Id of the member who revoked this honeytoken.

creator_api_token_idstring 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_idstring uuid nullable

ID of the API key which created honeytoken note. Can be null if the honeytoken was not created via the API.

tokenobject

Secret to be placed as a honeytoken.

tagsstring[]

Example response

{
  "id": "d45a123f-b15d-4fea-abf6-ff2a8479de5b",
  "name": "honeytoken A",
  "description": "honeytoken used in the repository AA",
  "created_at": "2019-08-22T14:15:22Z",
  "gitguardian_url": "https://dashboard.gitguardian.com/workspace/1/incidents/3bf0ed1b-68b2-4db8-b944-d450c5d35cf4",
  "status": "active",
  "triggered_at": "2019-08-22T14:15:22Z",
  "revoked_at": "2019-08-22T14:15:22Z",
  "open_events_count": 122,
  "type": "AWS",
  "creator_id": 122,
  "revoker_id": 122,
  "creator_api_token_id": "f74ffca5-d06d-45c2-a3d8-e8e95d15a464",
  "revoker_api_token_id": "19058e4a-0fab-4dcc-8ed6-4e2ec9fb2e44",
  "token": {
    "access_token_id": "AAAA",
    "secret_key": "BBB"
  },
  "tags": [
    "publicly_exposed"
  ],
  "custom_tags": [
    {
      "id": "d45a123f-b15d-4fea-abf6-ff2a8479de5b",
      "key": "env",
      "value": "prod"
    }
  ]
}