---
title: "Release a rented phone number"
method: POST
path: "/product/release-number"
tags: ["Phone Numbers"]
---

# Release a rented phone number

`POST /product/release-number`

Releases a phone number previously rented via `POST /product/rent-number`. The number goes back into provider inventory and recurring charges stop.

Returns `400` if the number is still assigned to an agent — detach it from the agent first (`PATCH /agent/{agentId}` with `productId: null`).

## Request body

- object
  - `productId` string, required — 24-char hex MongoDB ObjectId of the phone-number product to release (the `_id` value returned by `GET /product/phone-numbers`).

## Response `200`

Number released

- object
  - `status` boolean
  - `data` object
    - `success` boolean

## Other responses

- `400` — Number is still assigned to an agent (detach it first), or invalid product ID format.
- `401` — Unauthorized access
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/9fd13f607823/schema)
