curl -X PATCH 'https://api.example.com/subjects/sub_123' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}'
{
"id": "sub_123",
"type": "user",
"externalId": "user-456",
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}
Update an existing subject
curl -X PATCH 'https://api.example.com/subjects/sub_123' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}'
{
"id": "sub_123",
"type": "user",
"externalId": "user-456",
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}
curl -X PATCH 'https://api.example.com/subjects/sub_123' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}'
{
"id": "sub_123",
"type": "user",
"externalId": "user-456",
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}
Was this page helpful?