How to create a dedyn.io domain via API

Is there a documantation or a web site how to create a subdomain like
mydomain.dedyn.io

I have created an account - but if i want to create a domain, like “lkjsadiasudkjshadkjhsadkjhsad” for lkjsadiasudkjshadkjhsadkjhsad.dedyn.io

I call
echo ‘{“email”: “mymail”, “password”: “mypasswd”}’ | curl -X POST https://desec.io/api/v1/auth/login/ --header “Content-Type: application/json” --data @-
i get a token like: “token”:“YTxxxxxxxxxxxxxxxx”}

Then I call

echo ‘{“name”: “lkjsadiasudkjshadkjhsadkjhsad”}’ | curl -X POST https://desec.io/api/v1/domains/ --header “Authorization: Token YTxxxxxxxxxxxxxxxx” --header “Content-Type: application/json” --data @-

And I get for all subdomains I try:

{“name”:[“This domain name conflicts with an existing zone, or is disallowed by policy.”]}

There seem to be a trick - but I have no idea, what to change.

Probably threre is a webinterface with more error checking and a more usefull error output?

Hi halhalhal,

Thanks for your message, and welcome to deSEC! :slight_smile:

In the name field, you need to provide the full domain name, including .dedyn.io.

Stay secure,
Peter

!TANK YOU!

ok. That was unexpected for me, because I call desec.io in the url.

!TANK YOU!

The token from deSEC – Free Secure DNS
wont work.
new tokenfrom web interface
webtoken=“33c7a6aa…”
curl --user “lkjsadiasudkjshadkjhsadkjhsad:$webtoken” “https://update.dedyn.io/?myipv4=$myipv4&myipv6=$myipv6

Say: Invalid token.

Only the tokens from
echo ‘{“email”: “mymail”, “password”: “mypasswd”}’ | curl -X POST https://desec.io/api/v1/auth/login/ --header “Content-Type: application/json” --data @-
seems to do the job.

A saw a documentatio IP Update API — deSEC DNS API documentation with an example
curl “https://update6.dedyn.io/?hostname=?myipv4=1.2.3.4&myipv6=fd08::1234”
–header "Authorization: Token "
That wont work either.
I replaced term ?myipv4 must be replaced by &myipv4

And this now t least works. Hurray.

curl “https://update.dedyn.io/?hostname=&myipv4=1.2.3.4&myipv6=fd08::1234” --header "Authorization: Token "

An update with username and password without token would be nice :slight_smile:
Now I am fighting with the token api now to get the token scripted from the JSON autput on an IoT system without any json support.