Create a File
POST/files/
v2
POST
file-create-file
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X POST \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/files
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.file.createFile({});
assertStatus(response, 201);
use \Mittwald\ApiClient\Generated\V2\Clients\File\CreateFile\CreateFileRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new CreateFileRequest());
$response = $client->file()->createFile($request);
var_dump($response->getBody();