Pin feed(s) for a preference key
POST /mywork/v1/user-preferences/{pref_key}/{feed_key}
Operation id: pinTaskPreferences
Description
Appends one or more feed keys to the user's home-unit preference list for {pref_key} (v1: TASK_PINS only — ordered; duplicates ignored).
Capacity: system code PULSE_SETUP / TASK_PIN_COUNT (default 25). 0 disables adds (E230).
Error Scenarios
| Scenario | HTTP | Error Code | Message |
|---|---|---|---|
Missing / empty feed_key | 400 | E105 | feed_key is mandatory |
| Non-numeric / non-positive token | 400 | E159 | Invalid feed_key |
| Home unit id blank | 400 | E107 | Unit id is mandatory |
| Max pins reached | 400 | E229 | Maximum of {0} pinned tasks reached. |
| Task pinning disabled | 400 | E230 | Task pinning is disabled |
| Unable to update preference | 500 | E358 | Unable to update preference |
Earlier drafts used E220/E221 for max/disabled — pin APIs use E228–E230.
Tags: MyWorkUserPreferences
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
feed_key | string | Yes | Feed key to pin/unpin. Single id (101) or CSV (101,202). Missing / empty → E105. Non-numeric / non-positive tokens → E159. |
pref_key | string | Yes | Preference key. v1 allowlists TASK_PINS only (→ E228 otherwise). Controllers currently bind pin/unpin helpers to this key; clients must send the literal value TASK_PINS. |
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 — updated pin list under task_pins plus localized message
Content type: application/json
400 — E105 / E107 / E159 / E229 / E230
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
Response models
200 — Success — updated pin list under task_pins plus localized message
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
task_pins | array | Yes | |
message | string | Yes | Localized confirmation (e.g. Pinned) |
{
"type": "object",
"required": [
"status",
"task_pins",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"task_pins": {
"type": "array",
"items": {
"type": "integer"
}
},
"message": {
"type": "string",
"description": "Localized confirmation (e.g. `Pinned`)"
}
}
}
Example:
{
"status": "OK",
"task_pins": [
101,
202
],
"message": "Pinned"
}
400 — E105 / E107 / E159 / E229 / E230
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"
}