Patch prompt

Allows for patching fields within a prompt using the RFC 6902 JSON PATCH standard. All fields are permitted except for the id field as that is the unique identifier of the prompt.

BETA: Currently in beta!

‼️ATTENTION: This endpoint is ONLY available for customers on develop or launch tier. Manage your subscription via stripe.

Request Body

Currently the Request Body field does not show an API request as the documentation tool we are using does not support request body as a list at the time of writing this specification.

We are putting several Request Body examples below along with a link to the RFC 6902 documentation to demonstrate how to use this API. We apologize for any inconvenience and will update this specification when support comes available.

Operation Components

op(Operation)

  • Type: String
  • Required: Yes
  • Description: Specifies the type of operation to perform
  • Valid Values: add, remove, replace, move, copy, test
  • Example: "op": "add"

path(JSON Pointer)

  • Type: String
  • Required: Yes
  • Description: A JSON Pointer string specifying the location within the target document where the operation should be performed
  • Format: Uses JSON Pointer syntax (RFC 6901)
  • Examples:
    • "/name" - Root level field
    • "/tags/0" - First element in array
    • "/tags/-" - Append to array
    • "/meta/fhir_store_id" - Nested object field
    • "/tools/1" - Second element in array

value(Value)

  • Type: Any JSON value
  • Required: For add, replace, test operations
  • Description: The value to be used in the operation
  • Examples:
    • "value": "New Agent Name"
    • "value": 42
    • "value": true
    • "value": ["item1", "item2"]
    • "value": {"key": "value"}

from(Source Path)

  • Type: String
  • Required: For move and copy operations
  • Description: A JSON Pointer string specifying the source location in the target document
  • Format: Same as path field
  • Example: "from": "/old_name"

Example Operations

Add Operation

[
  {
    "op": "add",
    "path": "/name",
    "value": "Medical Assistant Agent"
  }
]

Remove Operation

[
  {
    "op": "remove",
    "path": "/description"
  }
]

Replace Operation

[
  {
    "op": "replace",
    "path": "/name",
    "value": "Updated Medical Assistant"
  }
]

Move Operation

[
  {
    "op": "move",
    "from": "/old_name",
    "path": "/name"
  }
]

Copy Operation

[
  {
    "op": "copy",
    "from": "/name",
    "path": "/display_name"
  }
]

Test Operation

[
  {
    "op": "test",
    "path": "/is_active",
    "value": true
  },
  {
    "op": "replace",
    "path": "/is_active",
    "value": false
  }
]
Language
Credentials
Bearer
JWT
URL
Click Try It! to start a request and see the response here!