Logo

Update a prompt

Updates an existing prompt with the provided details.

PUT
/prompt/{uuid}

Authorization

api-key<token>

This is a required API key. It must be included in the header of all requests in the format: api-key: value.

In: header

Request Body

application/jsonRequired

[key: string]any

instructionobject

inputunknown

outputunknown

metadataobject

Path Parameters

uuid
Required
string

UUID of the prompt to update

Format: "uuid"
curl -X PUT "https://api.systemprompt.io/v1/prompt/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "api-key: <apikey>" \
  -H "Content-Type: application/json" \
  -d '{
    "instruction": {
      "static": "You are a world class journalist. Analyse the research and create an amazing blog, use the content for information {{referenced_content}}",
      "state": "{{conversation.history}}",
      "dynamic": "{{message}}"
    },
    "input": {
      "name": "ResearchAnalysis",
      "description": "This is a schema that accepts structured data or messages",
      "type": "structured_data",
      "reference": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "schema": {
        "type": "object",
        "properties": {
          "$schema": {
            "type": "string",
            "description": "The JSON Schema version",
            "default": "http://json-schema.org/draft-07/schema#"
          },
          "type": {
            "type": "string",
            "enum": [
              "object"
            ]
          },
          "properties": {
            "name": {
              "type": "string"
            }
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": {
          "type": "boolean"
        }
      }
    },
    "output": {
      "name": "AIGeneratedOutput",
      "description": "This is a schema that accepts structured data or messages",
      "type": "structured_data",
      "reference": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "schema": {
        "type": "object",
        "properties": {
          "$schema": {
            "type": "string",
            "description": "The JSON Schema version",
            "default": "http://json-schema.org/draft-07/schema#"
          },
          "type": {
            "type": "string",
            "enum": [
              "object"
            ]
          },
          "properties": {
            "name": {
              "type": "string"
            }
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": {
          "type": "boolean"
        }
      }
    },
    "metadata": {
      "title": "Research Analysis",
      "description": "A schema for analysing research data for blogs",
      "created": "2023-04-01T12:00:00Z",
      "updated": "2023-04-01T12:00:00Z",
      "version": 1,
      "status": "published",
      "tag": [
        "SystemPrompt",
        "Blog",
        "Conversation",
        "Text Output"
      ],
      "log_message": "Created a new research analysis",
      "author": "admin"
    }
  }'

Successful response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "instruction": {
    "static": "You are a world class journalist. Analyse the research and create an amazing blog, use the content for information {{referenced_content}}",
    "state": "{{conversation.history}}",
    "dynamic": "{{message}}"
  },
  "input": {
    "name": "ResearchAnalysis",
    "description": "This is a schema that accepts structured data or messages",
    "type": "structured_data",
    "reference": [
      {
        "uuid": "123e4567-e89b-12d3-a456-426614174000",
        "link": "/v1/input/123e4567-e89b-12d3-a456-426614174000",
        "type": "input"
      }
    ],
    "schema": {
      "type": "object",
      "properties": {
        "$schema": {
          "type": "string",
          "description": "The JSON Schema version",
          "default": "http://json-schema.org/draft-07/schema#"
        },
        "type": {
          "type": "string",
          "enum": [
            "object"
          ]
        },
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": {
        "type": "boolean"
      }
    }
  },
  "output": {
    "name": "AIGeneratedOutput",
    "description": "This is a schema that accepts structured data or messages",
    "type": "structured_data",
    "reference": [
      {
        "uuid": "123e4567-e89b-12d3-a456-426614174000",
        "link": "/v1/output/123e4567-e89b-12d3-a456-426614174000",
        "type": "output"
      }
    ],
    "schema": {
      "type": "object",
      "properties": {
        "$schema": {
          "type": "string",
          "description": "The JSON Schema version",
          "default": "http://json-schema.org/draft-07/schema#"
        },
        "type": {
          "type": "string",
          "enum": [
            "object"
          ]
        },
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": {
        "type": "boolean"
      }
    }
  },
  "metadata": {
    "title": "Research Analysis",
    "description": "A schema for analysing research data for blogs",
    "created": "2023-04-01T12:00:00Z",
    "updated": "2023-04-01T12:00:00Z",
    "version": 1,
    "status": "published",
    "tag": [
      "SystemPrompt",
      "Blog",
      "Conversation",
      "Text Output"
    ],
    "log_message": "Created a new research analysis",
    "author": "admin"
  },
  "_link": "string"
}