---
title: "Reconcile Stuck Number Provisioning Endpoint"
method: POST
path: "/internal/reconcile-stuck-number-provisioning"
tags: ["Internal", "Internal"]
---

# Reconcile Stuck Number Provisioning Endpoint

`POST /internal/reconcile-stuck-number-provisioning`

## Request

- Base URL: `https://api.call2me.app`
- URL: `https://api.call2me.app/internal/reconcile-stuck-number-provisioning`
- Auth: HTTP bearer

Reconcile numbers stuck in provisioning limbo (> 10 min).

Two failure classes this handles:

  A. `phone_numbers.status = 'pending'` from /v1/numbers/purchase where the
     activation transaction never ran after Telnyx succeeded.
  B. `pending_number_purchases.status = 'ordering'` from the BUY_NUMBER
     webhook path where fulfill crashed after Telnyx order committed.

Strategy: ask Telnyx which numbers it thinks we own. If our 'pending'/'ordering'
number is in that list → activate it. If not → it was never ordered or was
released; clean up and (for purchase path) refund the user.

Run every 10 minutes via Cloud Scheduler.

## Headers

- `x-internal-key` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/call2me/apis/call2me-api.md) · [All operations](https://skmtc.dev/call2me/apis/call2me-api/llms.txt) · [OpenAPI document](https://skmtc.dev/call2me/apis/call2me-api/revisions/3951f9b7e47d?raw)
