Replace user preference value
PUT /mywork/v1/user-preferences/{pref_key}
Operation id: putUserPreferenceByKey
Description
Replaces the preference value. For TASK_PINS, the body must be a JSON array of feed keys (full replace). Empty replace / clear-all without going through unpin rules is rejected by the pin service when it would violate pin policy.
PUT on the collection root (missing pref_key) returns E113.
Error Scenarios
| Scenario | HTTP | Error Code | Message |
|---|---|---|---|
Missing pref_key (collection root) | 400 | E113 | pref_key is mandatory |
Invalid pref_key | 400 | E228 | Invalid pref_key. Allowed values: TASK_PINS |
| Max pins exceeded | 400 | E229 | Maximum of {0} pinned tasks reached. |
Task pinning disabled (TASK_PIN_COUNT ≤ 0) | 400 | E230 | Task pinning is disabled |
| Invalid / blank body | 400 | E105 / mandatory field | pref_value required |
| Unable to update preference | 500 | E358 | Unable to update preference |
Tags: MyWorkUserPreferences
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
pref_key | string | Yes | Preference key. v1 allowlists TASK_PINS only (→ E228 otherwise). |
Security
- ApiKeyHeader (apiKey)
- APIGEE API key header validated by VerifyAPIKey policy.
- AuthTokenHeader (apiKey)
- Session authentication token validated server-side against the user session store.
Responses
200 — Success — saved preference under user_preference
Content type: application/json
400 — E113 / E228 / E229 / E230 / validation
Content type: application/json
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
500 — Unexpected server-side error
Content type: application/json
Request body
Required: Yes
application/json
Schema
{
"oneOf": [
{
"type": "array",
"description": "TASK_PINS — ordered feed keys",
"items": {
"type": "integer"
}
},
{
"type": "object"
}
]
}
Example:
[
101,
202
]
Response models
200 — Success — saved preference under user_preference
Content type: application/json
Schema
JSON object (structure varies by endpoint).
{
"type": "object",
"description": "JSON object (structure varies by endpoint)."
}
Example:
{
"status": "OK",
"user_preference": {
"pref_key": "TASK_PINS",
"pref_value": [
101,
202
]
}
}
400 — E113 / E228 / E229 / E230 / validation
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
}
500 — Unexpected server-side error
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Always "ER" for error responses |
errorCode | string | Yes | Application-level error code (e.g. E204, E112, E302) |
response | string | Yes | Human-readable error message |
{
"type": "object",
"example": {
"status": "ER",
"errorCode": "E204",
"response": "Invalid or expired token"
},
"required": [
"status",
"errorCode",
"response"
],
"properties": {
"status": {
"type": "string",
"description": "Always \"ER\" for error responses",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Application-level error code (e.g. E204, E112, E302)"
},
"response": {
"type": "string",
"description": "Human-readable error message"
}
}
}
Example:
{
"status": "ER",
"errorCode": "E302",
"response": "Internal server error"
}