Listar contactos del business
curl --request GET \
--url https://app.1to1.ai/api/v1/public/{slug}/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.1to1.ai/api/v1/public/{slug}/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.1to1.ai/api/v1/public/{slug}/contacts', 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://app.1to1.ai/api/v1/public/{slug}/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.1to1.ai/api/v1/public/{slug}/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.1to1.ai/api/v1/public/{slug}/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.1to1.ai/api/v1/public/{slug}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"second_last_name": "<string>",
"full_name": "Mariana López",
"whatsapp_id": "525511223344",
"whatsapp_user_id": "MX.2658176374597251",
"whatsapp_username": "mariana.lopez",
"acquisition_source": "whatsapp",
"is_tester": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}Contacts
Listar contactos del business
Devuelve contactos del business ordenados por created_at desc. Paginación cursor opaco: usa next_cursor de la response anterior. Default limit=50, máximo 100. Incluye contactos reales y tester mezclados; distinguir por is_tester. Para solo-tester existe /tester/contacts.
GET
/
{slug}
/
contacts
Listar contactos del business
curl --request GET \
--url https://app.1to1.ai/api/v1/public/{slug}/contacts \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.1to1.ai/api/v1/public/{slug}/contacts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.1to1.ai/api/v1/public/{slug}/contacts', 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://app.1to1.ai/api/v1/public/{slug}/contacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.1to1.ai/api/v1/public/{slug}/contacts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.1to1.ai/api/v1/public/{slug}/contacts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.1to1.ai/api/v1/public/{slug}/contacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"middle_name": "<string>",
"last_name": "<string>",
"second_last_name": "<string>",
"full_name": "Mariana López",
"whatsapp_id": "525511223344",
"whatsapp_user_id": "MX.2658176374597251",
"whatsapp_username": "mariana.lopez",
"acquisition_source": "whatsapp",
"is_tester": false,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}{
"code": "INVALID_API_TOKEN",
"message": "The provided API token is invalid or has been revoked. Generate a new one in Settings → API Token."
}Autorizaciones
API token emitido desde Settings → API Token del dashboard 1TO1 AI. Enviar en header Authorization: Bearer sk_1to1_...
Parámetros de ruta
Slug del business, case-insensitive. Debe coincidir con el business del token.
Ejemplo:
"acme"
Parámetros de consulta
Cursor opaco devuelto en next_cursor de la respuesta previa.
Cantidad máxima a devolver. Default 50, máx 100.
Rango requerido:
1 <= x <= 100Ejemplo:
50
⌘I