Skip to main content

Create an auth code for a Domains transfer-out process

POST/v2/domains/{domainId}/actions/auth-code
API version
v2
Request method
POST
Operation ID
domain-create-domain-auth-code

Request​

  • domainIdstringrequired

Responses​

Format
application/json
Description

Created

  • authCodestringrequired
  • expirationDatestring (date-time)
Content-Type: application/json

{
"authCode": "string",
"expirationDate": "1985-10-26T01:21:00.000Z"
}
{
"properties": {
"authCode": {
"type": "string"
},
"expirationDate": {
"format": "date-time",
"type": "string"
}
},
"required": [
"authCode"
],
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-X POST \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/domains/string/actions/auth-code
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.domain.createDomainAuthCode({
"domainId": "string"
});

assertStatus(response, 201);

use \Mittwald\ApiClient\Generated\V2\Clients\Domain\CreateDomainAuthCode\CreateDomainAuthCodeRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new CreateDomainAuthCodeRequest(
domainId: "string"
));
$response = $client->domain()->createDomainAuthCode($request);

var_dump($response->getBody();

On this page