Update user meta field
curl --request PUT \
--url https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Authorization: <api-key>'import requests
url = "https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}"
headers = {
"Authorization": "Bearer <token>",
"X-Authorization": "<api-key>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'X-Authorization': '<api-key>'}
};
fetch('https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{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://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}")
.header("Authorization", "Bearer <token>")
.header("X-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "field_123",
"app_id": "<string>",
"name": "first_name",
"field_type": "string",
"required": false,
"visible_profile": true,
"visible_registration": false,
"position": 1,
"as_verification_identifier": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}User Meta Fields
Update user meta field
Update an existing user meta field
PUT
/
v1
/
apps
/
{app_id}
/
user_meta_fields
/
{id}
Update user meta field
curl --request PUT \
--url https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Authorization: <api-key>'import requests
url = "https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}"
headers = {
"Authorization": "Bearer <token>",
"X-Authorization": "<api-key>"
}
response = requests.put(url, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'X-Authorization': '<api-key>'}
};
fetch('https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{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://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}")
.header("Authorization", "Bearer <token>")
.header("X-Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{defaultHost}/v1/apps/{app_id}/user_meta_fields/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "field_123",
"app_id": "<string>",
"name": "first_name",
"field_type": "string",
"required": false,
"visible_profile": true,
"visible_registration": false,
"position": 1,
"as_verification_identifier": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API Secret token
User Access token
Response
successful
Meta field ID
Example:
"field_123"
Application ID
Meta field name (used as key in user_meta)
Example:
"first_name"
Data type of the field
Available options:
string, boolean, integer, date, phone, email, text, url Whether this field is required during user creation
Example:
false
Whether field is visible on profile component
Example:
true
Whether field is visible during registration/login
Example:
false
Display order position
Example:
1
Can be used as verification identifier (only for email and phone fields)
Example:
false
Creation timestamp
Last update timestamp
Was this page helpful?