Kunden kündigen

POST /api/customers/:customerPublicId/cancel

Kunden kündigen

POST /api/customers/:customerPublicId/cancel

Markiert einen Kunden zur Kündigung und startet die 3-Tage-Schonfrist sofort.

Authentifizierung

Dieser Endpoint erfordert Authentifizierung.

BASE_URL="https://uptimeify.io"
TOKEN="wsm_<dein-api-token>"

Beispiel-Request

curl -X POST "$BASE_URL/api/customers/6bfec6f6-245a-47ce-843b-157d97d56f88/cancel" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"

Beispiel-Response

{
  "id": 101,
  "publicId": "6bfec6f6-245a-47ce-843b-157d97d56f88",
  "organizationId": 1,
  "name": "Customer A GmbH",
  "email": "contact@customer-a.de",
  "notificationPhoneNumber": "+491701234567",
  "notificationEmail": "alerts@customer-a.de",
  "packageId": 3,
  "packageType": "acquisition_test",
  "status": "marked_for_cancellation",
  "cancellationDate": "2026-03-01T19:37:00.000Z",
  "cancelledAt": "2026-02-26T19:37:00.000Z",
  "customFields": {
    "internalReference": "KD-999"
  },
  "monthlyReportsEnabled": true,
  "notificationChannels": null,
  "notificationTargets": null,
  "notificationRules": null,
  "smsUsageCurrentMonth": 0,
  "createdAt": "2026-02-20T09:15:00.000Z",
  "updatedAt": "2026-02-26T19:37:00.000Z"
}

Hinweise:

  • cancelledAt ist der Zeitpunkt, zu dem die Kündigung angefordert wurde und die Schonfrist startet.
  • cancellationDate ist das effektive Ende der Schonfrist. Dieser Endpoint setzt es aktuell auf 3 Tage nach cancelledAt.

Häufige Fehler

  • 400 Invalid Customer identifier
  • 401 Unauthorized
  • 403 Forbidden / Organization ID not found
  • 404 Customer not found
  • 500 Failed to mark customer for cancellation