---
title: "Create a new car"
method: POST
path: "/cars"
tags: ["Cars"]
---

# Create a new car

`POST /cars`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/rocketseat-education/apis/rentx-documentation/docs/cars/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new car

## Request body

- Car (unresolved $ref)

## Response `201`

Created

## Other responses

- `400`: Car already exists!

---

[API](https://skmtc.dev/rocketseat-education/apis/rentx-documentation.md) - [All operations](https://skmtc.dev/rocketseat-education/apis/rentx-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/rocketseat-education/apis/rentx-documentation/revisions/a4cef5570f71?raw)
