Cancel a port request
import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const portingOrder = await mv.ports.cancel("port_7Hk2Lm9Qp");console.log(portingOrder);from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
porting_order = client.ports.cancel("port_7Hk2Lm9Qp")print(porting_order)curl -X POST https://api.morevoice.ai/v1/ports/port_7Hk2Lm9Qp/cancel \ -H "Authorization: Bearer $MOREVOICE_API_KEY" \ -H "Idempotency-Key: $(uuidgen)"Withdraws a port that has not completed (cancellable; a rejected port can be closed this way too). A completed or already cancelled port answers 409. Cancel well before the port_date: once the carrier moved the numbers it can’t be undone here.
Try it in the API playground with a test-mode key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A porting order ID (port_…).
Header Parameters
Section titled “Header Parameters”The API version to use for this request. Defaults to the version the API key is pinned to.
Example
2026-11-01A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice.
Example
5f0c1e8a-7b2d-4c3e-9f1a-2b6d8e4c0a17Responses
Section titled “Responses”OK
A request to move (port) phone numbers you hold at another provider to this platform. The account holder’s details are kept encrypted and never returned.
object
POST /v1/ports/{id}/cancel is still possible.
An ISO-8601 timestamp in UTC.
The provider the numbers are with today.
object
The latest invoice from the current provider is on file.
The signed letter of authorization is on file.
A porting order ID (prefix port_).
true in live mode, false in test mode.
The numbers to move (E.164).
Why the port was rejected (rejected only).
The date you asked for (YYYY-MM-DD); the real date is the carrier’s (port_date).
Where it was filed: in the app (Phone numbers → Port your numbers) or through this API.
submitted (sent, waiting for our review) → in_review (our staff check the request and its documents) → submitted_to_carrier (waiting for the carrier’s date) → scheduled (port_date is set) → completed (the numbers are your phone numbers). Or docs_required (another document is needed: fix it in the app), rejected (rejection_reason) or cancelled. draft: created in the app and not sent yet.
Each change of status, oldest first.
object
An ISO-8601 timestamp in UTC.
Our staff’s note to you (why more documents are needed, the date, why it was rejected).
An ISO-8601 timestamp in UTC.
Example
{ "cancellable": true, "completed_at": null, "created": "2026-11-23T09:00:00.000Z", "current_carrier": "Bezeq", "documents": { "invoice": true, "loa": true }, "estimate_business_days": { "max": 10, "min": 7 }, "id": "port_4KqLm8XzT2vR9bYc1NdWe", "livemode": true, "numbers": [ "+97235550100", "+972775556789" ], "object": "porting_order", "port_date": null, "rejection_reason": null, "requested_date": "2026-12-01", "source": "api", "status": "in_review", "submitted_at": "2026-11-23T09:00:00.000Z", "timeline": [ { "at": "2026-11-23T09:00:00.000Z", "note": null, "status": "submitted" }, { "at": "2026-11-23T11:20:00.000Z", "note": null, "status": "in_review" } ], "updated": "2026-11-23T11:20:00.000Z"}The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "parameter_missing", "doc_url": "https://docs.morevoice.ai/api/errors#parameter-missing", "message": "Missing required parameter: to.", "param": "to", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "invalid_request_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No valid API key was sent.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "invalid_api_key", "doc_url": "https://docs.morevoice.ai/api/errors#invalid-api-key", "message": "Invalid API key.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "authentication_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
The key may not do this (a missing scope, a plan limit, or a compliance block).
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "missing_scope", "doc_url": "https://docs.morevoice.ai/api/errors#missing-scope", "message": "This API key lacks the calls:write scope.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "permission_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No object with this ID (in the path or the body) exists in this organisation and mode.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "resource_missing", "doc_url": "https://docs.morevoice.ai/api/errors#resource-missing", "message": "No such object: 'call_4Gk2'.", "param": "id", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "not_found" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
The request conflicts with the object’s state, or the Idempotency-Key was reused with other parameters.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "idempotency_mismatch", "doc_url": "https://docs.morevoice.ai/api/errors#idempotency-mismatch", "message": "This Idempotency-Key was already used with different parameters.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "idempotency_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
Too many requests, or no call capacity right now. Retry after the Retry-After delay.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "rate_limited", "doc_url": "https://docs.morevoice.ai/api/errors#rate-limited", "message": "Too many requests. Retry after 1 second.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "rate_limit_error" }}Headers
Section titled “Headers”Seconds to wait before retrying.
The request’s ID (req_…). Quote it when you contact support.
Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "internal_error", "doc_url": "https://docs.morevoice.ai/api/errors#internal-error", "message": "Something went wrong on MoreVoice's side.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "api_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.