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

ScenarioHTTPError CodeMessage
Missing / empty feed_key400E105feed_key is mandatory
Non-numeric / non-positive token400E159Invalid feed_key
Home unit id blank400E107Unit id is mandatory
Max pins reached400E229Maximum of {0} pinned tasks reached.
Task pinning disabled400E230Task pinning is disabled
Unable to update preference500E358Unable to update preference

Earlier drafts used E220/E221 for max/disabled — pin APIs use E228–E230.

Tags: MyWorkUserPreferences

Parameters

Path parameters

NameTypeRequiredDescription
feed_keystringYesFeed key to pin/unpin. Single id (101) or CSV (101,202). Missing / empty → E105. Non-numeric / non-positive tokens → E159.
pref_keystringYesPreference 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

  • 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

PropertyTypeRequiredDescription
statusstringYes
task_pinsarrayYes
messagestringYesLocalized 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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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

PropertyTypeRequiredDescription
statusstringYesAlways "ER" for error responses
errorCodestringYesApplication-level error code (e.g. E204, E112, E302)
responsestringYesHuman-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"
}