API REFERENCE
List Templates
On this page
/api/agents/templatesRetrieve every template visible to the authenticated account. The response combines templates the account owns, public templates created by other accounts, and private templates that have been shared with the authenticated account's email.
Authentication
x-api-key in header
bearerAuth bearer
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/agents/templates' \
--header 'x-api-key: YOUR_API_KEY'Responses
200Templates retrieved successfully+
application/json
statusstring · enumrequiredStatus of the request
Values: "success"
templatesarray<Template>requiredTemplates accessible to the authenticated account (own, public, and shared)
Item properties for templates
idstringrequiredUnique identifier of the template
format: uuid
titlestringrequiredShort human-readable title for the template (3-50 characters)
descriptionstringrequiredDescription of what the template does (10-200 characters)
promptstringrequiredThe agent prompt body (20-10000 characters)
tagsarray<string>requiredFree-form tags used to categorize the template. Empty array when there are no tags.
Item properties for tags
string
creatorobject | nullrequiredThe account that created the template. May be null when the creator account is unavailable.
Properties for creator
idstringrequiredUnique identifier of the creator account
format: uuid
namestring | nullrequiredDisplay name of the creator account
imagestring | nullrequiredProfile image URL of the creator account
is_adminbooleanrequiredWhether the creator is a Recoup admin (their account email is on the platform admin allow-list)
is_privatebooleanrequiredWhether the template is restricted to the creator and explicitly shared accounts
is_favouritebooleanrequiredWhether the authenticated account has favorited this template
favorites_countintegerrequiredTotal number of accounts that have favorited this template
shared_emailsarray<string>requiredEmails the template has been shared with. Only populated for private templates the authenticated account owns; empty for public templates and for private templates shared with the caller.
Item properties for shared_emails
string
created_atstringrequiredISO 8601 timestamp of when the template was created
format: date-time
updated_atstring | nullrequiredISO 8601 timestamp of when the template was last updated
format: date-time
401Unauthorized - missing or invalid credentials+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredHuman-readable error message
missing_fieldsarray<string>Names of required fields that were missing from the request, when applicable
Item properties for missing_fields
string
500Internal server error+
application/json
statusstring · enumrequiredStatus of the request
Values: "error"
errorstringrequiredHuman-readable error message
missing_fieldsarray<string>Names of required fields that were missing from the request, when applicable
Item properties for missing_fields
string
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download templates.jsonView operation source
{
"summary": "List templates",
"description": "Retrieve every template visible to the authenticated account. The response combines templates the account owns, public templates created by other accounts, and private templates that have been shared with the authenticated account's email.",
"security": [
{
"apiKeyAuth": []
},
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Templates retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListTemplatesResponse"
}
}
}
},
"401": {
"description": "Unauthorized - missing or invalid credentials",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}