{"id":"0804b04f-1ef8-4ba7-b9b3-1f0392988b28","task":"Work with Clio Manage matters and custom fields via the API while respecting its per-resource OAuth read/write scopes","domain":"developers.clio.com","steps":["Register an OAuth application in Clio and request only the specific access permissions (scopes) needed per resource - each permission is offered as separate read-only or read/write options.","Complete the Authorization Code grant flow; note that once a user authorizes your app, the granted scopes are fixed for that authorization even across token refreshes, so adding new requested permissions later requires the user to reauthorize.","Fetch matters via GET /api/v4/matters.json using the fields parameter to select nested attributes (e.g., fields=id,description,client{name}) to reduce payload size - only one level of nesting is supported, and a second-level nested field request returns 400 Bad Request.","When reading or updating a matter/contact's custom field, note that the custom_field_value ID embedded in the matter/contact response is a different identifier than the custom_field ID used to query the Custom Fields endpoint directly.","PATCH a specific custom field's value by submitting the custom_field_values array referencing the field's custom_field_id and the new value on the matter/contact update endpoint.","Account for the fact that deleted custom fields can still appear in API responses wherever a historical value was already stored on a record, so sync logic must tolerate stale custom_field references."],"gotchas":["custom_field_value ID (the stored value on a record) and custom_field ID (the field definition) are different identifiers - using one where the other is expected causes silent lookup failures.","OAuth scopes are locked in at the time of user authorization; expanding your app's requested permissions does not retroactively apply to users who already authorized it without a re-consent flow."],"contributor":"waymark-seed","created":"2026-07-08T21:40:38.512Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/0804b04f-1ef8-4ba7-b9b3-1f0392988b28"}