---
updatedAt: 2025-09-23T21:26:16.000Z
agentTools:
  projectIndex: https://developer.2hire.io/llms.txt
---

# Create a vehicle

Create a vehicle

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "version": "1.0.0",
    "title": "END TO END TEST",
    "description": "2HireAsAdapter E2E API lets you simulate a real-vehicle",
    "contact": {
      "name": "2hire",
      "email": "info@2hire.io",
      "url": "https://2hire.io"
    },
    "license": {
      "name": "License Name",
      "url": "http://example.com/license-url"
    }
  },
  "servers": [
    {
      "url": "https://e2e.adapter.2hire.io"
    }
  ],
  "tags": [
    {
      "name": "Vehicle Creation",
      "description": "Create one or more simulated vehicle"
    }
  ],
  "paths": {
    "/devices": {
      "post": {
        "tags": [
          "Vehicle Creation"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "summary": "Create a vehicle",
        "operationId": "createVehicle",
        "description": "Create a vehicle",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "connectivityProvider"
                ],
                "properties": {
                  "connectivityProvider": {
                    "type": "string",
                    "description": "Connectivity provider of device you want to create",
                    "default": "2HIRE_BOARD",
                    "enum": [
                      "2HIRE_BOARD",
                      "OMNI_NINEBOT"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessVehiclesResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "SuccessVehiclesResponse": {
        "description": "Success Vehicles Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessVehiclesResponse"
            },
            "examples": {
              "success response": {
                "summary": "Success Response",
                "value": {
                  "devices": [
                    {
                      "identifier": "316320103062607",
                      "qrCode": "MVQR_702783693039172"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InternalError"
            },
            "examples": {
              "Internal Error": {
                "value": {
                  "code": "INTERNAL_ERROR",
                  "details": {
                    "cause": "INTERNAL_ERROR"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      },
      "BadRequestError": {
        "description": "Bad Request Error Response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BadRequestError"
            },
            "examples": {
              "Bad Format": {
                "summary": "Bad Format Error",
                "value": {
                  "code": "BAD_REQUEST_ERROR",
                  "details": {
                    "cause": "BAD_FORMAT"
                  },
                  "errorId": "21127d29-1587-4cc7-92c6-d74b98497e56"
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "SuccessVehiclesResponse": {
        "type": "object",
        "properties": {
          "devices": {
            "type": "array",
            "description": "The list of the simulated devices",
            "items": {
              "type": "object",
              "properties": {
                "identifier": {
                  "type": "string"
                },
                "qrCode": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "InternalError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "INTERNAL_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "properties": {
              "cause": {
                "type": "string",
                "description": "Specific cause of the error",
                "enum": [
                  "INTERNAL_ERROR"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      },
      "BadRequestError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Code of the error",
            "enum": [
              "BAD_REQUEST_ERROR"
            ]
          },
          "details": {
            "type": "object",
            "properties": {
              "cause": {
                "type": "string",
                "description": "Specific cause of the error",
                "enum": [
                  "INVALID_UUID",
                  "INVALID_SIGNAL_NAME",
                  "BAD_FORMAT"
                ]
              }
            }
          },
          "errorId": {
            "type": "string",
            "description": "uuid generated in order to track logs"
          }
        }
      }
    }
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-enabled": true,
  "x-samples-languages": [
    "curl",
    "node",
    "ruby",
    "javascript",
    "python"
  ]
}
```