Skip to main content
PATCH
/
api
/
agents
/
templates
/
{id}
Update a template
curl --request PATCH \
  --url https://api.recoupable.com/api/agents/templates/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "prompt": "<string>",
  "tags": [
    "<string>"
  ],
  "is_private": true,
  "share_emails": [
    "jsmith@example.com"
  ]
}
'
{
  "status": "success",
  "template": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "description": "<string>",
    "prompt": "<string>",
    "tags": [
      "<string>"
    ],
    "creator": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "image": "<string>",
      "is_admin": true
    },
    "is_private": true,
    "is_favourite": true,
    "favorites_count": 123,
    "shared_emails": [
      "jsmith@example.com"
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Path Parameters

id
string<uuid>
required

The unique identifier (UUID) of the template to update

Body

application/json

Fields to update on the template

All fields are optional. Only supplied fields are updated.

title
string

Short human-readable title for the template

Required string length: 3 - 50
description
string

Description of what the template does

Required string length: 10 - 200
prompt
string

The agent prompt body

Required string length: 20 - 10000
tags
string[]

Free-form tags used to categorize the template. Pass an empty array to clear tags.

is_private
boolean

When true, the template is restricted to the creator and the accounts listed in share_emails

share_emails
string<email>[]

Replaces the existing share list for the template. Only applied when the template is (or becomes) private.

Response

Template updated successfully

status
enum<string>
required

Status of the request

Available options:
success
template
object
required