---
title: "End a customer's plan"
method: POST
path: "/v1/user-plans/{userId}/termination"
tags: ["User Plans"]
---

# End a customer's plan

`POST /v1/user-plans/{userId}/termination`

## Request

- Base URL: `https://api.telgea.com`
- URL: `https://api.telgea.com/v1/user-plans/{userId}/termination`
- Auth: API key in header `x-api-key`

Ends the customer's line on the date you name — the date they agreed to stop.

The line is suspended on that date and deactivated at the network 14 days later. The call returns as soon as the termination is scheduled, so a `202` means it is booked, not that the line is already down. Read it back on `GET /v1/user-plans/{userId}` as `terminationScheduledAt`.

**Billing is not prorated.** The customer keeps the period they already bought: the line stops on your date, and billing runs to `activeUntil` in the response. The plan does not renew afterwards.

Send `deleteUser: true` to delete the end-user along with the line. Otherwise the user remains, and `DELETE /v1/users/{userId}` succeeds once the line is suspended — you do not have to wait out the grace period.

## Path parameters

- `userId` string, uuid, required: UUID of the user whose plan this is.

## Headers

- `idempotency-key` string: A value unique to this request, of 1 to 255 printable ASCII characters — a UUID is the usual choice. Retry with the same key within 24 hours and you get the original response back, even if it was a failure, and nothing is done twice. Send a new key whenever you change the request. Keys are private to your API key and organisation.

## Request body

- TerminationBody
  - `terminationDate` string, date, required: The date the customer agreed to stop, as YYYY-MM-DD. Today is allowed; a past date is rejected.
  - `deleteUser` boolean: Delete the end-user once their line is gone. Defaults to false, in which case the user remains and can be deleted with DELETE /v1/users/{userId} once the line is suspended.

## Response `202`

Termination scheduled. States the date, when billing stops, and the lines ending.

- TerminationResponse
  - `terminationDate` string, required: The date the line stops, as accepted.
  - `activeUntil` string, nullable, required: The end of the period already paid for. Billing runs to this date even when the line stops earlier; null when the plan carried no billing period.
  - `numberIds` string[], required: The lines this termination ends, by their number ids.

## Other responses

- `400`: Request failed schema validation, or was refused by a business rule
- `401`: Missing or invalid API key in the X-API-Key header
- `403`: Insufficient permissions for this action
- `404`: No plan to end exists for this user in your organization
- `429`: The API key has used its request quota for the current window. `Retry-After` says how many seconds until it resets.
- `500`: Internal server error. Contact support if this persists.

---

[API](https://skmtc.dev/telgea/apis/telgea-api.md) - [All operations](https://skmtc.dev/telgea/apis/telgea-api/llms.txt) - [OpenAPI document](https://skmtc.dev/telgea/apis/telgea-api/revisions/4e8f8c04fe9e?raw)
