# 1. Create child
RESPONSE=$(curl -s -X POST https://api.scute.io/v1/workspaces/{workspace_id}/children \
-H "Authorization: Bearer {parent_api_key}" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Corp", "branding_display_name": "Acme Corp", "branding_color": "#2563EB", "webhook_url": "https://your-server.com/webhooks/acme" }')
CHILD_APP_ID=$(echo $RESPONSE | jq -r '.child_workspace.app_id')
CHILD_API_KEY=$(echo $RESPONSE | jq -r '.child_workspace.api_key_token')
# 2. Get M2M token
M2M_TOKEN=$(curl -s -X POST https://api.scute.io/v1/apps/${CHILD_APP_ID}/m2m/token \
-H "Authorization: Bearer ${CHILD_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"client_name": "backend"}' | jq -r '.short_token')
# 3. Send verification
curl -X POST https://api.scute.io/v1/verify/${CHILD_APP_ID}/verifications/intent \
-H "X-Authorization: Bearer ${M2M_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"intent_name": "Password Reset",
"method": "sms",
"verification_type": "magic_link",
"meta_data": {
"contact_email": "user@acme.com",
"contact_phones": [{"phone_number": "+14155551234", "phone_type": "mobile"}],
"ticket_id": "TICKET-001"
}
}'