API reference

API reference · Playground

Edit a saved prompt

PATCH/api/prompts/{id}Signed in session

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredintegerThe prompt id.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
namestring
contentstring

Example

{
  "name": "string",
  "content": "Say hello in five words."
}

Answer 200

Updated.

Fields of the 200 answer
FieldTypeWhat it is
promptSavedPrompt
prompt.idinteger
prompt.namestring
prompt.contentstring
prompt.createdAtinteger
prompt.updatedAtinteger

Errors

  • 400OpenAI shaped error.
  • 404OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter