---
description: Resolve prefix validation errors during BYOIP onboarding.
title: Troubleshoot prefix validation
image: https://developers.cloudflare.com/og-docs.png
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/byoip/llms.txt  
> Use this file to discover all available pages before exploring further.

# Troubleshoot prefix validation

Last updated Apr 16, 2026|Copy as Markdown|[View as Markdown](https://developers.cloudflare.com/byoip/troubleshooting/prefix-validation/index.md)|[Agent setup](https://developers.cloudflare.com/agent-setup/)

1. Use the [Prefix Details endpoint](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/methods/get/) to check if any issues were found during validation.  
Required API token permissions  
At least one of the following [token permissions](https://developers.cloudflare.com/fundamentals/api/reference/permissions/) is required:
  * `Magic Transit Read`
  * `Magic Transit Write`
  * `IP Prefixes: Write`
  * `IP Prefixes: Read`
  * `IP Prefixes: BGP On Demand Write`
  * `IP Prefixes: BGP On Demand Read`  
```bash  
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/addressing/prefixes/$PREFIX_ID" \
	--request GET \
	--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
	--header "X-Auth-Key: $CLOUDFLARE_API_KEY"  
```  
```json  
 "result": {  
    "id": "72823e95d6c64d48a8111fec81179816",  
    "created_at": "2025-02-25T00:34:11.423722Z",  
    "modified_at": "2025-02-25T00:34:11.423722Z",  
    "cidr": "203.0.113.0/24",  
    "account_id": "654c5f71c324478cc9f68d60065d4620",  
    "description": "",  
    "approved": "P",  
    "on_demand_enabled": false,  
    "on_demand_locked": false,  
    "advertised": null,  
    "advertised_modified_at": null,  
    "loa_document_id": "b9ff4afe312246a8b2e7324d98f40b23",  
    "asn": 13335,  
    "ownership_validation_token": "<OWNERSHIP_VALIDATION_TOKEN>",  
    "delegate_loa_creation" : true,  
    "irr_validation_state": "valid",  
    "rpki_validation_state": "valid",  
    "ownership_validation_state": "missing",  
  }  
```
2. Consider the states returned in the API response (for example, `missing`, `invalid`, `mismatch_asn`) and review your IRR record, ROA, and ownership validation method accordingly.

  * Information in the IRR and ROA records should meet the [onboarding prerequisites](https://developers.cloudflare.com/byoip/get-started/#before-you-begin).
  * [Ownership validation](https://developers.cloudflare.com/byoip/get-started/#validate-prefix-ownership) requires a matching ROA and the correct validation token found in all DNS TXT records or in the IRR record.
3. After applying the necessary changes, use the Validate Prefix endpoint to trigger the validation checks.  
Required API token permissions  
At least one of the following [token permissions](https://developers.cloudflare.com/fundamentals/api/reference/permissions/) is required:
  * `Magic Transit Write`
  * `IP Prefixes: Write`  
```bash  
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/addressing/prefixes/$PREFIX_ID/validate" \
	--request POST \
	--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
	--header "X-Auth-Key: $CLOUDFLARE_API_KEY"  
```

Was this helpful?

YesNo

## On this page

[![](https://developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/byoip/troubleshooting/prefix-validation/#page","headline":"Troubleshoot prefix validation · Cloudflare BYOIP docs","description":"Resolve prefix validation errors during BYOIP onboarding.","url":"https://developers.cloudflare.com/byoip/troubleshooting/prefix-validation/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
