API

AuthPasswordReset

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/auth/password_resets create Password reset request accepted
PATCH /api/v1/auth/password_resets update Password updated

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

created, err := client.AuthPasswordReset(nil).Create(map[string]any{"email": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.AuthPasswordReset(nil).Update(map[string]any{"password": "example", "token": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)

Lua

Construct client as shown in the Lua setup, then call the operations:

local created, err = client:AuthPasswordReset():create({ email = "example" })
local updated, err = client:AuthPasswordReset():update({ password = "example", token = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$created = $client->AuthPasswordReset()->create(["email" => "example"]);
$updated = $client->AuthPasswordReset()->update(["password" => "example", "token" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

created = client.AuthPasswordReset().create({ "email": "example" })
updated = client.AuthPasswordReset().update({"password": "example", "token": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

created = client.AuthPasswordReset.create({ "email" => "example" })
updated = client.AuthPasswordReset.update({ "password" => "example", "token" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const created = await client.AuthPasswordReset().create({ email: "example" })
const updated = await client.AuthPasswordReset().update({ password: "example", token: "example" })

Fields

Field Type Required Description
email string Yes Email
message string Yes Message
password string Yes Password
token string Yes Token

create

POST /api/v1/auth/password_resets

Operation ID: api_v1_auth_password_resets.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
email string (email) Yes

Responses

200: Password reset request accepted

application/json

Property Type Required Description
message string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PATCH /api/v1/auth/password_resets

Operation ID: patch_api_v1_auth_password_resets.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
password string (password) Yes
token string Yes

Responses

200: Password updated

application/json

Property Type Required Description
message string Yes
401: Unauthorized
403: Forbidden
404: Not found
502: Bad gateway