cURL
curl -X PUT "https://api.neuraldraft.io/v1/content/hero.headline" \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"lang":"en","value":"Welcome to Lakeside Yoga"}'await nd.content.set("hero.headline", { lang: "en", value: "Welcome to Lakeside Yoga" });
requests.put(
"https://api.neuraldraft.io/v1/content/hero.headline",
headers={"Authorization": f"Bearer {key}"},
json={"lang": "en", "value": "Welcome to Lakeside Yoga"},
)
<?php
$client->put('content/hero.headline', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['lang' => 'en', 'value' => 'Welcome to Lakeside Yoga'],
]);
{
"key": "hero.headline",
"value": "Find your calm, one breath at a time",
"lang": "en",
"all_locales": {
"en": "Find your calm, one breath at a time",
"fr": "Trouvez votre calme, une respiration à la fois"
}
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://neuraldraft.com/errors/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "This project has no credits remaining for the current period.",
"code": "insufficient_credits",
"cost": 1,
"balance": 0,
"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."
]
}
}Content
Set a content value
Upserts the value for a key in a specific language. If the key does
not exist, it is created. If lang is omitted, the project’s default
language is used.
Costs 1 credit per successful upsert (content_update).
Fires a content.changed webhook event to subscribers.
PUT
/
content
/
{key}
cURL
curl -X PUT "https://api.neuraldraft.io/v1/content/hero.headline" \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"lang":"en","value":"Welcome to Lakeside Yoga"}'await nd.content.set("hero.headline", { lang: "en", value: "Welcome to Lakeside Yoga" });
requests.put(
"https://api.neuraldraft.io/v1/content/hero.headline",
headers={"Authorization": f"Bearer {key}"},
json={"lang": "en", "value": "Welcome to Lakeside Yoga"},
)
<?php
$client->put('content/hero.headline', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['lang' => 'en', 'value' => 'Welcome to Lakeside Yoga'],
]);
{
"key": "hero.headline",
"value": "Find your calm, one breath at a time",
"lang": "en",
"all_locales": {
"en": "Find your calm, one breath at a time",
"fr": "Trouvez votre calme, une respiration à la fois"
}
}{
"type": "https://api.neuraldraft.io/errors/bad_request",
"title": "Bad request",
"status": 400,
"detail": "Request body could not be parsed.",
"code": "bad_request",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://neuraldraft.com/errors/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "This project has no credits remaining for the current period.",
"code": "insufficient_credits",
"cost": 1,
"balance": 0,
"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."
]
}
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Path Parameters
Translation key in dot.notation.
Example:
"hero.headline"
Body
application/json
Response
Updated value.