# Look a number up

`POST /lookup/numbers` · Rivier · voice

Look a number up: validity and country are free; line type, carrier, caller name, reachability, SIM swap and pumping risk ask the carrier and use the plan's lookups allowance. Recent answers are reused (cached: true) and cost nothing.

- Scope: voice:write
- Mcp: rivier_lookup_number
- Graphql: Mutation.voiceLookupNumberCreate
- Sdk: lookup.number
- Cli: lookup number

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "number": {
      "type": "string",
      "minLength": 3,
      "maxLength": 40,
      "description": "A phone number in E.164, or national with countryCode"
    },
    "countryCode": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$"
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "validation",
          "line_type_intelligence",
          "caller_name",
          "line_status",
          "sim_swap",
          "call_forwarding",
          "sms_pumping_risk"
        ]
      },
      "maxItems": 8,
      "description": "What to find out. validation is free; the rest asks the carrier and uses the lookups allowance"
    },
    "fresh": {
      "type": "boolean",
      "description": "Ask the carrier again instead of reusing a recent answer"
    }
  },
  "required": [
    "number"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/lookup/numbers' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "number": "string"
}'
```
