Skip to content

Exchange a web session for a native bearer session token

POST
/v1/auth/native/session
curl --request POST \
--url https://api.trustysweep.com/v1/auth/native/session \
--cookie sweep_session=<sweep_session>

OK

Media typeapplication/json
object
token
required

Sst_… bearer session token (native/PWA only)

string
expires_at
required
string format: date-time
user
required
object
id
required

Prefixed ULID (usr_…)

string
/^usr_[0-9A-HJKMNP-TV-Z]{26}$/
email
required
string format: email
display_name
One of:
string
locale
required
string
Allowed values: en es
status
required
string
Allowed values: active dormant deleting
plan
required
string
created_at
required
string format: date-time
sources_connected
required
integer
vault_bytes
required
integer
developer
One of:
object
org_ids
Array<string>
Example
{
"user": {
"id": "usr_01J8Z3K9M2Q4R6S8T0V2W4X6Y8",
"locale": "en",
"status": "active",
"developer": {
"org_ids": [
"org_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"
}
]
}

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"
}
]
}