1. Go to this page and download the library: Download incident-io/sdk-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
incident-io / sdk-php example snippets
use IncidentIo\Api\IncidentsV2Api;
use IncidentIo\Configuration;
$config = (new Configuration())->setAccessToken(getenv('INCIDENT_API_KEY'));
$incidents = new IncidentsV2Api(config: $config);
$result = $incidents->incidentsV2List(pageSize: 25);
foreach ($result->getIncidents() as $incident) {
echo $incident->getReference(), ' ', $incident->getName(), "\n";
}
use IncidentIo\Api\IncidentsV2Api;
use IncidentIo\Model\IncidentsCreatePayloadV2;
$incident = $incidents->incidentsV2Create(new IncidentsCreatePayloadV2([
'idempotencyKey' => 'deploy-2026-09-23-01',
'name' => 'Checkout is returning 500s',
'severityId' => '01FH5TZRWMNAFB0DZ23FD1TV96',
'visibility' => IncidentsCreatePayloadV2::VISIBILITY__PUBLIC,
]))->getIncident();