Skip to content

Create access token

POST
/oauth/token
curl --request POST \
--url https://api.pipevest.com/v1/oauth/token \
--header 'Content-Type: application/json' \
--data '{ "clientId": "org_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d", "clientSecret": "1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d_9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c" }'

Exchange your clientId and clientSecret for a short-lived bearer token. This is the only unauthenticated endpoint.

Media typeapplication/json
object
clientId
required
string
/^org_[a-f0-9]{32}$/
Example
org_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d
clientSecret
required
string
/^[a-f0-9]{32}_[a-f0-9]{32}$/
Example
1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d_9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c

Authentication successful

Media typeapplication/json
object
message
string
tokenId
string
token

Bearer JWT access token

string
expiresIn

TTL in seconds

integer
maxTTL
integer
tokenType
string
scope
Array<string>
trustedIps
Array<string>
organization
object
id
string
name
string
clientId
string
createdAt

Unix timestamp

integer
updatedAt

Unix timestamp

integer
Example
{
"message": "Authentication successful",
"tokenId": "b0f6e2a1-9c3d-4e5f-8a7b-6c5d4e3f2a1b",
"expiresIn": 3600,
"maxTTL": 86400,
"tokenType": "Bearer",
"scope": [
"READ",
"WRITE"
],
"trustedIps": [],
"organization": {
"id": "clx0a1b2c3d4e5f6g7h8i9j0k",
"name": "Acme Investments",
"clientId": "org_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
},
"createdAt": 1752566400,
"updatedAt": 1752566400
}

Request failed schema validation

Media typeapplication/json
object
error
string
details
Array<object>
object
field
string
message
string
Example
{
"error": "Validation failed",
"details": [
{
"field": "firstName",
"message": "First name is required"
}
]
}

Invalid client credentials

Media typeapplication/json
object
error
string
message
string
Example
{
"error": "Unauthorized",
"message": "Invalid client credentials"
}