Request cURL JS Python Go PHP
Copy request example cURL
curl -s -X POST "https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/reopen" \
-H "Authorization: Bearer $UP4_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'JavaScript
const res = await fetch("https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/reopen", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.UP4_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
console.log(res.status, await res.json());Python
import os
import requests
res = requests.post(
"https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/reopen",
headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
json={},
)
print(res.status_code, res.json())Go
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
payload := strings.NewReader(`{}`)
req, _ := http.NewRequest("POST", "https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/reopen", payload)
req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}PHP
<?php
$payload = <<<'JSON'
{}
JSON;
$ch = curl_init("https://app.upfour.io/v1/incidents/00000000-0000-4000-8000-000000000001/reopen");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("UP4_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch); Response 200 400 403 404
Copy response example 200
{
"data": {
"acknowledged_at": "2026-10-27T09:00:00Z",
"cause": "Reported manually",
"check_method": "GET",
"check_url": "https://example.com",
"client_id": null,
"correlated_count": 0,
"created_at": "2026-10-27T09:00:00Z",
"created_by": "anna@example.com",
"description": "Response times above 2 seconds since 08:40.",
"duration_seconds": 0,
"escalation_target_kind": "name",
"escalation_target_label": "Default escalation",
"escalation_target_name": "Default escalation",
"heartbeat_id": null,
"heartbeat_name": "",
"id": "00000000-0000-4000-8000-000000000001",
"metadata": {},
"monitor_id": "00000000-0000-4000-8000-000000000002",
"monitor_name": "Marketing website",
"notification_deliveries": [],
"notified_kind": "nobody",
"notified_label": "Nobody",
"override_channel_ids": [],
"resolved_at": null,
"resolved_by_type": null,
"resolved_by_user_id": null,
"routing_target_id": "00000000-0000-4000-8000-000000000003",
"routing_type": "escalation_policy",
"severity": "warning",
"started_at": "2026-10-27T09:00:00Z",
"started_by_type": "user",
"started_by_user_id": "00000000-0000-4000-8000-000000000004",
"status": "open",
"title": "Checkout is slow",
"updated_at": "2026-10-27T09:00:00Z",
"updates": [
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000004",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "reopened",
"id": "00000000-0000-4000-8000-000000000005",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Reopened by anna@example.com",
"message_code": "reopened_by",
"message_params": {
"name": "anna@example.com"
},
"payload": {}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000004",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "resolved",
"id": "00000000-0000-4000-8000-000000000006",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Resolved by anna@example.com · open for 0s",
"message_code": "resolved_by",
"message_params": {
"duration": "0s",
"name": "anna@example.com"
},
"payload": {}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000004",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "attachment_added",
"id": "00000000-0000-4000-8000-000000000007",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "checkout-error.txt",
"payload": {
"attachment_id": "00000000-0000-4000-8000-000000000008",
"file_size": 42,
"filename": "checkout-error.txt",
"mime_type": "text/plain"
}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000004",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "comment",
"id": "00000000-0000-4000-8000-000000000009",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Looking into the payment provider.",
"payload": {}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000004",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "escalation_target_acknowledged",
"id": "00000000-0000-4000-8000-000000000010",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "anna@example.com confirmed the manual escalation; the alert plan stopped",
"payload": {
"manual_escalation_id": "00000000-0000-4000-8000-000000000011",
"source": "authenticated_user",
"target_user_id": "00000000-0000-4000-8000-000000000004"
}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000004",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "escalated",
"id": "00000000-0000-4000-8000-000000000011",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Escalated to anna@example.com; the alert plan continues until they confirm",
"payload": {
"alert_plan_continues": true,
"channel_ids": [
"00000000-0000-4000-8000-000000000012"
],
"manual_escalation_id": "00000000-0000-4000-8000-000000000011",
"manual_escalation_step": 1000001,
"request_key": "walk-60",
"status": "waiting_for_target_confirmation",
"target_label": "anna@example.com",
"target_user_id": "00000000-0000-4000-8000-000000000004"
}
},
{
"actor_label": "anna@example.com",
"actor_type": "user",
"actor_user_id": "00000000-0000-4000-8000-000000000004",
"created_at": "2026-10-27T09:00:00Z",
"event_type": "created",
"id": "00000000-0000-4000-8000-000000000013",
"incident_id": "00000000-0000-4000-8000-000000000001",
"message": "Incident reported manually.",
"message_code": "incident_created_manual",
"payload": {}
}
],
"user_id": "00000000-0000-4000-8000-000000000004"
}
} 400
{
"error": {
"code": "bad_request",
"message": "The request is malformed or fails validation.",
"request_id": "req_…"
}
} 403
{
"error": {
"code": "permission_denied",
"message": "The credentials do not permit this action.",
"request_id": "req_…"
}
} 404
{
"error": {
"code": "not_found",
"message": "The requested resource does not exist or is outside the caller's scope.",
"request_id": "req_…"
}
}