Skip to main content
POST
/
alerts
Create alert
curl --request POST \
  --url https://itpgo-api.itpgo.workers.dev/alerts \
  --header 'Content-Type: application/json' \
  --data '
{
  "plate": "GL0045138",
  "status": "expiring_soon",
  "expiresAt": "2026-01-15T00:00:00.000Z",
  "id": "5d06ab7f-dab1-45b8-a084-e63e0b1f6584"
}
'
import requests

url = "https://itpgo-api.itpgo.workers.dev/alerts"

payload = {
"plate": "GL0045138",
"status": "expiring_soon",
"expiresAt": "2026-01-15T00:00:00.000Z",
"id": "5d06ab7f-dab1-45b8-a084-e63e0b1f6584"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
plate: 'GL0045138',
status: 'expiring_soon',
expiresAt: '2026-01-15T00:00:00.000Z',
id: '5d06ab7f-dab1-45b8-a084-e63e0b1f6584'
})
};

fetch('https://itpgo-api.itpgo.workers.dev/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://itpgo-api.itpgo.workers.dev/alerts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plate' => 'GL0045138',
'status' => 'expiring_soon',
'expiresAt' => '2026-01-15T00:00:00.000Z',
'id' => '5d06ab7f-dab1-45b8-a084-e63e0b1f6584'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://itpgo-api.itpgo.workers.dev/alerts"

payload := strings.NewReader("{\n \"plate\": \"GL0045138\",\n \"status\": \"expiring_soon\",\n \"expiresAt\": \"2026-01-15T00:00:00.000Z\",\n \"id\": \"5d06ab7f-dab1-45b8-a084-e63e0b1f6584\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://itpgo-api.itpgo.workers.dev/alerts")
.header("Content-Type", "application/json")
.body("{\n \"plate\": \"GL0045138\",\n \"status\": \"expiring_soon\",\n \"expiresAt\": \"2026-01-15T00:00:00.000Z\",\n \"id\": \"5d06ab7f-dab1-45b8-a084-e63e0b1f6584\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://itpgo-api.itpgo.workers.dev/alerts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"plate\": \"GL0045138\",\n \"status\": \"expiring_soon\",\n \"expiresAt\": \"2026-01-15T00:00:00.000Z\",\n \"id\": \"5d06ab7f-dab1-45b8-a084-e63e0b1f6584\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "5d06ab7f-dab1-45b8-a084-e63e0b1f6584",
  "plate": "B-06-SSS",
  "status": "expiring_soon",
  "expiresAt": "2025-12-31T23:59:59.000Z",
  "createdAt": "2025-11-10T12:00:00.000Z"
}

Body

application/json
plate
string
required
Pattern: ^[A-Z0-9-]{3,15}$/i
Example:

"GL0045138"

status
enum<string>
required
Available options:
active,
expiring_soon,
expired
Example:

"expiring_soon"

expiresAt
string<date-time>
required
Example:

"2026-01-15T00:00:00.000Z"

id
string<uuid>
Example:

"5d06ab7f-dab1-45b8-a084-e63e0b1f6584"

Response

Alert created

id
string<uuid>
required
Example:

"5d06ab7f-dab1-45b8-a084-e63e0b1f6584"

plate
string
required
Pattern: ^[A-Z0-9-]{3,15}$/i
Example:

"B-06-SSS"

status
enum<string>
required
Available options:
active,
expiring_soon,
expired
Example:

"expiring_soon"

expiresAt
string<date-time>
required
Example:

"2025-12-31T23:59:59.000Z"

createdAt
string<date-time>
required
Example:

"2025-11-10T12:00:00.000Z"