Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Search documents by title and body

GET/workspaces/{organizationId}/documents/search
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Query parameters
qstringrequired
min length 1
limitinteger
min 1 · max 100
Responses
200

Matching documents

documentsobject[]required
Show properties
Array of object
idstringrequired
organizationIdstringrequired
titlestringrequired
iconstring | nullrequired
contentFormatstringrequired
Allowed:blocksmarkdowncanvas
slugstring | nullrequired
projectIdstring | nullrequired
issueIdstring | nullrequired
initiativeIdstring | nullrequired
parentDocumentIdstring | nullrequired
spaceIdstring | nullrequired
isTemplatebooleanrequired
createdByIdstringrequired
updatedByIdstring | nullrequired
createdAtstringrequired
updatedAtstringrequired
trashedAtstring | nullrequired
scorenumberrequired
snippetstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://pile.nyc/workspaces/string/documents/search?q=string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "documents": [
    {
      "id": "string",
      "organizationId": "string",
      "title": "string",
      "icon": "string",
      "contentFormat": "blocks",
      "slug": "string",
      "projectId": "string",
      "issueId": "string",
      "initiativeId": "string",
      "parentDocumentId": "string",
      "spaceId": "string",
      "isTemplate": true,
      "createdById": "string",
      "updatedById": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "trashedAt": "string",
      "score": 0,
      "snippet": "string"
    }
  ]
}

Was this page helpful?