POST
/api/v1/auth/refresh
Auth: None
Refresh Token
Use the refresh token to rotate short-lived access tokens without re-authenticating.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
| refresh_token | string | Yes | Refresh token issued by the login endpoint. |
Example response
<?php
return [
'success' => true,
'data' => [
'token' => 'eyJhbGciOi...',
'refresh_token' => 'def50200...',
'expires_in' => 3600,
'user' => [
'user_id' => 'usr_001',
'name' => 'Merchant Admin',
'email' => '[email protected]',
'role' => 'user',
'status' => 'active'
]
]
];
Request examples
curl -X POST \
"https://api.spaces.za.com/api/v1/auth/refresh" \
-H "Content-Type: application/json" \\
--data '{
"refresh_token": "def50200..."
}'