const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({display_name: 'Alice Chen', given_name: 'Alice', family_name: 'Chen'})
};
fetch('https://api.factify.com/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.factify.com/v1/me"
payload = {
"display_name": "Alice Chen",
"given_name": "Alice",
"family_name": "Chen"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.factify.com/v1/me"
payload := strings.NewReader("{\n \"display_name\": \"Alice Chen\",\n \"given_name\": \"Alice\",\n \"family_name\": \"Chen\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.factify.com/v1/me")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Alice Chen\",\n \"given_name\": \"Alice\",\n \"family_name\": \"Chen\"\n}")
.asString();curl --request PATCH \
--url https://api.factify.com/v1/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Alice Chen",
"given_name": "Alice",
"family_name": "Chen"
}
'{
"id": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"email": "alice@factify.com",
"display_name": "Alice Chen",
"given_name": "Alice",
"family_name": "Chen"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Request body is malformed or missing required fields."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid authentication credentials."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "You do not have permission to perform this action on this resource."
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "Request body failed validation.",
"errors": [
{
"location": "body.email",
"message": "expected string to match format 'email'",
"value": "not-an-email"
}
]
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded. Retry after the period indicated by the Retry-After header."
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred. Retry, and contact support if the issue persists."
}Update current user profile
Updates the authenticated user’s profile. Uses RFC 7396
(JSON Merge Patch) semantics: omitted fields are left
unchanged. display_name is required on every request and
cannot be cleared.
given_name and family_name accept null to clear. Empty
string is rejected with 422 — use null.
Email cannot be updated through this endpoint.
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({display_name: 'Alice Chen', given_name: 'Alice', family_name: 'Chen'})
};
fetch('https://api.factify.com/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.factify.com/v1/me"
payload = {
"display_name": "Alice Chen",
"given_name": "Alice",
"family_name": "Chen"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.factify.com/v1/me"
payload := strings.NewReader("{\n \"display_name\": \"Alice Chen\",\n \"given_name\": \"Alice\",\n \"family_name\": \"Chen\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.factify.com/v1/me")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Alice Chen\",\n \"given_name\": \"Alice\",\n \"family_name\": \"Chen\"\n}")
.asString();curl --request PATCH \
--url https://api.factify.com/v1/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Alice Chen",
"given_name": "Alice",
"family_name": "Chen"
}
'{
"id": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"email": "alice@factify.com",
"display_name": "Alice Chen",
"given_name": "Alice",
"family_name": "Chen"
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Request body is malformed or missing required fields."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid authentication credentials."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "You do not have permission to perform this action on this resource."
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "Request body failed validation.",
"errors": [
{
"location": "body.email",
"message": "expected string to match format 'email'",
"value": "not-an-email"
}
]
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded. Retry after the period indicated by the Retry-After header."
}{
"type": "about:blank",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred. Retry, and contact support if the issue persists."
}Authorizations
Bearer authentication using a factapi-issued API key
(ffy_<env>_<base32_uuid><base62_random>). Cookie-based
sessions are accepted automatically by user-facing endpoints
but are not surfaced as an OpenAPI auth scheme.
Body
Request body for PATCH /v1/me. Optional nullable fields use
RFC 7396 merge-patch semantics: omit to leave unchanged, send
null to clear, send a value to set. display_name is
required on every request and cannot be cleared.
New display name. Required; empty string is rejected.
1 - 255"Alice Chen"
New given (first) name. Send null to clear. Empty
string is rejected — use null.
1 - 128"Alice"
New family (last) name. Send null to clear. Empty
string is rejected — use null.
1 - 128"Chen"
Response
OK
Profile of the authenticated user. Returned by GET /v1/me and PATCH /v1/me.
TypedID of the user.
"usr_01h2xcejqtf2nbrexx3vqjhp41"
User's email address.
"alice@factify.com"
Display name shown in the UI. Always present.
"Alice Chen"
Given (first) name. Null when unknown.
"Alice"
Family (last) name. Null when unknown.
"Chen"