Register with email and password
POST/register/
v2
POST
user-register
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X POST \
-d '{"email":"email@mittwald.example","password":"string","person":{"firstName":"Ada","lastName":"Lovelace","title":"mr"}}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/register
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.user.register({
"data": {
"email": "email@mittwald.example",
"password": "string",
"person": {
"firstName": "Ada",
"lastName": "Lovelace",
"title": "mr"
}
}
});
assertStatus(response, 201);
use \Mittwald\ApiClient\Generated\V2\Clients\User\Register\RegisterRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\User\Register\RegisterRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// RegisterRequestBody to learn how to construct a valid instance
$body = new RegisterRequestBody(/* TODO: ... */);
$request = (new RegisterRequest(
body: $body
));
$response = $client->user()->register($request);
var_dump($response->getBody();