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"
}
}'
const axios = require('axios');
const { data } = await axios.patch('https://api.example.com/subjects/sub_123', {
metadata: { name: 'John Doe Updated', email: 'john.updated@example.com' },
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "sub_123",
"type": "user",
"externalId": "user-456",
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}
Subjects
Update Subject
Update an existing subject
PATCH
/
subjects
/
{id}
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"
}
}'
const axios = require('axios');
const { data } = await axios.patch('https://api.example.com/subjects/sub_123', {
metadata: { name: 'John Doe Updated', email: 'john.updated@example.com' },
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "sub_123",
"type": "user",
"externalId": "user-456",
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}
Path Parameters
string
required
The unique identifier of the subject to update
Request Body
object
Updated metadata for the subject
Response
Returns the updated subject object.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"
}
}'
const axios = require('axios');
const { data } = await axios.patch('https://api.example.com/subjects/sub_123', {
metadata: { name: 'John Doe Updated', email: 'john.updated@example.com' },
}, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
{
"id": "sub_123",
"type": "user",
"externalId": "user-456",
"metadata": {
"name": "John Doe Updated",
"email": "john.updated@example.com"
}
}
Was this page helpful?
⌘I