# Add favorite Add a favorite item for a user. Endpoint: POST /v2/users/{userId}/favorites Version: v2 Security: Bearer ## Path parameters: - `userId` (string, required) Identifier for user. Example: "4974a66b-7493-4f41-908c-58ba81093947" ## Request fields (application/json): - `type` (string, required) The type of favorite (e.g. "company", "legal_entity", "trip"). - `params` (object) Key-value pairs of parameters for the favorite. - `displayName` (string, required) Display name for the favorite item. ## Response 200 fields (application/json): - `favorite` (object) A single favorite item. - `favorite.favoriteId` (string) Unique identifier for the favorite item. - `favorite.type` (string) The type of favorite. - `favorite.params` (object) Key-value pairs of parameters for the favorite. - `favorite.displayName` (string) Display name for the favorite item. - `favorite.createdAt` (string) Timestamp when the favorite was created. ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error.