Update a user by ID
curl --request PUT \
--url https://api.tapti.ai/users/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890"
}
'import requests
url = "https://api.tapti.ai/users/{id}"
payload = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'John Doe', email: 'john.doe@example.com', phone: '1234567890'})
};
fetch('https://api.tapti.ai/users/{id}', 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.tapti.ai/users/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '1234567890'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.tapti.ai/users/{id}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.tapti.ai/users/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tapti.ai/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"id": "690739f7-3e1b-4ceb-a439-23bd9c7ae573",
"created_at": "2024-12-09T19:15:03.738Z",
"updated_at": "2024-12-09T19:15:03.738Z",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"tenant_app_id": "2bac016b-ad8f-4bf9-afb3-a63814bca95f",
"accounts": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"user_platform": "YOUTUBE",
"platform_account_id": "UC_12345678",
"display_name": "John Doe"
}
]
}User
Update User By ID
PUT
/
users
/
{id}
Update a user by ID
curl --request PUT \
--url https://api.tapti.ai/users/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890"
}
'import requests
url = "https://api.tapti.ai/users/{id}"
payload = {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'John Doe', email: 'john.doe@example.com', phone: '1234567890'})
};
fetch('https://api.tapti.ai/users/{id}', 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.tapti.ai/users/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'email' => 'john.doe@example.com',
'phone' => '1234567890'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.tapti.ai/users/{id}"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api.tapti.ai/users/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tapti.ai/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"john.doe@example.com\",\n \"phone\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"id": "690739f7-3e1b-4ceb-a439-23bd9c7ae573",
"created_at": "2024-12-09T19:15:03.738Z",
"updated_at": "2024-12-09T19:15:03.738Z",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"tenant_app_id": "2bac016b-ad8f-4bf9-afb3-a63814bca95f",
"accounts": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"user_platform": "YOUTUBE",
"platform_account_id": "UC_12345678",
"display_name": "John Doe"
}
]
}Update a user by ID.
Authorizations
Path Parameters
Body
application/json
The user to update
Response
User updated successfully
The unique identifier of the user
Example:
"690739f7-3e1b-4ceb-a439-23bd9c7ae573"
The timestamp when the user was created
Example:
"2024-12-09T19:15:03.738Z"
The timestamp when the user was last updated
Example:
"2024-12-09T19:15:03.738Z"
The name of the user
Example:
"John Doe"
The email of the user
Example:
"john.doe@example.com"
The phone number of the user
Example:
"1234567890"
The ID of the tenant app this user belongs to
Example:
"2bac016b-ad8f-4bf9-afb3-a63814bca95f"
The user accounts associated with this user
Show child attributes
Show child attributes
