Logo

Update a block

Updates an existing block with the provided details.

PUT
/block/{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

prefixstring

Prefix for rendering the block

Pattern: "^[a-zA-Z_]+$"

metadataobject

Path Parameters

uuid
Required
string

UUID of the block to update

Format: "uuid"
curl -X PUT "https://api.systemprompt.io/v1/block/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "api-key: <apikey>" \
  -H "Content-Type: application/json" \
  -d '{
    "prefix": "example_prefix",
    "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",
  "content": "This is the content of the block",
  "prefix": "example_prefix",
  "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"
}