Update user profile
curl --request PATCH \
--url https://api.lithoblocks.com/v1/users/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api.lithoblocks.com/v1/users/profile"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({first_name: '<string>', last_name: '<string>', email: 'jsmith@example.com'})
};
fetch('https://api.lithoblocks.com/v1/users/profile', 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.lithoblocks.com/v1/users/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.lithoblocks.com/v1/users/profile"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\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.lithoblocks.com/v1/users/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lithoblocks.com/v1/users/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"organization_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Users
Update user profile
Update the current user’s profile (snake_case keys; legacy camelCase accepted during deprecation).
PATCH
/
v1
/
users
/
profile
Update user profile
curl --request PATCH \
--url https://api.lithoblocks.com/v1/users/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com"
}
'import requests
url = "https://api.lithoblocks.com/v1/users/profile"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({first_name: '<string>', last_name: '<string>', email: 'jsmith@example.com'})
};
fetch('https://api.lithoblocks.com/v1/users/profile', 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.lithoblocks.com/v1/users/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => '<string>',
'last_name' => '<string>',
'email' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.lithoblocks.com/v1/users/profile"
payload := strings.NewReader("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\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.lithoblocks.com/v1/users/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lithoblocks.com/v1/users/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"organization_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
LithoBlocks API key obtained from your organization dashboard
Body
application/json
Profile update data
⌘I

