Modify Profile Info
curl --request PATCH \
--url https://api.tenbytecloud.com/v1/user-resource/user/profile \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'apikey: <api-key>' \
--data 'first_name=<string>' \
--data 'last_name=<string>' \
--data 'phone_number=<string>' \
--data 'personal_id_number=<string>'import requests
url = "https://api.tenbytecloud.com/v1/user-resource/user/profile"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"personal_id_number": "<string>"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {apikey: '<api-key>', 'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
first_name: '<string>',
last_name: '<string>',
phone_number: '<string>',
personal_id_number: '<string>'
})
};
fetch('https://api.tenbytecloud.com/v1/user-resource/user/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenbytecloud.com/v1/user-resource/user/profile"
payload := strings.NewReader("first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.tenbytecloud.com/v1/user-resource/user/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.patch("https://api.tenbytecloud.com/v1/user-resource/user/profile")
.header("apikey", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.tenbytecloud.com/v1/user-resource/user/profile");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("apikey", "<api-key>");
request.AddParameter("first_name", "<string>");
request.AddParameter("last_name", "<string>");
request.AddParameter("phone_number", "<string>");
request.AddParameter("personal_id_number", "<string>");
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tenbytecloud.com/v1/user-resource/user/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 => "first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"avatar": "https://s.gravatar.com/avatar/bbb",
"created_at": "2018-10-25 11:02:59",
"email": "user@example.com",
"first_name": "Cloudia",
"id": 22,
"last_name": "Iaas",
"personal_id_number": "123456",
"phone_number": "+98765",
"updated_at": "2021-05-18 11:07:00",
"user_id": 8
}User
Modify Profile Info
Authenticated user can modify their own profile data.
PATCH
/
user-resource
/
user
/
profile
Modify Profile Info
curl --request PATCH \
--url https://api.tenbytecloud.com/v1/user-resource/user/profile \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'apikey: <api-key>' \
--data 'first_name=<string>' \
--data 'last_name=<string>' \
--data 'phone_number=<string>' \
--data 'personal_id_number=<string>'import requests
url = "https://api.tenbytecloud.com/v1/user-resource/user/profile"
payload = {
"first_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"personal_id_number": "<string>"
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {apikey: '<api-key>', 'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
first_name: '<string>',
last_name: '<string>',
phone_number: '<string>',
personal_id_number: '<string>'
})
};
fetch('https://api.tenbytecloud.com/v1/user-resource/user/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tenbytecloud.com/v1/user-resource/user/profile"
payload := strings.NewReader("first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.tenbytecloud.com/v1/user-resource/user/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.patch("https://api.tenbytecloud.com/v1/user-resource/user/profile")
.header("apikey", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.tenbytecloud.com/v1/user-resource/user/profile");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("apikey", "<api-key>");
request.AddParameter("first_name", "<string>");
request.AddParameter("last_name", "<string>");
request.AddParameter("phone_number", "<string>");
request.AddParameter("personal_id_number", "<string>");
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tenbytecloud.com/v1/user-resource/user/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 => "first_name=%3Cstring%3E&last_name=%3Cstring%3E&phone_number=%3Cstring%3E&personal_id_number=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"avatar": "https://s.gravatar.com/avatar/bbb",
"created_at": "2018-10-25 11:02:59",
"email": "user@example.com",
"first_name": "Cloudia",
"id": 22,
"last_name": "Iaas",
"personal_id_number": "123456",
"phone_number": "+98765",
"updated_at": "2021-05-18 11:07:00",
"user_id": 8
}Authorizations
Body
application/x-www-form-urlencoded
Response
200 - application/json
Updated profile
The response is of type object.
⌘I