curl --request POST \
--url https://api.withallo.com/v2/api/crm/views \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER"
}
'import requests
url = "https://api.withallo.com/v2/api/crm/views"
payload = {
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Hot leads',
filters: [{field: 'company', operator: 'CONTAINS', value: 'Acme'}],
sort: [{field: 'created_at', order: 'desc'}],
owner_type: 'USER'
})
};
fetch('https://api.withallo.com/v2/api/crm/views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/crm/views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Hot leads',
'filters' => [
[
'field' => 'company',
'operator' => 'CONTAINS',
'value' => 'Acme'
]
],
'sort' => [
[
'field' => 'created_at',
'order' => 'desc'
]
],
'owner_type' => 'USER'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/crm/views"
payload := strings.NewReader("{\n \"name\": \"Hot leads\",\n \"filters\": [\n {\n \"field\": \"company\",\n \"operator\": \"CONTAINS\",\n \"value\": \"Acme\"\n }\n ],\n \"sort\": [\n {\n \"field\": \"created_at\",\n \"order\": \"desc\"\n }\n ],\n \"owner_type\": \"USER\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withallo.com/v2/api/crm/views")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Hot leads\",\n \"filters\": [\n {\n \"field\": \"company\",\n \"operator\": \"CONTAINS\",\n \"value\": \"Acme\"\n }\n ],\n \"sort\": [\n {\n \"field\": \"created_at\",\n \"order\": \"desc\"\n }\n ],\n \"owner_type\": \"USER\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/crm/views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Hot leads\",\n \"filters\": [\n {\n \"field\": \"company\",\n \"operator\": \"CONTAINS\",\n \"value\": \"Acme\"\n }\n ],\n \"sort\": [\n {\n \"field\": \"created_at\",\n \"order\": \"desc\"\n }\n ],\n \"owner_type\": \"USER\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cvw_2abc",
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER",
"user_id": "usr_2abc",
"team_id": null,
"created_at": "2026-10-23T10:00:00",
"updated_at": "2026-10-23T10:00:00"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Créer une vue
Creates a saved view: a named filter and sort over people. Filter conditions are combined with AND. Returns 400 validation_error with INVALID_REQUEST_BODY (per-field errors[]) for a blank or too long name or more than 50 filters; INVALID_FILTER_FIELD, INVALID_FILTER_OPERATOR, INVALID_FILTER_VALUE, INVALID_SORT_FIELD or FIELD_NOT_SORTABLE for an invalid filter or sort; USER_HAS_NO_TEAM for owner_type: TEAM when the user has no team.
curl --request POST \
--url https://api.withallo.com/v2/api/crm/views \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER"
}
'import requests
url = "https://api.withallo.com/v2/api/crm/views"
payload = {
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Hot leads',
filters: [{field: 'company', operator: 'CONTAINS', value: 'Acme'}],
sort: [{field: 'created_at', order: 'desc'}],
owner_type: 'USER'
})
};
fetch('https://api.withallo.com/v2/api/crm/views', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/crm/views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Hot leads',
'filters' => [
[
'field' => 'company',
'operator' => 'CONTAINS',
'value' => 'Acme'
]
],
'sort' => [
[
'field' => 'created_at',
'order' => 'desc'
]
],
'owner_type' => 'USER'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/crm/views"
payload := strings.NewReader("{\n \"name\": \"Hot leads\",\n \"filters\": [\n {\n \"field\": \"company\",\n \"operator\": \"CONTAINS\",\n \"value\": \"Acme\"\n }\n ],\n \"sort\": [\n {\n \"field\": \"created_at\",\n \"order\": \"desc\"\n }\n ],\n \"owner_type\": \"USER\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.withallo.com/v2/api/crm/views")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Hot leads\",\n \"filters\": [\n {\n \"field\": \"company\",\n \"operator\": \"CONTAINS\",\n \"value\": \"Acme\"\n }\n ],\n \"sort\": [\n {\n \"field\": \"created_at\",\n \"order\": \"desc\"\n }\n ],\n \"owner_type\": \"USER\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/crm/views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Hot leads\",\n \"filters\": [\n {\n \"field\": \"company\",\n \"operator\": \"CONTAINS\",\n \"value\": \"Acme\"\n }\n ],\n \"sort\": [\n {\n \"field\": \"created_at\",\n \"order\": \"desc\"\n }\n ],\n \"owner_type\": \"USER\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "cvw_2abc",
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER",
"user_id": "usr_2abc",
"team_id": null,
"created_at": "2026-10-23T10:00:00",
"updated_at": "2026-10-23T10:00:00"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}CRM_WRITEChamps du corps
| Champ | Type | Requis | Description |
|---|---|---|---|
name | string | oui | Nom affiché, 255 caractères maximum |
filters | array | non | Conditions { field, operator, value }, combinées avec ET. 50 maximum |
sort | array | non | 2 entrées { field, order } maximum. order vaut asc ou desc. 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 | non | USER (défaut, privée) ou TEAM (partagée avec votre équipe) |
{
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER"
}
Réponse
Renvoie201 avec la vue.
{
"data": {
"id": "cvw_2abc",
"name": "Hot leads",
"filters": [
{
"field": "company",
"operator": "CONTAINS",
"value": "Acme"
}
],
"sort": [
{
"field": "created_at",
"order": "desc"
}
],
"owner_type": "USER",
"user_id": "usr_2abc",
"team_id": null,
"created_at": "2026-10-23T10:00:00",
"updated_at": "2026-10-23T10:00:00"
}
}
Erreurs
| Statut | Code | Quand |
|---|---|---|
400 | INVALID_REQUEST_BODY | name est absent, 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 |
Autorisations
Corps
1 - 255"Hot leads"
Conditions combined with AND. At most 50
50Show child attributes
Show child attributes
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
2Show child attributes
Show child attributes
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.
USER, TEAM "USER"
Réponse
The view that was created
A saved view: a named filter and sort over people. Views created in the Allo app and with the API are the same objects.
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?