Skip to main content
PUT
/
api
/
profiles
/
{id}
/
traits
/
{key}
{
  "trait": {
    "key": "name",
    "value": "Alexander",
    "valueType": "string",
    "category": "identity",
    "confidence": 1.0,
    "source": "manual",
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-15T00:00:00Z"
  }
}

Overview

Creates a new trait or updates an existing one. Manually set traits have source: "manual" and are preserved during automatic extraction.

Path Parameters

id
string
required
Profile ID
key
string
required
Trait key (e.g., name, expertise_level)

Request Body

value
any
required
The trait value (type must match schema)
confidence
number
Confidence score (0.0-1.0). Defaults to 1.0 for manual updates.

Response

{
  "trait": {
    "key": "name",
    "value": "Alexander",
    "valueType": "string",
    "category": "identity",
    "confidence": 1.0,
    "source": "manual",
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-15T00:00:00Z"
  }
}

Example

curl -X PUT https://api.yourserver.com/api/profiles/user-123/traits/name \
  -H "Authorization: Bearer gp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"value": "Alexander", "confidence": 1.0}'