Skip to content

Upload a file directly into the Vault (statements, documents)

POST
/v1/vault/objects
curl --request POST \
--url https://api.trustysweep.com/v1/vault/objects \
--header 'Content-Type: multipart/form-data' \
--cookie sweep_session=<sweep_session> \
--form file=@file \
--form name=example \
--form kind=statement
Idempotency-Key
string
<= 255 characters

Unique key per logical operation. Same key + same body within 24h replays the original response with Idempotent-Replayed: true; same key + different body → 409 idempotency_key_reused.

Media typemultipart/form-data
object
file
required
string format: binary
name
string
kind
string
Allowed values: statement file

Created

Media typeapplication/json
object
id
required

Prefixed ULID (vlt_…)

string
/^vlt_[0-9A-HJKMNP-TV-Z]{26}$/
asset_id
One of:

Prefixed ULID (ast_…)

string
/^ast_[0-9A-HJKMNP-TV-Z]{26}$/
name
One of:
string
provider
One of:
string
Allowed values: google_gmail google_drive microsoft_outlook microsoft_onedrive dropbox apple_local s3_compatible trusty_vault simulated
source_id
One of:

Prefixed ULID (src_…)

string
/^src_[0-9A-HJKMNP-TV-Z]{26}$/
sha256
required
string
size_bytes
required
integer
mime_type
One of:
string
state
required
string
Allowed values: uploading verifying committed corrupt deleting deleted cold
created_at
required
string format: date-time
verified_at
One of:
string format: date-time
cold_since
One of:
string format: date-time
has_text
boolean
has_ocr
boolean
manifest_id
One of:

Prefixed ULID (mfs_…)

string
/^mfs_[0-9A-HJKMNP-TV-Z]{26}$/
Example
{
"id": "vlt_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"asset_id": "ast_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"provider": "google_gmail",
"source_id": "src_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"state": "uploading",
"manifest_id": "mfs_01J8Z3K9M2Q4R6S8T0V2W4X6Y8"
}
RateLimit-Limit
integer

Requests allowed in the current window.

RateLimit-Remaining
integer

Requests remaining in the current window.

RateLimit-Reset
integer

Seconds until the window resets.

Validation failed

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Unauthenticated

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Forbidden / action denied / step-up required

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Not found

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Conflict (state, stale plan, idempotency key reuse)

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}

Rate limited

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}
Retry-After
integer

Seconds to wait before retrying.

RateLimit-Limit
integer

Requests allowed in the current window.

RateLimit-Remaining
integer

Requests remaining in the current window.

RateLimit-Reset
integer

Seconds until the window resets.

Internal error

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
title
required
string
status
required
integer
detail
string
code
required

Machine-readable error code from errors.json

string
request_id
required
string
errors
Array<object>
object
path
required
string
message
required
string
Examplegenerated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"code": "example",
"request_id": "example",
"errors": [
{
"path": "example",
"message": "example"
}
]
}