Skip to main content
PATCH
/
api
/
v1
/
recipes
/
library
/
{recipe_id}
Update recipe
import requests

url = "https://api.example.com/api/v1/recipes/library/{recipe_id}"

payload = {
    "title": "<string>",
    "description": "<string>",
    "content_markdown": "<string>",
    "chains": ["<string>"],
    "tokens": {},
    "tags": ["<string>"],
    "category": ["<string>"],
    "example_prompts": ["<string>"],
    "icon": "<string>",
    "author_name": "<string>",
    "featured": True,
    "verified": True,
    "status": "draft",
    "sdk_example_path": "<string>",
    "locale": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "result": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "slug": "<string>",
    "title": "<string>",
    "description": "<string>",
    "example_prompts": [
      "<string>"
    ],
    "chains": [
      "<string>"
    ],
    "tags": [
      "<string>"
    ],
    "category": [
      "<string>"
    ],
    "icon": "<string>",
    "author_name": "<string>",
    "status": "draft",
    "featured": true,
    "verified": true,
    "view_count": 123,
    "use_count": 123,
    "share_count": 123,
    "search_count": 123,
    "locale": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "content_markdown": "<string>",
    "tokens": {},
    "knowledgehub_doc_id": "<string>",
    "sdk_example_path": "<string>"
  },
  "success": true,
  "suggestion": "",
  "message": "",
  "meta": {
    "total": 123,
    "offset": 123,
    "limit": 123,
    "has_more": true,
    "after": "<string>",
    "before": "<string>"
  }
}

Headers

X-Assistant-Service-Key
string | null

Path Parameters

recipe_id
string<uuid>
required

Body

application/json
title
string | null
Required string length: 1 - 255
description
string | null
Minimum string length: 1
content_markdown
string | null
chains
string[] | null
tokens
Tokens · object
tags
string[] | null
category
string[] | null
example_prompts
string[] | null
icon
string | null
Maximum string length: 512
author_name
string | null
Maximum string length: 128
verified
boolean | null
status
enum<string> | null

Lifecycle status for a recipe record.

Available options:
draft,
submitted,
published,
archived,
rejected
sdk_example_path
string | null
Maximum string length: 255
locale
string | null
Maximum string length: 8

Response

Successful Response

result
RecipeDetailRead · object
required
success
boolean
default:true
suggestion
string
default:""
message
string
default:""
meta
PaginationMeta · object

Pagination metadata for list responses.

Supports both legacy offset-based and cursor-based pagination. Cursor fields (has_more, after, before) are populated for cursor-paginated endpoints. Legacy fields (offset, limit) are populated when the caller uses the deprecated offset parameter.