/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Change Password

Change Password

Change your password and sign out every other session.

POST/v1/auth/passwordTry it
Session token

Changes your password in place. Every other session on your account — browsers and stx CLI logins — is signed out; the session making the request stays signed in.

Note

Requires a session JWT — a dashboard session or an stx login token. API keys are rejected with 401. Any plan.

Accounts created with GitHub sign-in have no password you know, so this returns 400 invalid_password. Use Forgot password to set one instead.

Request Body

NameDescription
currentPassword:stringbodyRequired
Your current password, 1–128 characters.
newPassword:stringbodyRequired
The new password, 8–128 characters. Must differ from currentPassword.

Response — 200 OK

NameDescription
revokedSessions:integerbody
How many other sessions were signed out. stx CLI tokens issued before sessions existed are signed out too, but not counted.

Error Responses

400 Bad Request

invalid_password — the current password is wrong (or the account was created with GitHub):

json
{
"error": {
"code": "invalid_password",
"message": "Your current password is not right.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

password_unchanged — newPassword is the same as currentPassword:

json
{
"error": {
"code": "password_unchanged",
"message": "Choose a password different from your current one.",
"details": { "traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10" }
}
}

A body that fails validation — a missing field, or a new password shorter than 8 characters — returns 400 validation_error, with each problem in details.issues:

json
{
"error": {
"code": "validation_error",
"message": "newPassword: String must contain at least 8 character(s)",
"details": {
"issues": [
{ "path": ["newPassword"], "code": "too_small", "message": "String must contain at least 8 character(s)" }
],
"target": "json",
"traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10"
}
}
}

401 Unauthorized

unauthorized for a missing, invalid or expired token (or an API key); session_revoked when the session has been signed out.

404 Not Found

not_found — the account has been deleted.

Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl -X POST https://api.syntext.dev/v1/auth/password \
-H "Authorization: Bearer $SYNTEXT_JWT" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "correct horse battery",
"newPassword": "a much longer passphrase"
}'
Responseapplication/json
200OK
{
"data": {
"changed": true,
"revokedSessions": 2
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext