Delete user preference by key
DELETE /mywork/v1/user-preferences/{pref_key}
Operation id: deleteUserPreferenceByKey
Description
Deletes a preference. TASK_PINS clear-all is rejected — use DELETE /mywork/v1/user-preferences/{pref_key}/{feed_key} (e.g. .../TASK_PINS/101) to unpin instead (E105).
DELETE 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 |
DELETE TASK_PINS clear-all | 400 | E105 | feed_key is mandatory |
| Pref missing (non-list keys) | 404 | E404 | No data found |
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 — preference deleted
Content type: application/json
400 — E105 TASK_PINS clear-all / E113 missing pref_key
Content type: application/json
401 — Invalid or expired X-reflexis-csrf-token-X token (HTTP 401)
Content type: application/json
404 — No data found (returned as HTTP 200 with status=ER)
Content type: application/json
500 — Unexpected server-side error
Content type: application/json
Response models
200 — Success — preference deleted
Content type: application/json
Schema
JSON object (structure varies by endpoint).
{
"type": "object",
"description": "JSON object (structure varies by endpoint)."
}
Example:
{
"status": "OK",
"message": "User preference deleted"
}
400 — E105 TASK_PINS clear-all / E113 missing pref_key
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"
}
404 — No data found (returned as HTTP 200 with status=ER)
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": "E404",
"response": "No data found"
}
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"
}