Documents
Bnder API documentation for Documents. Read the API Overview to get started and learn more.
Get all documents
Gets all documents the specified guild. Can be filtered by project id and number of results limited. Defaults to 100 results maximum
GET /guilds/guildId/documents
Parameters
guildId The id of a discord guild
limit The number of items to return
project_id The ID of the project
Responses
200 Response (Documents retrieved):
Response Field | Type | Description |
---|---|---|
documents | array | List of documents |
Create a new document
Creates a new document in the specified guild
POST /guilds/guildId/documents
Parameters
guildId The id of a discord guild
Request body
Request Field | Type | Description |
---|---|---|
project_id | string | ID of the project the document belongs to |
title | string | Title of the document |
content | string | Content of the document |
topic_id (optional) | string | ID of the topic the document belongs to |
in_bin (optional) | boolean | Whether the document is in the bin |
Responses 200 Response (Document created):
Response Field | Type | Description |
---|---|---|
id | string | ID of the document |
project_id | string | ID of the project the document belongs to |
title | string | Title of the document |
content | string | Content of the document |
topic_id (optional) | string | ID of the topic the document belongs to |
in_bin | boolean | Whether the document is in the bin |
delete_date (optional) | string | Date the document will be deleted if in the bin |
last_modified (optional) | string | Date the document was last modified |
Get a document
Gets the document data by id in the specified guild
GET /guilds/guildId/documents/documentId
Parameters
guildId The id of a discord guild
documentId The ID of the document
Responses
200 Response (Document retrieved):
Response Field | Type | Description |
---|---|---|
id | string | ID of the document |
project_id | string | ID of the project the document belongs to |
title | string | Title of the document |
content | string | Content of the document |
topic_id (optional) | string | ID of the topic the document belongs to |
in_bin | boolean | Whether the document is in the bin |
delete_date (optional) | string | Date the document will be deleted if in the bin |
last_modified (optional) | string | Date the document was last modified |
Update a document
Updates a document in the specified guild
PUT /guilds/guildId/documents/documentId
Parameters
guildId The id of a discord guild
documentId The ID of the document
Request body
Request Field | Type | Description |
---|---|---|
project_id (optional) | string | The project id |
title (optional) | string | The title of the document |
content (optional) | string | The content of the document |
topic_id (optional) | string | The topic id |
in_bin (optional) | boolean | Is the document in the bin |
Responses 200 Response (Document updated):
Response Field | Type | Description |
---|---|---|
id | string | ID of the document |
project_id | string | ID of the project the document belongs to |
title | string | Title of the document |
content | string | Content of the document |
topic_id (optional) | string | ID of the topic the document belongs to |
in_bin | boolean | Whether the document is in the bin |
delete_date (optional) | string | Date the document will be deleted if in the bin |
last_modified (optional) | string | Date the document was last modified |
Delete a document
Deletes a document in the specified guild
DELETE /guilds/guildId/documents/documentId
Parameters
guildId The id of a discord guild
documentId The ID of the document
Responses
204 Response (Document deleted): Empty response.