Skip to content

Account Documents

List of valid attributes:

AttributeDescriptionSpecifics
account_idID of the account an account-document belongs toCannot be set
created_atTimestamp of document creationCannot be set
extensionFile extension, e.g. pdfRequired field. Must be either docx, csv, pdf or txt, Cannot be updated
nameName for a documentRequired field
upload_statusFile upload statusCan only be set on update. Must be either uploading, success or error
vectorization_statusVectorization status of a documentCan only be set on update. Must be either non_vectorized, succeeded or failed

Meta data: Permissions

GroupDescription
actionsContains permissions to edit or delete an account document

Meta data: Upload URL

ParameterAllowed valuesDescription
download_urltrue/falseWhen passing true on GET endpoints, it generates a temporary URL to use for downloading the account document
upload_urltrue/falseWhen 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

ParameterDescription
account_document_idThe 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

ParameterDescription
account_document_idThe 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

ParameterDescription
account_document_idThe 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

ParameterDescription
account_document_idThe 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

ParameterDescription
account_document_idThe ID of the account document to de-vectorize