---
title: "Import Airfoil"
method: POST
path: "/v1/airfoils/import"
tags: ["v1", "airfoils"]
---

# Import Airfoil

`POST /v1/airfoils/import`

## Request

- Base URL: `https://thrustlab.com`
- URL: `https://thrustlab.com/v1/airfoils/import`
- Auth: HTTP bearer

Import a Selig or Lednicer ``.dat`` as a user-owned custom airfoil.

multipart/form-data: ``file`` (the ``.dat``) + ``name`` (display name).

Pipeline: byte-cap (DoS bound, BEFORE parse) -> auto-detect & Kulfan-fit
(``airfoils_service.fit_dat``) -> persist a ``CustomAirfoil`` scoped to the
caller -> 201 with the ``afl_`` id.

Errors:
* Oversized upload -> 400 ``dat_too_large`` (bound BEFORE parse).
* Unparseable bytes -> 400 ``invalid_dat``.
* Unfittable section -> 422 ``airfoil_fit_failed``.

## Response `201`

Successful Response

- AirfoilResource
  - `camber` number, nullable
  - `family` string, nullable
  - `id` string, required
  - `max_thickness` number, nullable
  - `name` string, required
  - `object` string
  - `source` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thrustlab/apis/thrustlab-api.md) · [All operations](https://skmtc.dev/thrustlab/apis/thrustlab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thrustlab/apis/thrustlab-api/revisions/c19717e52529?raw)
