cURL
curl -X PATCH https://api.neuraldraft.io/v1/categories/7 \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"name":"Wellness & Movement"}'await nd.categories.update(7, { name: "Wellness & Movement" });
requests.patch("https://api.neuraldraft.io/v1/categories/7",
headers={"Authorization": f"Bearer {key}"}, json={"name":"Wellness & Movement"})
<?php
$client->patch('categories/7', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['name' => 'Wellness & Movement'],
]);
{
"id": 7,
"name": "Wellness",
"slug": "wellness"
}{
"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://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}Blog
Update a category
PATCH
/
categories
/
{id}
cURL
curl -X PATCH https://api.neuraldraft.io/v1/categories/7 \
-H "Authorization: Bearer ndsk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"name":"Wellness & Movement"}'await nd.categories.update(7, { name: "Wellness & Movement" });
requests.patch("https://api.neuraldraft.io/v1/categories/7",
headers={"Authorization": f"Bearer {key}"}, json={"name":"Wellness & Movement"})
<?php
$client->patch('categories/7', [
'headers' => ['Authorization' => 'Bearer '.$key],
'json' => ['name' => 'Wellness & Movement'],
]);
{
"id": 7,
"name": "Wellness",
"slug": "wellness"
}{
"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://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}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.