Telecom v1 / Telecom
Phone number analysis
The type (mobile, landline, non-geographic, short), the operator that received the block at allocation and whether the number sits in a block allocated by ANCOM. POST, because the number is the client's data: in a GET it would end up in access logs, in the browser history and in the referrer.
POST
https://oneapi.ro/api/telecom/v1/analizeaza
Request body
Sent as JSON in the request body (Content-Type: application/json) — not in the query string.
NameTypeDescriptionAccepted values
numarrequired
text
Minimum 3, maximum 32.
max 32 car.
Mobile
Request body
{
"numar": "0721234567"
}
Landline, international prefix
Request body
{
"numar": "+40 264 405 300"
}
Made-up number
Request body
{
"numar": "0312345678"
}
Query parameters
This route accepts no query parameters.
How it behaves
- The request body has a single field,
numar(string, 3–32 characters, required): the number to analyse. Body fields do not appear in the parameter table — that one documents the query string only — which is why they are described here. - The method is POST because the number is the caller’s data: in a GET it would end up in access logs, browser history and the
Refererheader. The analysed number is never stored — not in logs, not in the database. - Allocation is not the current operator. ANCOM publishes who received the block, not who holds the number today. A ported number stays in the original operator’s block. That is why the response keeps
operator_alocare(what we know) apart fromoperator_curent, which is always null — Romania has no public portability source. The field exists precisely to make the gap explicit. - Any common form is accepted:
0721234567,+40721234567,0040 721 234 567,0721-234-567. Separators are ignored. - Short numbers are validated too (
1910,0264 990,116000) — they are ~17% of the allocated blocks. They have fewer than 9 digits, so no format rule can confirm them: they are reported valid only if they actually appear in an allocated block. A short number that is not found getsvalid: falsewith reasonnumar_scurt_nealocat. - A well-formed 9-digit number stays
valid: trueeven when its block is unallocated — the useful distinction isbloc_alocat, notvalid.
What it is for
- Validating a phone number at sign-up or checkout: reject numbers that fall in no ANCOM-allocated block, i.e. numbers that cannot exist.
- Routing a message or call: find out whether the number is mobile, fixed or non-geographic before picking the channel (an SMS to a landline is wasted).
- Fraud scoring: a well-formed number sitting in an unallocated block is a strong signal of made-up form data.
- Normalising a contact database to a single form (E.164) from whatever shape each number was typed in.
Response structure
All fields below live inside data.
FieldTypeDescription
valid
boolean
Numărul e o formă recunoscută. La numerele scurte, validitatea se decide prin alocare.
motiv
string
Doar când
valid e false: format_nerecunoscut sau numar_scurt_nealocat.
introdus
string
Exact ce ai trimis, ca să poți corela răspunsurile într-un lot.
format.e164
string
Forma internațională (
+40…). Lipsește la numerele scurte — ele nu se formează din străinătate.
format.national
string
Forma națională, cu 0 inițial.
format.fara_prefix
string
Cifrele semnificative, fără 0 și fără prefix de țară.
tip
string
mobil | fix | nongeografic | scurt | necunoscut. Vine din blocul alocat; fără bloc, e o deducție după prima cifră.
bloc_alocat
boolean
Numărul cade într-un bloc alocat de ANCOM.
false = cel mai probabil numărul nu există.
operator_alocare
string
Titularul de licență care a primit blocul, cu numele exact din registrul ANCOM.
operator_curent
null
Întotdeauna null: portabilitatea nu e publicată. Prezent explicit, ca să nu fie citit ca omisiune.
bloc
object
The allocated range the number falls in: the numbering domain, the first and last number, the size.
bloc.domeniu
string
Domeniul de numerotație din care face parte blocul (ex. 721, 264).
bloc.primul
string
Primul număr din bloc.
bloc.ultimul
string
Ultimul număr din bloc.
bloc.dimensiune
integer
Câte numere conține blocul.
observatie
string
Avertismentul aplicabil rezultatului (portabilitate sau bloc nealocat).
sursa
object
The allocation source: ANCOM, "Resurse de numerotație", with the import date.
sursa.ancom
string
Setul de date folosit („Resurse de numerotație").
sursa.actualizat
string
Când a fost importată ultima dată alocarea.
Response examples
body: {"numar": "0721234567"}
POSThttps://oneapi.ro/api/telecom/v1/analizeaza
{
"data": {
"valid": true,
"introdus": "0721234567",
"format": {
"e164": "+40721234567",
"national": "0721234567",
"fara_prefix": "721234567"
},
"tip": "mobil",
"bloc_alocat": true,
"operator_alocare": "VODAFONE ROMANIA S.A.",
"bloc": {
"domeniu": "72",
"primul": "721000000",
"ultimul": "721999999",
"dimensiune": 1000000
},
"observatie": "Operatorul e cel care a primit blocul la alocare. Dacă numărul a fost portat, deținătorul actual poate fi altul — ANCOM nu publică portabilitatea.",
"sursa": {
"ancom": "Resurse de numerotație",
"actualizat": "2026-10-02 11: 46: 30"
}
}
}
body: {"numar": "+40 264 405 300"}
POSThttps://oneapi.ro/api/telecom/v1/analizeaza
{
"data": {
"valid": true,
"introdus": "0264405300",
"format": {
"e164": "+40264405300",
"national": "0264405300",
"fara_prefix": "264405300"
},
"tip": "fix",
"bloc_alocat": true,
"operator_alocare": "ORANGE ROMANIA S.A.",
"bloc": {
"domeniu": "264",
"primul": "264400000",
"ultimul": "264409999",
"dimensiune": 10000
},
"observatie": "Operatorul e cel care a primit blocul la alocare. Dacă numărul a fost portat, deținătorul actual poate fi altul — ANCOM nu publică portabilitatea.",
"sursa": {
"ancom": "Resurse de numerotație",
"actualizat": "2026-10-02 11: 46: 30"
}
}
}
body: {"numar": "0312345678"} — valid format, unallocated block.
POSThttps://oneapi.ro/api/telecom/v1/analizeaza
{
"data": {
"valid": true,
"introdus": "0312345678",
"format": {
"e164": "+40312345678",
"national": "0312345678",
"fara_prefix": "312345678"
},
"tip": "fix",
"bloc_alocat": false,
"observatie": "Numărul are format valid, dar NU se află într-un bloc alocat de ANCOM. Cel mai probabil nu există — util ca semnal la validarea formularelor.",
"sursa": {
"ancom": "Resurse de numerotație",
"actualizat": "2026-10-02 11: 46: 30"
}
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | validare | numar is missing, empty or longer than 32 characters. The offending field is in detalii. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.
{
"eroare": {
"cod": "validare",
"mesaj": "numar is missing, empty or longer than 32 characters. The offending field is in detalii."
}
}