Reference: Documents

Your server’s documents, their files, tags and versions.

Good to know

Every request needs your key: Authorization: Bearer tfy_…. Replace YOUR_SERVER_ID with your Discord server id. Errors are explained in Requests, errors and limits.

GET /documents

GET /guilds/{guildId}/documents

The documents the caller may read, in order, without their text. mayWrite says whether they may change them. q (up to 100 characters) keeps those whose title or text holds it, in any case, each with snippet: the words around the first match.

Key permissionAny key of this server.

Query parameters

Added to the address after a ?, like ?limit=10&order=asc.

FieldTypeRequiredWhat it is
qstringNoat most 100 characters

No request body.

Example

curl -X GET "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

POST /documents

POST /guilds/{guildId}/documents

A new one: title, icon (the name of one of the dashboard's icons, such as shield-check; never emoji), visibility, roleIds, optional content. Its slug comes from the title. Up to 200 per server.

Key permissiondocuments.write (Write and manage documents)

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
titlestringYes1 to 120 characters
iconstring or nullNoat most 32 characters
visibility"public" | "members" | "staff" | "roles"Nodefault "staff"
roleIdsarray of stringNoat most 20 items · default []
contentanyNo

Example

curl -X POST "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"…"}'

GET /documents/{documentId}

GET /guilds/{guildId}/documents/{documentId}

The document with its content, version and ready files.

Key permissionAny key of this server.

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).

No request body.

Example

curl -X GET "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

PUT /documents/{documentId}

PUT /guilds/{guildId}/documents/{documentId}

Saves it whole with the version it was read at (409 changed when somebody saved in between, 409 slug_taken). Only its own files may be shown. Only a change of title, address or visibility is written to the audit log (documents.changed), since the editor saves while people type.

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
titlestringYes1 to 120 characters
iconstring or nullNoat most 32 characters
visibility"public" | "members" | "staff" | "roles"Yes
roleIdsarray of stringNoat most 20 items · default []
slugstringNoat most 60 characters
contentanyNo
versionstringYes1 to 40 characters

Example

curl -X PUT "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"…","visibility":"public","version":"…"}'

DELETE /documents/{documentId}

DELETE /guilds/{guildId}/documents/{documentId}

Deletes it with its files and its history.

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).

No request body.

Example

curl -X DELETE "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

GET /documents/{documentId}/files/{fileId}

GET /guilds/{guildId}/documents/{documentId}/files/{fileId}

A picture or video. One byte range is honoured, for seeking in a video.

Key permissionAny key of this server.

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).
fileIdstringYesA file’s id inside the document or storage.

No request body.

Example

curl -X GET "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID/files/FILEID" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

PUT /documents/{documentId}/tags

PUT /guilds/{guildId}/documents/{documentId}/tags

tagIds (up to 10, this server's only, 422 otherwise). Not a save of the document: its version stays.

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
tagIdsarray of stringYesat most 20 items

Example

curl -X PUT "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID/tags" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tagIds":["…"]}'

POST /documents/{documentId}/uploads

POST /guilds/{guildId}/documents/{documentId}/uploads

Room for a picture (up to 8 MB) or a video (up to 25 MB): filename, contentType, sizeBytes. Counted toward storage at once (409 storage_full). Answers ticket and uploadUrl.

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
filenamestringYes1 to 200 characters
contentTypestringYes
sizeBytesintegerYes

Example

curl -X POST "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID/uploads" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"…","contentType":"…","sizeBytes":1}'

GET /documents/{documentId}/versions

GET /guilds/{guildId}/documents/{documentId}/versions

Its earlier states, newest first, without their text.

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).

No request body.

Example

curl -X GET "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID/versions" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

GET /documents/{documentId}/versions/{versionId}

GET /guilds/{guildId}/documents/{documentId}/versions/{versionId}

One earlier state, with its text.

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).
versionIdstringYesAn earlier version’s id (dvr_…).

No request body.

Example

curl -X GET "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID/versions/VERSIONID" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

POST /documents/{documentId}/versions/{versionId}/restore

POST /guilds/{guildId}/documents/{documentId}/versions/{versionId}/restore

Makes that state the document again, with the version the caller read (409 changed otherwise). What it is now is kept first. A picture or video deleted since is left out. Audit documents.restored.

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
documentIdstringYesA document’s id (doc_…).
versionIdstringYesAn earlier version’s id (dvr_…).

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
versionstringYes1 to 40 characters

Example

curl -X POST "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/DOCUMENTID/versions/VERSIONID/restore" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version":"…"}'

PUT /documents/order

PUT /guilds/{guildId}/documents/order

The order of the list: every id once.

Key permissiondocuments.write (Write and manage documents)

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
idsarray of stringYesat most 500 items

Example

curl -X PUT "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/order" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["…"]}'

GET /documents/tags

GET /guilds/{guildId}/documents/tags

Key permissionAny key of this server.

No request body.

Example

curl -X GET "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/tags" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

POST /documents/tags

POST /guilds/{guildId}/documents/tags

Key permissiondocuments.write (Write and manage documents)

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
namestringYes1 to 30 characters
color"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "gray"Nodefault "gray"

Example

curl -X POST "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/tags" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'

PUT /documents/tags/{tagId}

PUT /guilds/{guildId}/documents/tags/{tagId}

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
tagIdstringYesA document tag’s id (dtg_…).

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
namestringYes1 to 30 characters
color"red" | "orange" | "yellow" | "green" | "blue" | "purple" | "gray"Nodefault "gray"

Example

curl -X PUT "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/tags/TAGID" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"…"}'

DELETE /documents/tags/{tagId}

DELETE /guilds/{guildId}/documents/tags/{tagId}

Key permissiondocuments.write (Write and manage documents)

In the address

FieldTypeRequiredWhat it is
tagIdstringYesA document tag’s id (dtg_…).

No request body.

Example

curl -X DELETE "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/tags/TAGID" \
  -H "Authorization: Bearer $TECHNIFIED_KEY"

PUT /documents/tags/order

PUT /guilds/{guildId}/documents/tags/order

The order of the tags: every id once.

Key permissiondocuments.write (Write and manage documents)

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredWhat it is
idsarray of stringYesat most 500 items

Example

curl -X PUT "https://api.technified.xyz/v1/guilds/YOUR_SERVER_ID/documents/tags/order" \
  -H "Authorization: Bearer $TECHNIFIED_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":["…"]}'

Still stuck? Get help from the Technified team.