Menu
Contact
The contact form.
| Operation | Method and path |
|---|---|
| Send the contact form | POST /contact/submit |
| Confirm the contact form's code | POST /contact/verify-email/confirm |
| Start the contact form: mail a code to the sender | POST /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.
| Credential | none: anyone may call it (x-weird-auth: public) |
| Charged | no |
Request body (ContactSubmit):
verified_token, string, requiredname, string, requiredtitle, stringservice, string (one ofdomains,consultancy,spatial,general)message, string, requiredwebsite, string
Answer 200 (ContactAnswer): the result
token, string (password) (a secret: shown once, never logged)verified_token, stringemail, stringok, boolean
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (a field is wrong: field names it) |
| 401 | verification-expired | verification-expired (verify the address again) |
| 429 | rate-limited | rate-limited |
| 502 | upstream-unavailable | upstream-unavailable (try again later) |
| 503 | unavailable | unavailable (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.
| Credential | none: anyone may call it (x-weird-auth: public) |
| Charged | no |
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, stringemail, stringok, boolean
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (a field is wrong: field names it) |
| 401 | session-expired | session-expired (start again) |
| 403 | ip-mismatch | ip-mismatch (confirm from the network the start came from) |
| 422 | invalid-code | invalid-code (a wrong code: check it and retry; a few wrong codes end the flow) |
| 429 | rate-limited | rate-limited |
| 502 | upstream-unavailable | upstream-unavailable (try again later) |
| 503 | unavailable | unavailable (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.
| Credential | none: anyone may call it (x-weird-auth: public) |
| Charged | no |
Request body (ContactStart):
email, string, requiredwebsite, string — leave empty
Answer 200 (ContactAnswer): the result
token, string (password) (a secret: shown once, never logged)verified_token, stringemail, stringok, boolean
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (a field is wrong: field names it) |
| 429 | rate-limited | rate-limited |
| 502 | send-failed, upstream-unavailable | send-failed (the code could not be emailed: check the address) or upstream-unavailable (try again later) |
| 503 | unavailable | unavailable (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.