curl -X PATCH https://api.whaapy.com/funnel/v1/stages/reorder \
-H "Authorization: Bearer wha_TU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}'
const response = await fetch('https://api.whaapy.com/funnel/v1/stages/reorder', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer wha_TU_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
stage_ids: [
'550e8400-e29b-41d4-a716-446655440002', // Nueva posición 0
'550e8400-e29b-41d4-a716-446655440000', // Nueva posición 1
'550e8400-e29b-41d4-a716-446655440001' // Nueva posición 2
]
})
});
import requests
response = requests.patch(
'https://api.whaapy.com/funnel/v1/stages/reorder',
headers={
'Authorization': 'Bearer wha_TU_API_KEY',
'Content-Type': 'application/json'
},
json={
'stage_ids': [
'550e8400-e29b-41d4-a716-446655440002',
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
}
)
$ch = curl_init('https://api.whaapy.com/funnel/v1/stages/reorder');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer wha_TU_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'stage_ids' => [
'550e8400-e29b-41d4-a716-446655440002',
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"success": true,
"stages": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Closed",
"position": 0,
"color": "#f59e0b",
"contact_count": 30,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Lead",
"position": 1,
"color": "#6366f1",
"contact_count": 120,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Qualified",
"position": 2,
"color": "#10b981",
"contact_count": 45,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
}
]
}
Funnels
Reordenar Etapas
Cambia el orden de las etapas del funnel
PATCH
/
funnel
/
v1
/
stages
/
reorder
curl -X PATCH https://api.whaapy.com/funnel/v1/stages/reorder \
-H "Authorization: Bearer wha_TU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}'
const response = await fetch('https://api.whaapy.com/funnel/v1/stages/reorder', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer wha_TU_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
stage_ids: [
'550e8400-e29b-41d4-a716-446655440002', // Nueva posición 0
'550e8400-e29b-41d4-a716-446655440000', // Nueva posición 1
'550e8400-e29b-41d4-a716-446655440001' // Nueva posición 2
]
})
});
import requests
response = requests.patch(
'https://api.whaapy.com/funnel/v1/stages/reorder',
headers={
'Authorization': 'Bearer wha_TU_API_KEY',
'Content-Type': 'application/json'
},
json={
'stage_ids': [
'550e8400-e29b-41d4-a716-446655440002',
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
}
)
$ch = curl_init('https://api.whaapy.com/funnel/v1/stages/reorder');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer wha_TU_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'stage_ids' => [
'550e8400-e29b-41d4-a716-446655440002',
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"success": true,
"stages": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Closed",
"position": 0,
"color": "#f59e0b",
"contact_count": 30,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Lead",
"position": 1,
"color": "#6366f1",
"contact_count": 120,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Qualified",
"position": 2,
"color": "#10b981",
"contact_count": 45,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
}
]
}
Scope requerido:
funnels:writeUsa este endpoint cuando el usuario arrastre etapas en tu UI de Kanban.
Body Parameters
string[]
required
Array de UUIDs de etapas en el nuevo orden deseado. La primera etapa tendrá posición 0.
Debes incluir todos los IDs de las etapas que quieres reordenar. Las etapas no incluidas mantendrán su posición relativa.
Ejemplos
curl -X PATCH https://api.whaapy.com/funnel/v1/stages/reorder \
-H "Authorization: Bearer wha_TU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
]
}'
const response = await fetch('https://api.whaapy.com/funnel/v1/stages/reorder', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer wha_TU_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
stage_ids: [
'550e8400-e29b-41d4-a716-446655440002', // Nueva posición 0
'550e8400-e29b-41d4-a716-446655440000', // Nueva posición 1
'550e8400-e29b-41d4-a716-446655440001' // Nueva posición 2
]
})
});
import requests
response = requests.patch(
'https://api.whaapy.com/funnel/v1/stages/reorder',
headers={
'Authorization': 'Bearer wha_TU_API_KEY',
'Content-Type': 'application/json'
},
json={
'stage_ids': [
'550e8400-e29b-41d4-a716-446655440002',
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
}
)
$ch = curl_init('https://api.whaapy.com/funnel/v1/stages/reorder');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer wha_TU_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'stage_ids' => [
'550e8400-e29b-41d4-a716-446655440002',
'550e8400-e29b-41d4-a716-446655440000',
'550e8400-e29b-41d4-a716-446655440001'
]
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Respuesta Exitosa
{
"success": true,
"stages": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "Closed",
"position": 0,
"color": "#f59e0b",
"contact_count": 30,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Lead",
"position": 1,
"color": "#6366f1",
"contact_count": 120,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Qualified",
"position": 2,
"color": "#10b981",
"contact_count": 45,
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-28T12:30:00Z"
}
]
}
Errores
400 Bad Request
{
"error": "validation_error",
"message": "Datos inválidos",
"details": {
"stage_ids": ["Debe proporcionar al menos una etapa"]
}
}
404 Not Found
{
"error": "not_found",
"message": "Algunas etapas no existen",
"invalid_ids": ["id-que-no-existe"]
}
Webhooks
Cuando reordenas etapas, se dispara el webhookfunnel_stages.reordered:
{
"event": "funnel_stages.reordered",
"data": {
"stage_ids": [
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001"
],
"reordered_at": "2026-01-28T12:30:00Z"
}
}
Próximos Pasos
Listar Etapas
Ver nuevo orden
Actualizar Etapa
Modificar etapa individual
Was this page helpful?