POST
/
refresh
Refresh existing session cookies
curl --request POST \
  --url https://prismai.sh/api/refresh \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "domain": "https://github.com",
  "username": "user@example.com"
}'
{
"cookies": [
{
"name": "session_id",
"value": "xyz789abc123...",
"domain": ".github.com",
"path": "/",
"expires": 1791936891,
"httpOnly": true,
"secure": true,
"sameSite": "Lax"
}
],
"origins": [
"<string>"
],
"credentialId": "cred_abc123xyz789",
"expiresAt": "2024-12-31T23:59:59Z"
}

Authorizations

Authorization
string
header
required

Enter your API key with 'pk_' prefix (from https://prismai.sh/workspace)

Body

application/json

Session refresh parameters

domain
string
required

Domain to refresh session for

Example:

"https://github.com"

username
string
required

Username/email for the account

Example:

"user@example.com"

collectionId
string

Optional collection ID for credential scoping

Example:

"col_abc123xyz789"

Response

Session refreshed successfully

cookies
object[]
required

Array of session cookies to be set in the browser

origins
string[]
required

Array of allowed origins for the session

credentialId
string

Reference ID for future refresh operations

Example:

"cred_abc123xyz789"

expiresAt
string<date-time>

Session expiration timestamp

Example:

"2024-12-31T23:59:59Z"