Email a guest comment code
POST
/v1/data/{artifactId}/comments/_guest/code
const url = 'https://shareout.site/v1/data/example/comments/_guest/code';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","email":"hello@example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/data/example/comments/_guest/code \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "email": "hello@example.com" }'Emails a 6-digit code (valid 10 minutes) so a person with no account can comment as a guest. Only when guest comments are on and the requester can already open the page without an account (public, or a password page whose access cookie the request carries). Must come from a page on this instance (Origin). Limits: 10 per hour per IP, 6 per hour per address, 30 s between sends.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”artifactId
required
string
Artifact ID (e.g. art_abc123).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
email
required
string format: email
Examplegenerated
{ "name": "example", "email": "hello@example.com"}Responses
Section titled “Responses”{ success: true, data: { sent: true } }
VALIDATION_ERROR
GUEST_COMMENTS_DISABLED, or FORBIDDEN (Origin)
RATE_LIMIT_EXCEEDED
