Skip to content

Change the password

POST
/api/v1/auth/password
curl --request POST \
--url https://app.monitorly.cloud/api/v1/auth/password \
--header 'Content-Type: application/json' \
--cookie __Host-monitorly_session=<__Host-monitorly_session> \
--data '{ "currentPassword": "example", "newPassword": "example" }'

Changes the password after checking the current one. Every other session of the account ends; this one stays.

Media typeapplication/json
object
currentPassword
required
string
newPassword
required

12–1024 characters.

string

Example generated

{
"currentPassword": "example",
"newPassword": "example"
}

Changed.

Bad Request.

  • request.malformed: the body or a parameter is not of the expected shape
  • auth.credentials_conflict: the request carries both a session cookie and a token
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unauthorized.

  • auth.unauthenticated, auth.session_expired: no session, or it ended
  • token.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Forbidden.

  • auth.forbidden: your role is too low for this
  • token.not_allowed: this operation needs a signed-in session; tokens cannot call it
  • request.origin_mismatch, request.header_required: a changing request with a session comes from another site or lacks X-Monitorly-Request: 1
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Conflict.

  • auth.password_not_set: changing the password of an account that has none (made by Google or GitHub): a reset link sets the first one
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Payload Too Large.

  • request.too_large: the body is larger than 256 KiB
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unprocessable Entity.

  • field.required, field.too_long, field.invalid: a field breaks a rule; errors points at it
  • auth.current_password_invalid: current password is wrong when changing the password (/currentPassword; counts as a failed sign-in attempt)
  • auth.password_too_short: password is shorter than 12 characters
  • auth.password_too_long: password is longer than 1024 characters
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Too Many Requests.

  • session.rate_limited: more than 5 changes a second from your sessions
  • auth.rate_limited: too many failed attempts; Retry-After in seconds
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}
Retry-After
integer
>= 1

Seconds to wait before trying again.