Automatizaciones
Obtener una automatización
Lee una automatización de Instagram por ID con su estado, el tipo de disparador, las marcas de tiempo y la configuración tipada completa.
GET
/
api
/
v1
/
automations
/
{automationId}
Get an automation
curl --request GET \
--url https://levios.app/api/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://levios.app/api/v1/automations/{automationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://levios.app/api/v1/automations/{automationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"error": {
"code": "api_invalid_content_length",
"message": "Invalid Content-Length.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unauthorized",
"message": "Authentication required.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_account_not_granted",
"message": "This credential is not authorized for the request.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_automation_not_found",
"message": "The requested automation was not found.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_body_too_large",
"message": "The JSON request body exceeds 1 MiB.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unsupported_media_type",
"message": "Content-Type must be application/json.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_validation_error",
"message": "The request does not match the declared schema.",
"correlation_id": "<string>",
"details": {
"issues": [
{
"code": "<string>",
"path": [
1
]
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_internal_error",
"message": "The request could not be completed.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_account_resolution_unavailable",
"message": "The reachable account set could not be read.",
"correlation_id": "<string>"
}
}Pasa el ID de la automatización en la ruta y su
Una automatización
account_id en la cadena de
consulta. Tu clave de API necesita automations:read y acceso a esa cuenta.
La respuesta contiene el name editable y la configuration completa, además
de status, trigger_type y las marcas de tiempo. trigger_type indica qué
tipo de actividad de Instagram escucha la automatización y se deriva de la
configuración, así que no lo defines directamente.
Cuando una automatización activa tiene ediciones sin publicar,
has_unpublished_changes es true, draft_updated_at guarda el último cambio
del borrador y la configuration devuelta es ese borrador. Publícalo con
Activar una automatización.
Lee el indicador de compatibilidad
authoring_compatibility te dice si la automatización se puede editar mediante
el contrato público:
| Valor | Significado |
|---|---|
public_v1 | configuration trae la configuración tipada completa y se puede reemplazar. |
read_only_legacy | configuration es null. La automatización es anterior al contrato público. |
read_only_legacy sigue informando su id, su name, su
status, su trigger_type y sus marcas de tiempo, y sigue funcionando. Puedes
renombrarla y puedes convertirla enviando una configuration completa mediante
Actualizar una automatización.
Conserva la versión
Conserva el valorupdated_at devuelto. Debes enviarlo como
expected_updated_at cuando actualices, actives, desactives o elimines la
automatización. Esto evita que un cliente sobrescriba un cambio más reciente.
Esta es una operación de lectura segura, así que puedes repetirla sin modificar
la automatización.
Solicitud de ejemplo
curl --get \
--url "https://levios.app/api/v1/automations/${LEVIOS_AUTOMATION_ID}" \
--header "Authorization: Bearer ${LEVIOS_API_KEY}" \
--data-urlencode "account_id=${LEVIOS_ACCOUNT_ID}"
Ejemplo de respuesta correcta
ID, fechas y contenido ilustrativos. HTTP200.
{
"automation": {
"id": "00000000-0000-4000-8000-000000000002",
"account_id": "00000000-0000-4000-8000-000000000001",
"name": "Guide request",
"status": "draft",
"has_unpublished_changes": false,
"draft_updated_at": null,
"created_at": "2026-09-01T12:00:00.000000Z",
"updated_at": "2026-09-01T12:00:00.000000Z",
"trigger_type": "comment",
"configuration": {
"contact_filter": "anyone",
"trigger": {
"type": "comment",
"publication": {
"mode": "all"
},
"keywords": {
"mode": "specific",
"match_mode": "whole_word",
"values": [
"guide"
]
}
},
"opening": {
"public_reply": {
"enabled": false
},
"direct_message": {
"delay_seconds": 0,
"message": {
"text": "Here is the guide you asked for.",
"buttons": [
{
"type": "url",
"title": "Open the guide",
"url": "https://example.com/guide"
}
]
}
}
},
"follow_up": null,
"extras": {
"cooldown": {
"mode": "none"
}
}
},
"authoring_compatibility": "public_v1"
}
}
Get an automation
curl --request GET \
--url https://levios.app/api/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://levios.app/api/v1/automations/{automationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://levios.app/api/v1/automations/{automationId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"error": {
"code": "api_invalid_content_length",
"message": "Invalid Content-Length.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unauthorized",
"message": "Authentication required.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_account_not_granted",
"message": "This credential is not authorized for the request.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_automation_not_found",
"message": "The requested automation was not found.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_body_too_large",
"message": "The JSON request body exceeds 1 MiB.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unsupported_media_type",
"message": "Content-Type must be application/json.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_validation_error",
"message": "The request does not match the declared schema.",
"correlation_id": "<string>",
"details": {
"issues": [
{
"code": "<string>",
"path": [
1
]
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_internal_error",
"message": "The request could not be completed.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_account_resolution_unavailable",
"message": "The reachable account set could not be read.",
"correlation_id": "<string>"
}
}
