Refresh Token
POST
/api/canvas/{deal_id}/token/refresh
const url = 'https://example.com/api/canvas/example/token/refresh';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/canvas/example/token/refresh \ --header 'Authorization: Bearer <token>'Refresh the user’s access token.
Requires a valid (non-expired) access token in the Authorization header. Returns a fresh access token with a new expiration time.
The frontend should call this proactively before the current token expires (e.g., 15 minutes before expiry) to prevent WebSocket reconnection storms.
Args: deal_id: Deal ID the token should be scoped to
Returns: {“token”: “<new_jwt>”, “expires_in_minutes”: 480}
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” deal_id
required
Deal Id
string
Responses
Section titled “ Responses ”Successful Response
Media type application/json
RefreshTokenResponse
Response from token refresh / reissue / superadmin-token endpoints.
object
token
required
Token
string
expires_in_minutes
required
Expires In Minutes
integer
Example generated
{ "token": "example", "expires_in_minutes": 1}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}