API reference › Preferred lists › Preferred list
Update a preference entry (notes, preferredBy, preferredUser)
PUT /v1/settings/portal/preference-list/{preference_list}
- Scope
settings_preferred_users:edit- Roles
- client, consumer, service-provider
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
preference_list required | integer | ID of the preference entry to update Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Request body required
Any of the fields (notes, preferredBy, preferredUser) can be updated.
| Field | Type | Description |
|---|---|---|
preferredUser | object or null | |
preferredUser.id | integer | Example |
preferredUser.label | string | Example |
notes | string or null | Optional notes (max 255 characters) Example |
isBehalfOfOrg | boolean or null | Record the entry on behalf of the organization rather than the caller. Defaults to false. Example |
Example
{
"preferredUser": {
"id": 202,
"label": "Jane Smith"
},
"notes": "Updated reason for preference",
"isBehalfOfOrg": false
}Example request
curl -X PUT "https://api.fetchfido.ai/v1/settings/portal/preference-list/{preference_list}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"preferredUser":{"id":202,"label":"Jane Smith"},"notes":"Updated reason for preference","isBehalfOfOrg":false}'Try it
Responses
200 Preference entry updated successfully
Preference entry updated successfully
{
"success": true,
"message": "Preference List updated!"
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'settings_preferred_users:edit' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
404 Not found
Preference entry not found
{
"success": false,
"message": "Preference entry not found."
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Unexpected server error
{
"success": false,
"message": "Something went wrong!"
}Response fields (2)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |