curl --request POST \
--url https://api.neuraldraft.io/v1/newsletters/subscribe \
--header 'Content-Type: application/json' \
--data '
{
"email": "jane@example.com"
}
'{
"data": {
"id": 42,
"email": "jane@example.com",
"app_lead": false,
"status": "subscribed",
"subscribed_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": 42,
"email": "jane@example.com",
"app_lead": false,
"status": "subscribed",
"subscribed_at": "2023-11-07T05:31:56Z"
}
}{
"type": "https://api.neuraldraft.io/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "This API key does not have the `commerce:write` scope.",
"code": "forbidden",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}{
"type": "https://api.neuraldraft.io/errors/rate_limited",
"title": "Too many requests",
"status": 429,
"detail": "Rate limit exceeded. Retry in 12 seconds.",
"code": "rate_limited",
"instance": "req_2Nh4PqRsTuVw"
}Forms
Subscribe to a project newsletter
Public endpoint — no API key required when called from a browser
embed. The project is resolved via the
X-NeuralDraft-Project-Key header (recommended for server-side calls)
or ?project_id=<id> query param (browser embeds where you can’t
ship a secret key). Idempotent — re-submitting an existing email
returns 200 with status="already_subscribed" rather than an error.
Free; no credits charged.
POST
/
newsletters
/
subscribe
curl --request POST \
--url https://api.neuraldraft.io/v1/newsletters/subscribe \
--header 'Content-Type: application/json' \
--data '
{
"email": "jane@example.com"
}
'{
"data": {
"id": 42,
"email": "jane@example.com",
"app_lead": false,
"status": "subscribed",
"subscribed_at": "2023-11-07T05:31:56Z"
}
}{
"data": {
"id": 42,
"email": "jane@example.com",
"app_lead": false,
"status": "subscribed",
"subscribed_at": "2023-11-07T05:31:56Z"
}
}{
"type": "https://api.neuraldraft.io/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "This API key does not have the `commerce:write` scope.",
"code": "forbidden",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/validation_failed",
"title": "Validation failed",
"status": 422,
"detail": "One or more fields failed validation.",
"code": "validation_failed",
"instance": "req_2Nh4PqRsTuVw",
"errors": {
"customer_email": [
"The customer email field must be a valid email address."
],
"starts_at": [
"The starts at field must be a date after now."
]
}
}{
"type": "https://api.neuraldraft.io/errors/rate_limited",
"title": "Too many requests",
"status": 429,
"detail": "Rate limit exceeded. Retry in 12 seconds.",
"code": "rate_limited",
"instance": "req_2Nh4PqRsTuVw"
}Headers
Project API key (alternative to query param).
Query Parameters
Project ID for unauthenticated browser embeds.
Body
application/json
Response
Email already subscribed (idempotent).
Show child attributes
Show child attributes