Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Docs

File, pin or archive a doc

Puts a doc in a folder (by its name, made when it is new) or unfiles it (null), pins it to the top of Docs, or archives it. An archived doc is out of Docs and out of search until it is restored (archived: false). None of these changes its text or its version.

patch/api/v1/docs/{slug}/place

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy docs place
MCP tooltroopy_place_doc
Rate limit60 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Path parameters

slug*string

The doc's id in the workspace, like acme-ltd

At most 80 characters

Body

application/json
folderstring | null
pinnedboolean
archivedboolean

Response

200 · application/json
data*object
16 properties
slug*string
kind*enum<string>

What the doc is: a document (doc, brief, article, policy, decision, project, topic), a record about one person, company or product, an interview with a customer or an expert, or the report of a research

docbriefarticlepolicydecisionprojecttopicpersoncompanyproductinterviewresearch

title*string
version*integer
folder*string | null

The name of its folder; null when it is unfiled

pinned*boolean

Pinned to the top of Docs, for everyone

archived*boolean

Out of Docs and out of search, until someone restores it

support*boolean

The Support Agent tells the visitors of the website what it says. Off until a person turns it on

properties*array<object>

The values that it has of the properties of its collection, in their order

5 properties
id*string

The id of the property: a write sends its value by this id

name*string
type*enum<string>

textnumberdateselectmulti_selecturlcheckbox

value*string | number | boolean | array<string> | null

The value as it is kept: a select keeps the id of its option

text*string

The value as people read it: the name of an option, a date, Yes

cover*string | null

The first of its own images, on Troopy (it downloads with your key), or null

research*string | null

A report: the research that it answers (GET /research/{id})

createdBy*object | null
3 properties
type*enum<string>

personagentapi

id*string
name*string
updatedBy*object

Who wrote it

3 properties
type*enum<string>

personagentapi

id*string
name*string
createdAt*string

ISO 8601 date and time

updatedAt*string

ISO 8601 date and time

preview*string

The start of its text, as plain words

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
404 not_foundCheck the path and any id in it. Every operation is listed in /api/v1/openapi.json.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.