Votre plateforme. La voix d’Amigo.
Déclenchez un appel, recevez ses résultats et intégrez les signaux de vos résidents. Tout ce qu’il faut pour construire votre intégration.
Guide d’intégration entreprise
De l’alerte à la conversation.
Connectez le logiciel de votre entreprise aux Amigo déployés pour vos résidents : appels, résultats et signaux dans votre tableau de bord.
Connecter
Depuis votre organisation, créez une clé API et enregistrez votre webhook HTTPS.
Déclencher
Demandez un appel avec l’identifiant du résident et le contexte.
Synchroniser
Vérifiez la notification et récupérez les signaux autorisés.
Appeler un résident de votre organisation
Ce parcours s’adresse aux entreprises disposant d’une organisation Amigo. Le résident doit être actif et associé à un Amigo déployé dans cette organisation. Utilisez une clé avec calls:write, calls:read, residents:read et les permissions de signaux nécessaires. Associez l’identifiant résident de votre logiciel au resident_id Amigo, puis enregistrez votre webhook depuis la section Webhooks.
export AMIGO_BASE_URL="https://app.tryamigo.io"
export AMIGO_API_KEY="YOUR_SERVER_API_KEY"
curl -X POST "$AMIGO_BASE_URL/api/public/v1/calls" \
-H "Authorization: Bearer $AMIGO_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: device-alert-9271" \
-d '{
"resident_id": "8c9f8c7e-91db-4dc9-883c-4c91b87538a8",
"external_user_id": "resident-482",
"external_reference": "device-alert-9271",
"trigger": {
"type": "device_alert",
"description": "No refrigerator opening detected today. Ask how the resident is feeling and whether they have eaten.",
"device_id": "sensor-12"
}
}'curl "$AMIGO_BASE_URL/api/public/v1/call-requests/$CALL_REQUEST_ID" \
-H "Authorization: Bearer $AMIGO_API_KEY"
curl "$AMIGO_BASE_URL/api/public/v1/calls/$CALL_ID/results" \
-H "Authorization: Bearer $AMIGO_API_KEY"
curl "$AMIGO_BASE_URL/api/public/v1/residents/$RESIDENT_ID/signals?range=30d" \
-H "Authorization: Bearer $AMIGO_API_KEY"Exécutez ces requêtes côté serveur. La clé API ne doit jamais apparaître dans le code du navigateur. Les exemples utilisent AMIGO_BASE_URL pour votre domaine HTTPS.