Cet endpoint effectue une mise à jour partielle. Seuls les champs envoyés sont modifiés. Envoyez filters: [] pour effacer les filtres.
PATCH/v2/api/crm/views/{id}
Cet endpoint effectue une mise à jour partielle. Seuls les champs envoyés sont modifiés. Envoyez filters: [] pour effacer les filtres.
Champs du corps
Champ
Type
Description
name
string
Nouveau nom affiché, 255 caractères maximum. Ne doit pas être vide s'il est envoyé
filters
array
Remplace toutes les conditions. [] les efface. 50 maximum
sort
array
Remplace le tri. 2 entrées maximum. field est un champ natif triable (name, company, job_title, website, created_at, updated_at, last_activity) ou la key d'un champ personnalisé triable issue de Lister les champs personnalisés
owner_type
string
USER ou TEAM
{"name":"Acme leads"}
Modifier une vue d'équipe exige d'en être le propriétaire ou ADMIN ou MANAGER de l'équipe.
Réponse
Renvoie 200 avec la vue mise à jour, au même format que Obtenir une vue.
Erreurs
Statut
Code
Quand
400
INVALID_REQUEST_BODY
name est vide ou dépasse 255 caractères, filters compte plus de 50 entrées, ou owner_type n'est ni USER ni TEAM. Les erreurs par champ sont listées dans errors[] avec le field (name ou filters)
400
INVALID_FILTER_FIELD
Le field d'un filtre n'est ni un champ natif d'une personne ni la key d'un champ personnalisé issue de GET /v2/api/crm/attributes. param vaut filters
400
INVALID_FILTER_OPERATOR
L'operator d'un filtre ne correspond pas au type de son champ. Le message nomme le champ. param vaut filters
400
INVALID_FILTER_VALUE
La value d'un filtre n'est pas lisible pour le type de son champ : un champ nombre attend une valeur numérique, un champ date attend une date ISO 8601 comme 2026-01-31 ou 2026-01-31T00:00:00Z. Le message nomme la valeur et le champ. param vaut filters
400
INVALID_SORT_FIELD
Le field d'un tri n'est ni un champ natif ni la key d'un champ personnalisé issue de GET /v2/api/crm/attributes. param vaut sort
400
FIELD_NOT_SORTABLE
Le field d'un tri existe mais ne peut pas être trié. Utilisez un champ natif triable ou un champ personnalisé triable. param vaut sort
400
USER_HAS_NO_TEAM
owner_type vaut TEAM mais vous n'appartenez à aucune équipe. Utilisez USER. param vaut owner_type
403
API_KEY_INSUFFICIENT_SCOPE
La clé n'a pas le scope CRM_WRITE
403
VIEW_PERMISSION_DENIED
La vue est une vue d'équipe et vous n'en êtes ni le propriétaire ni ADMIN ou MANAGER de l'équipe
404
VIEW_NOT_FOUND
Aucune vue avec cet ID, ou vous ne pouvez pas la voir (par exemple la vue privée d'un autre utilisateur)
Autorisation
Authorizationstring · headerrequis
Api-Key ak_live_…
Paramètres de chemin
idstringrequis
Public ID of the view, as returned by the list endpoint
Corps
namestring
New name. Must not be blank when sent
filtersobject[]
Conditions combined with AND. At most 50
3 champs
fieldstringrequis
A built-in person field (name, company, job_title, emails, phone_numbers, website, addresses, created_at, updated_at, last_activity, activity_history, sms_content (only when the team has SMS)) or the key of a custom field from GET /v2/api/crm/attributes. An unknown field returns 400 INVALID_FILTER_FIELD
operatorenum<string>requis
Comparison operator. It must match the type of the field, otherwise the request returns 400 INVALID_FILTER_OPERATOR
Value to compare to. It must be readable for the type of the field, otherwise the request returns 400 INVALID_FILTER_VALUE: numeric for a number field, an ISO 8601 date such as 2026-01-31 or date-time such as 2026-01-31T00:00:00Z for a date field. Ignored for EMPTY and NOT_EMPTY
sortobject[]
Up to 2 entries. Sortable built-in fields: name, company, job_title, website, created_at, updated_at, last_activity. A sortable custom field key from GET /v2/api/crm/attributes also works
2 champs
fieldstringrequis
A sortable built-in person field (name, company, job_title, website, created_at, updated_at, last_activity) or the key of a sortable custom field from GET /v2/api/crm/attributes
orderenum<string>requis
ascdesc
owner_typeenum<string>
USER is private to the API key's user. TEAM is shared with the user's team; it returns 400 USER_HAS_NO_TEAM when the user has no team.
USERTEAM
Réponses
200The updated view
dataobject
A saved view: a named filter and sort over people. Views created in the Allo app and with the API are the same objects.
9 champs
idstring
Public ID of the view
namestring
filtersobject[]
3 champs
fieldstringrequis
A built-in person field (name, company, job_title, emails, phone_numbers, website, addresses, created_at, updated_at, last_activity, activity_history, sms_content (only when the team has SMS)) or the key of a custom field from GET /v2/api/crm/attributes. An unknown field returns 400 INVALID_FILTER_FIELD
operatorenum<string>requis
Comparison operator. It must match the type of the field, otherwise the request returns 400 INVALID_FILTER_OPERATOR
Value to compare to. It must be readable for the type of the field, otherwise the request returns 400 INVALID_FILTER_VALUE: numeric for a number field, an ISO 8601 date such as 2026-01-31 or date-time such as 2026-01-31T00:00:00Z for a date field. Ignored for EMPTY and NOT_EMPTY
sortobject[]
2 champs
fieldstringrequis
A sortable built-in person field (name, company, job_title, website, created_at, updated_at, last_activity) or the key of a sortable custom field from GET /v2/api/crm/attributes
orderenum<string>requis
ascdesc
owner_typeenum<string>
USER is private to the API key's user. TEAM is shared with the user's team.