> ## 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.

# Validate Multiple Routes

> Returns a JSON object describing the validity of multiple routes. Expects a JSON body with an array of route announcements. The request body size is limited to 100 kB.

Validates multiple route announcements in a single request. Accepts JSON body with array of routes (limited to 100 kB).

**Use Cases:**

* Bulk route validation
* BGP table validation
* Batch processing
* Efficient multi-route checks


## OpenAPI

````yaml POST /validity
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:
    post:
      tags:
        - Validity
      summary: Validate multiple routes
      description: >-
        Returns a JSON object describing the validity of multiple routes.
        Expects a JSON body with an array of route announcements. The request
        body size is limited to 100 kB.
      operationId: validateRoutes
      requestBody:
        description: Array of routes to validate
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateRequest'
            example:
              routes:
                - asn: AS64496
                  prefix: 192.0.2.0/24
                - asn: AS64497
                  prefix: 2001:db8::/32
      responses:
        '200':
          description: Successful response with validation results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateResponse'
        '400':
          description: Invalid request body or body too large (>100 kB)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request body exceeds 100 kB limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Content-Type must be application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ValidateRequest:
      type: object
      required:
        - routes
      properties:
        routes:
          type: array
          items:
            $ref: '#/components/schemas/RouteInput'
          maxItems: 1000
          description: Array of routes to validate (limited by 100 kB body size)
    ValidateResponse:
      type: object
      required:
        - validated_routes
      properties:
        validated_routes:
          type: array
          items:
            $ref: '#/components/schemas/ValidatedRoute'
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
    RouteInput:
      type: object
      required:
        - asn
        - prefix
      properties:
        asn:
          type: string
          pattern: ^(AS)?[0-9]+$
          example: AS64496
        prefix:
          type: string
          example: 192.0.2.0/24
    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

- [RPKI API](https://docs.xerobi.com/rpki-api/introduction.md)
- [Check Route Validity (Path)](https://docs.xerobi.com/rpki-api/endpoint/check-validity-path.md)
- [Xerobi Developer Documentation](https://docs.xerobi.com/index.md)
- [Changelog](https://docs.xerobi.com/changelog.md)
- [Check Route Validity (Query)](https://docs.xerobi.com/rpki-api/endpoint/check-validity-query.md)


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