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

# Check Route Validity (Path)

> Returns a JSON object describing whether the route announcement given by its origin AS Number and address prefix is RPKI valid, invalid, or not found. A complete list of VRPs that caused the result is included.

Returns whether a route announcement is RPKI valid, invalid, or not found. Includes complete list of VRPs that caused the result.

**Use Cases:**

* Validate BGP route announcements
* Check specific prefix origin authorization
* Verify route legitimacy before accepting
* Detect potential BGP hijacking


## OpenAPI

````yaml GET /validity/{asNumber}/{prefix}
openapi: 3.0.3
info:
  title: Routinator HTTP API
  description: >-
    HTTP API for Routinator - RPKI validation and Route Origin Authorization
    (ROA) service. Provides endpoints for checking route validity, monitoring
    RPKI infrastructure, and receiving real-time updates.
  version: 0.15.0
  contact:
    name: Routinator Support
    url: https://github.com/NLnetLabs/routinator
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
servers:
  - url: https://api.hixbe.com/rpki
    description: Production server
security: []
tags:
  - name: Validity
    description: Route validity checking endpoints
  - name: Status
    description: Service status and monitoring
  - name: Delta
    description: Incremental updates and notifications
  - name: Monitoring
    description: Logging and metrics endpoints
paths:
  /validity/{asNumber}/{prefix}:
    get:
      tags:
        - Validity
      summary: Check validity of a specific route
      description: >-
        Returns a JSON object describing whether the route announcement given by
        its origin AS Number and address prefix is RPKI valid, invalid, or not
        found. A complete list of VRPs that caused the result is included.
      operationId: getValidityByPath
      parameters:
        - name: asNumber
          in: path
          description: >-
            Autonomous System Number (can be in format 'AS64496' or just
            '64496')
          required: true
          schema:
            type: string
            pattern: ^(AS)?[0-9]+$
            example: AS64496
        - name: prefix
          in: path
          description: IP prefix in CIDR notation (e.g., 192.0.2.0/24 or 2001:db8::/32)
          required: true
          schema:
            type: string
            example: 192.0.2.0/24
      responses:
        '200':
          description: Successful response with validity information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidityResponse'
        '400':
          description: Invalid AS number or prefix format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ValidityResponse:
      type: object
      required:
        - validated_route
      properties:
        validated_route:
          $ref: '#/components/schemas/ValidatedRoute'
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
    ValidatedRoute:
      type: object
      required:
        - route
        - validity
      properties:
        route:
          $ref: '#/components/schemas/Route'
        validity:
          $ref: '#/components/schemas/Validity'
        vrps:
          type: object
          description: VRPs (Validated ROA Payloads) that determined the validity
          properties:
            matched:
              type: array
              items:
                $ref: '#/components/schemas/VRP'
            unmatched_as:
              type: array
              items:
                $ref: '#/components/schemas/VRP'
            unmatched_length:
              type: array
              items:
                $ref: '#/components/schemas/VRP'
    Route:
      type: object
      required:
        - origin_asn
        - prefix
      properties:
        origin_asn:
          type: string
          pattern: ^AS[0-9]+$
          example: AS64496
        prefix:
          type: string
          example: 192.0.2.0/24
    Validity:
      type: object
      required:
        - state
      properties:
        state:
          type: string
          enum:
            - valid
            - invalid
            - not-found
          description: RPKI validation state
        reason:
          type: string
          description: Additional information about the validity state
        description:
          type: string
          description: Human-readable description of the validation result
    VRP:
      type: object
      description: Validated ROA Payload
      properties:
        asn:
          type: string
          pattern: ^AS[0-9]+$
          example: AS64496
        prefix:
          type: string
          example: 192.0.2.0/24
        max_length:
          type: integer
          minimum: 0
          maximum: 128
          example: 24

````

## Related topics

- [Check Route Validity (Query)](https://docs.xerobi.com/rpki-api/endpoint/check-validity-query.md)
- [RPKI API](https://docs.xerobi.com/rpki-api/introduction.md)
- [Validate Multiple Routes](https://docs.xerobi.com/rpki-api/endpoint/validate-routes.md)
- [Certification API FAQ](https://docs.xerobi.com/faq-guides/certification-api-faq.md)
- [Xerobi Developer Documentation](https://docs.xerobi.com/index.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.