Our Python SDK got smarter. We developed a Typscript SDK too. We are updating our SDK code blocks. Python SDKhere.Typscript SDKhere.
Description

Update Prompt Definition

Update a prompt definition's name or description.

Only updates fields that are provided (not null). Returns the updated prompt definition.

PATCH
/v1/prompt-definitions/{prompt_id}
/v1/prompt-definitions/{prompt_id}

The Authorization access token

Authorization

X-API-KEY<token>

In: header

Request Body

application/jsonRequired

nameName

descriptionDescription

Path Parameters

prompt_id
Required
Prompt Id

ID of the prompt definition to update

Format: "uuid"
curl -X PATCH "https://api.patronus.ai/v1/prompt-definitions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "X-API-KEY: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string"
  }'

Successful Response

{
  "prompt_definition": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
    "project_name": "string",
    "name": "string",
    "description": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "latest_revision": 0
  }
}