Context Management

Update a custom prompt

Changed on

Updates a prompt by ID. An absent field keeps its stored value. null clears a nullable field or removes a map entry; other fields reject null. In batches and imports, items match stored items by natural key, stored items absent from the batch are untouched, and nothing else is deleted. A blank CSV cell counts as absent. Returns 409 if another prompt already has the resulting name and locale. Requires org:context:write.

patch/v2/context-groups/{groupId}/custom-prompts/{customPromptId}

Request

  • Base URL: https://api.gtx.dev
  • URL: https://api.gtx.dev/v2/context-groups/{groupId}/custom-prompts/{customPromptId}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

groupIdstring required

Context group ID.

customPromptIdstring required

Custom prompt ID.

Headers

gt-api-version'2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1'

API contract version. Defaults to the oldest supported version.

Request body

namestring
localestring nullable

Locale the prompt applies to; null applies it to every locale.

valuestring
descriptionstring nullable

null clears the description.

Response

Custom prompt updated

committedtrue required

Changes