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

# Create Route

> Creates a new route for a site.

export const ReadinessBadge = ({type}) => {
  const validTags = ["beta", "alpha", "experimental"];
  const tagText = type?.trim().toLowerCase();
  if (!tagText || !validTags.includes(tagText)) return null;
  useEffect(() => {
    const titleElement = document.querySelector("#page-title, .page-title, h1");
    if (!titleElement) return;
    if (titleElement.querySelector(".badge")) return;
    const badge = document.createElement("span");
    badge.className = `badge ${tagText}-badge`;
    badge.textContent = tagText;
    badge.style.transform = "translateY(-3px)";
    titleElement.appendChild(badge);
  }, []);
  return null;
};

<ReadinessBadge type="beta" />


## OpenAPI

````yaml POST /v2/routes
openapi: 3.1.0
info:
  title: Makeswift API
  description: Documentation for the Makeswift public REST API.
  version: '1.0'
servers:
  - url: https://api.makeswift.com
    description: Production server
security:
  - Authentication: []
tags:
  - name: Authentication
    description: ''
  - name: Workspace
    description: ''
  - name: Workspace Member
    description: ''
  - name: Site
    description: ''
  - name: Locale
    description: ''
  - name: Route
    description: ''
  - name: Page
    description: ''
  - name: Webhook Management
    description: ''
paths:
  /v2/routes:
    post:
      tags:
        - Route
      summary: Create Route
      description: Creates a new route for a site.
      operationId: SiteRouteController_createV2_v2
      parameters:
        - name: skipValidation
          in: query
          description: >-
            The flag that determines whether to skip route validation. Useful
            when an external system has a different way of validating routes
            than Makeswift.
          required: false
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSiteRouteV2RequestBodyDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSiteRouteV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponseDto'
components:
  schemas:
    CreateSiteRouteV2RequestBodyDto:
      description: The request body for creating a new route.
      type: object
      properties:
        siteId:
          description: The site ID to create the route for.
          type: string
          format: uuid
        pathname:
          description: The route pathname.
          type: string
          example: /furniture
      required:
        - siteId
        - pathname
    CreateSiteRouteV2ResponseBodyDto:
      description: The route.
      type: object
      properties:
        object:
          type: string
          enum:
            - route
        id:
          description: The ID of the route.
          type: string
          format: uuid
        pathname:
          description: The route pathname.
          type: string
          example: /furniture
      example:
        object: route
        id: 37b18c41-9752-4adf-9aef-f42ab4f74b04
        pathname: /furniture
      required:
        - object
        - id
        - pathname
    BadRequestResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - bad_request
        message:
          type: string
      required:
        - object
        - code
        - message
    ForbiddenResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - forbidden
        message:
          type: string
      required:
        - object
        - code
        - message
    ConflictResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - conflict
        message:
          type: string
      required:
        - object
        - code
        - message
  securitySchemes:
    Authentication:
      type: apiKey
      in: header
      name: x-api-key
      description: |-
        API key authentication. Accepts either:
        - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)
        - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)

````