Menu

Contact

The contact form.

OperationMethod and path
Send the contact formPOST /contact/submit
Confirm the contact form's codePOST /contact/verify-email/confirm
Start the contact form: mail a code to the senderPOST /contact/verify-email/start

Send the contact form#

POST /contact/submit · operation contactSubmit

verified_token, name (1..120 characters), title, service (domains, consultancy, spatial or general), message (10..5000 characters) and website (left empty). The reply goes to the verified address; an email field is refused. Once the address belongs to an account, the conversation appears among that account's support tickets. This call is not charged.

Credentialnone: anyone may call it (x-weird-auth: public)
Chargedno

Request body (ContactSubmit):

  • verified_token, string, required
  • name, string, required
  • title, string
  • service, string (one of domains, consultancy, spatial, general)
  • message, string, required
  • website, string

Answer 200 (ContactAnswer): the result

  • token, string (password) (a secret: shown once, never logged)
  • verified_token, string
  • email, string
  • ok, boolean

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401verification-expiredverification-expired (verify the address again)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X POST 'https://api.weird.ro/contact/submit' \
  -H "Content-Type: application/json" \
  -d '{"verified_token":"<verified_token>","name":"<name>","message":"<message>"}'

Confirm the contact form's code#

POST /contact/verify-email/confirm · operation contactVerifyConfirm

token and code, sent from the same network as the start. Answers verified_token and email. This call is not charged.

Credentialnone: anyone may call it (x-weird-auth: public)
Chargedno

Request body (ContactConfirm):

  • token, string (password), required (a secret: shown once, never logged)
  • code, string, required

Answer 200 (ContactAnswer): the result

  • token, string (password) (a secret: shown once, never logged)
  • verified_token, string
  • email, string
  • ok, boolean

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
401session-expiredsession-expired (start again)
403ip-mismatchip-mismatch (confirm from the network the start came from)
422invalid-codeinvalid-code (a wrong code: check it and retry; a few wrong codes end the flow)
429rate-limitedrate-limited
502upstream-unavailableupstream-unavailable (try again later)
503unavailableunavailable (try again later)

Example

curl -X POST 'https://api.weird.ro/contact/verify-email/confirm' \
  -H "Content-Type: application/json" \
  -d '{"token":"<token>","code":"<code>"}'

Start the contact form: mail a code to the sender#

POST /contact/verify-email/start · operation contactVerifyStart

email, and website, which must be left empty. A six-digit code is emailed; the answer's token goes with it to the confirm. Starts are limited per client and per address (429 rate-limited). No account needed. This call is not charged.

Credentialnone: anyone may call it (x-weird-auth: public)
Chargedno

Request body (ContactStart):

  • email, string, required
  • website, string — leave empty

Answer 200 (ContactAnswer): the result

  • token, string (password) (a secret: shown once, never logged)
  • verified_token, string
  • email, string
  • ok, boolean

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (a field is wrong: field names it)
429rate-limitedrate-limited
502send-failed, upstream-unavailablesend-failed (the code could not be emailed: check the address) or upstream-unavailable (try again later)
503unavailableunavailable (the contact form is not available now)

Example

curl -X POST 'https://api.weird.ro/contact/verify-email/start' \
  -H "Content-Type: application/json" \
  -d '{"email":"<email>"}'

This page is generated from the API's public document; it changes when the document does.