Skip to main content
POST
/
api
/
v1
/
auth
/
register
/
set-password
Register (magic link) - set password
curl --request POST \
  --url https://api.flowxi.app/api/v1/auth/register/set-password \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew",
  "email": "cynthia.fahey@example.net",
  "password": "Str0ngP@ssw0rd!",
  "password_confirmation": "Str0ngP@ssw0rd!"
}
'
import requests

url = "https://api.flowxi.app/api/v1/auth/register/set-password"

payload = {
"token": "bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew",
"email": "cynthia.fahey@example.net",
"password": "Str0ngP@ssw0rd!",
"password_confirmation": "Str0ngP@ssw0rd!"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: 'bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew',
email: 'cynthia.fahey@example.net',
password: 'Str0ngP@ssw0rd!',
password_confirmation: 'Str0ngP@ssw0rd!'
})
};

fetch('https://api.flowxi.app/api/v1/auth/register/set-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flowxi.app/api/v1/auth/register/set-password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew',
'email' => 'cynthia.fahey@example.net',
'password' => 'Str0ngP@ssw0rd!',
'password_confirmation' => 'Str0ngP@ssw0rd!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.flowxi.app/api/v1/auth/register/set-password"

payload := strings.NewReader("{\n \"token\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew\",\n \"email\": \"cynthia.fahey@example.net\",\n \"password\": \"Str0ngP@ssw0rd!\",\n \"password_confirmation\": \"Str0ngP@ssw0rd!\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.flowxi.app/api/v1/auth/register/set-password")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew\",\n \"email\": \"cynthia.fahey@example.net\",\n \"password\": \"Str0ngP@ssw0rd!\",\n \"password_confirmation\": \"Str0ngP@ssw0rd!\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.flowxi.app/api/v1/auth/register/set-password")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew\",\n \"email\": \"cynthia.fahey@example.net\",\n \"password\": \"Str0ngP@ssw0rd!\",\n \"password_confirmation\": \"Str0ngP@ssw0rd!\"\n}"

response = http.request(request)
puts response.read_body
{
  "code": "TOKEN_ISSUED",
  "message": "Token issued.",
  "access_token": "125|XXXXXXXXXXXXXXXXXXXXXXXX",
  "token_type": "Bearer",
  "user_id": 123,
  "account_status": "active"
}
{
"code": "MAGIC_LINK_INVALID",
"message": "Invalid or expired magic link."
}
{
"code": "USER_NOT_FOUND",
"message": "User not found."
}
{
"code": "VALIDATION_FAILED",
"message": "Validation failed.",
"errors": {
"email": [
"The email field is required."
]
}
}
{
"code": "RATE_LIMITED",
"message": "Too many requests."
}
{
"code": "SERVER_ERROR",
"message": "Server error."
}

Body

application/json
token
string
required

Magic link token (sha256 hex => 64 chars).

Example:

"bngzmiyvdljnikhwaykcmyuwpwlvqwrsitcpscqldzsnrwtujwvlxjklqppwqbew"

email
string<email>
required
Example:

"cynthia.fahey@example.net"

password
string
required
Example:

"Str0ngP@ssw0rd!"

password_confirmation
string
required
Example:

"Str0ngP@ssw0rd!"

Response

Account activated + token issued.

code
string
required
Example:

"OK"

message
string
required
Example:

"OK"

access_token
string
required

Bearer token (plain text). Shown only once.

Example:

"125|XXXXXXXXXXXXXXXXXXXXXXXX"

token_type
string
required
Example:

"Bearer"

user_id
integer
required
Example:

123

account_status
string
required
Example:

"active"