Account Documents
List of valid attributes:
Attribute | Description | Specifics |
---|---|---|
account_id | ID of the account an account-document belongs to | Cannot be set |
created_at | Timestamp of document creation | Cannot be set |
extension | File extension, e.g. pdf | Required field. Must be either docx , csv , pdf or txt , Cannot be updated |
name | Name for a document | Required field |
upload_status | File upload status | Can only be set on update. Must be either uploading , success or error |
vectorization_status | Vectorization status of a document | Can only be set on update. Must be either non_vectorized , succeeded or failed |
Meta data: Permissions
Group | Description |
---|---|
actions | Contains permissions to edit or delete an account document |
Meta data: Upload URL
Parameter | Allowed values | Description |
---|---|---|
download_url | true/false | When passing true on GET endpoints, it generates a temporary URL to use for downloading the account document |
upload_url | true/false | When passing true on CREATE endpoint, it generates a temporary URL to use for uploading the account document |
Create
Example request:
{ "data": { "type": "account_document", "data": { "attributes": { "extension": "pdf", "name": "Account Document Name" } } }}
Example response:
{ "data": { "id": "66370ab1-8d08-4a03-b0ac-4ba83c8f101d", "type": "account_document", "attributes": { ... } }}
On success, this endpoint creates a new account document with
upload_status = "uploading"
and vectorization_status = "not_vectorized"
.
Also generates a presigned URL for uploading the document, if upload_url
meta
is passed.
HTTP Request
POST /api/v1/account_documents
Update
Example request:
{ "data": { "type": "account_document", "data": { "attributes": { "name": "Document Name", "upload_status": "success" } } }}
Example response:
{ "data": { "id": "52370ab1-7d08-4a03-b0ac-4ba63c8f209d", "type": "account_document", "attributes": { ... } }}
On success, this endpoint updates the account document with the given ID and returns it.
HTTP Request
PUT /api/v1/account_documents/:account_document_id
URL Parameters
Parameter | Description |
---|---|
account_document_id | The ID of the account document to update |
List
Example response:
{ "data": [ { "id": "0a7cd22a-ceab-4b38-a6a2-1ea9e550ca53", "type": "account_document", "attributes": { ... } }, { ... } ]}
This endpoint returns all account documents.
HTTP Request
GET /api/v1/account_documents
Show
Example response:
{ "data": { "id": "3aab0a84-8ed3-4ddf-8572-f1799bb60e0a", "type": "account_document", "attributes": { ... } }}
This endpoint returns an account document.
HTTP Request
GET /api/v1/account_documents/:account_document_id
URL Parameters
Parameter | Description |
---|---|
account_document_id | The ID of the account document to return |
Delete
Example response:
{ "data": { "id": "bfcde02e-7e9e-4706-9504-ae0cecd5019c", "type": "account_document", "attributes": { ... } }}
This endpoint deletes an account document with the given ID.
HTTP Request
DELETE /api/v1/account_documents/:account_document_id
URL Parameters
Parameter | Description |
---|---|
account_document_id | The ID of the account document to delete |
Vectorize
Example response:
{ "data": { "id": "bfcde02e-7e9e-4706-9504-ae0cecd5019c", "type": "account_document", "attributes": { "vectorization_status": "succeeded", ... } }}
This endpoint vectorizes an account document with the given ID and thus makes the information available to AI-agent @Pulse.
HTTP Request
CREATE /api/v1/account_documents/:account_document_id/vectorize
URL Parameters
Parameter | Description |
---|---|
account_document_id | The ID of the account document to vectorize |
De-vectorize
Example response:
{ "data": { "id": "bfcde02e-7e9e-4706-9504-ae0cecd5019c", "type": "account_document", "attributes": { "vectorization_status": "not_vectorized", ... } }}
This endpoint de-vectorizes an account document with the given ID. This means that the information contained in this document is no longer available to the AI-agent @Pulse.
HTTP Request
DELETE /api/v1/account_documents/:account_document_id/vectorize
URL Parameters
Parameter | Description |
---|---|
account_document_id | The ID of the account document to de-vectorize |