API v1
Crear prospecto del criadero
Alcance criaderos:write.
POST
/
api
/
v1
/
studs
/
{stud_id}
/
leads
Crear prospecto del criadero
curl --request POST \
--url https://api.equinos.co/api/v1/studs/{stud_id}/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Juan Restrepo",
"source": "web",
"interest_type": "buy_horse",
"email": "juan@example.com",
"phone": "3001234567",
"horse_id": null,
"notes": null
}
'import requests
url = "https://api.equinos.co/api/v1/studs/{stud_id}/leads"
payload = {
"name": "Juan Restrepo",
"source": "web",
"interest_type": "buy_horse",
"email": "juan@example.com",
"phone": "3001234567",
"horse_id": None,
"notes": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Juan Restrepo',
source: 'web',
interest_type: 'buy_horse',
email: 'juan@example.com',
phone: '3001234567',
horse_id: null,
notes: null
})
};
fetch('https://api.equinos.co/api/v1/studs/{stud_id}/leads', 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.equinos.co/api/v1/studs/{stud_id}/leads",
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' => 'Juan Restrepo',
'source' => 'web',
'interest_type' => 'buy_horse',
'email' => 'juan@example.com',
'phone' => '3001234567',
'horse_id' => null,
'notes' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.equinos.co/api/v1/studs/{stud_id}/leads"
payload := strings.NewReader("{\n \"name\": \"Juan Restrepo\",\n \"source\": \"web\",\n \"interest_type\": \"buy_horse\",\n \"email\": \"juan@example.com\",\n \"phone\": \"3001234567\",\n \"horse_id\": null,\n \"notes\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.equinos.co/api/v1/studs/{stud_id}/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Juan Restrepo\",\n \"source\": \"web\",\n \"interest_type\": \"buy_horse\",\n \"email\": \"juan@example.com\",\n \"phone\": \"3001234567\",\n \"horse_id\": null,\n \"notes\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.equinos.co/api/v1/studs/{stud_id}/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Juan Restrepo\",\n \"source\": \"web\",\n \"interest_type\": \"buy_horse\",\n \"email\": \"juan@example.com\",\n \"phone\": \"3001234567\",\n \"horse_id\": null,\n \"notes\": null\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "uuid",
"name": "Juan Restrepo",
"email": "juan@example.com",
"phone": "3001234567",
"source": "web",
"interest_type": "buy_horse",
"stage": "new",
"created_at": "2026-10-12T15:00:00-05:00"
}
}Autorizaciones
Token de una API key (credenciales de cliente). Dura una hora.
Encabezados
Cuerpo
application/json
Nombre del contacto.
Ejemplo:
"Juan Restrepo"
web, referral, social, event o call.
Ejemplo:
"web"
buy_horse, breeding_service, boarding o training.
Ejemplo:
"buy_horse"
Correo.
Ejemplo:
"juan@example.com"
Teléfono.
Ejemplo:
"3001234567"
UUID del ejemplar de interés.
Ejemplo:
null
Nota.
Ejemplo:
null
Respuesta
201 - application/json
Show child attributes
Show child attributes
⌘I
Crear prospecto del criadero
curl --request POST \
--url https://api.equinos.co/api/v1/studs/{stud_id}/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Juan Restrepo",
"source": "web",
"interest_type": "buy_horse",
"email": "juan@example.com",
"phone": "3001234567",
"horse_id": null,
"notes": null
}
'import requests
url = "https://api.equinos.co/api/v1/studs/{stud_id}/leads"
payload = {
"name": "Juan Restrepo",
"source": "web",
"interest_type": "buy_horse",
"email": "juan@example.com",
"phone": "3001234567",
"horse_id": None,
"notes": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Juan Restrepo',
source: 'web',
interest_type: 'buy_horse',
email: 'juan@example.com',
phone: '3001234567',
horse_id: null,
notes: null
})
};
fetch('https://api.equinos.co/api/v1/studs/{stud_id}/leads', 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.equinos.co/api/v1/studs/{stud_id}/leads",
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' => 'Juan Restrepo',
'source' => 'web',
'interest_type' => 'buy_horse',
'email' => 'juan@example.com',
'phone' => '3001234567',
'horse_id' => null,
'notes' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.equinos.co/api/v1/studs/{stud_id}/leads"
payload := strings.NewReader("{\n \"name\": \"Juan Restrepo\",\n \"source\": \"web\",\n \"interest_type\": \"buy_horse\",\n \"email\": \"juan@example.com\",\n \"phone\": \"3001234567\",\n \"horse_id\": null,\n \"notes\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.equinos.co/api/v1/studs/{stud_id}/leads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Juan Restrepo\",\n \"source\": \"web\",\n \"interest_type\": \"buy_horse\",\n \"email\": \"juan@example.com\",\n \"phone\": \"3001234567\",\n \"horse_id\": null,\n \"notes\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.equinos.co/api/v1/studs/{stud_id}/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Juan Restrepo\",\n \"source\": \"web\",\n \"interest_type\": \"buy_horse\",\n \"email\": \"juan@example.com\",\n \"phone\": \"3001234567\",\n \"horse_id\": null,\n \"notes\": null\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "uuid",
"name": "Juan Restrepo",
"email": "juan@example.com",
"phone": "3001234567",
"source": "web",
"interest_type": "buy_horse",
"stage": "new",
"created_at": "2026-10-12T15:00:00-05:00"
}
}
