const response = await fetch("https://algapsa.com/api/v1/tickets/{id}/status", {
method: "PUT",
headers: {
"X-API-Key": "$ALGA_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"status_id": "01HN2K7VRB9PQ3Y0000000000",
"closed_at": "2026-04-18T15:22:14Z",
"closed_by": "01HN2K7VRB9PQ3Y0000000000",
"override_close_rules": false,
"override_close_rules_reason": "string",
"suppressContactNotifications": false,
"suppressInternalNotifications": false
})
});
const data = await response.json();