Update an Idea
https://mapi.storyblok.com/v1/spaces/:space_id/ideas/:idea_idUpdate an idea using its UUID.
Path parameters
Section titled “Path parameters”:space_idrequired numberNumeric ID of a space.
:idea_uuidrequired stringUUID of the idea.
Request body properties
Section titled “Request body properties”ideaobjectA single idea object.
Show child properties
namestringName of the idea.
descriptionstringDescription of the idea.
contentobjectContent of the idea as a JSON object.
statusstringStatus of the idea.
is_privatebooleanWhether the idea is private.
story_idsinteger[]List of story IDs to link to the idea.
internal_tag_idsinteger[]List of internal tag IDs to assign to the idea.
assignee_idintegerNumeric user ID of the collaborator to assign to the idea. To retrieve a user’s ID, use the retrieve multiple collaborators endpoint.
bookmarksobject[]Bookmark URLs linked to the idea.
Show child properties
_uidstringUUID of the bookmark.
linkstringURL of the bookmark.
labelstringDisplay name of the bookmark.
Response properties
Section titled “Response properties”ideaobjectA single idea object.
Show child properties
idstringUUID of the idea.
namestringName of the idea.
descriptionstringDescription of the idea.
contentobjectContent of the idea as a JSON object.
statusstringStatus of the idea.
is_privatebooleanWhether the idea is private.
story_idsinteger[]List of linked story IDs.
internal_tag_idsinteger[]List of internal tag IDs assigned to the idea.
internal_tags_listobject[]List of internal tag objects assigned to the idea.
Show child properties
idintegerNumeric ID of the tag.
namestringName of the tag.
bookmarksobject[]Bookmark URLs linked to the idea.
Show child properties
_uidstringUUID of the bookmark.
linkstringURL of the bookmark.
labelstringDisplay name of the bookmark.
created_atstringCreation timestamp.
updated_atstringLast update timestamp.
deleted_atstringDeletion timestamp, or
nullif the idea has not been deleted.authorobjectCollaborator who created the idea.
Show child properties
idintegerNumeric ID of the collaborator.
useridstringUser ID of the collaborator.
friendly_namestringFriendly name of the collaborator.
avatarstringAvatar URL of the collaborator.
assigneeobjectCollaborator assigned to the idea, or
nullif unassigned. Set viaassignee_idin the request body.Show child properties
idintegerNumeric ID of the collaborator.
useridstringUser ID of the collaborator.
friendly_namestringFriendly name of the collaborator.
avatarstringAvatar URL of the collaborator.
storiesobject[]Stories linked to the idea via
story_ids.Show child properties
idintegerNumeric ID of the story.
namestringName of the story.
full_slugstringFull slug of the story.
Examples
Section titled “Examples”curl "https://mapi.storyblok.com/v1/spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n" \ -X PUT \ -H "Authorization: YOUR_PERSONAL_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d "{\"idea\":{\"assignee_id\":null,\"bookmarks\":[],\"content\":{},\"description\":\"First idea\",\"internal_tag_ids\":[12345],\"is_private\":true,\"name\":\"My first idea\",\"status\":\"draft\",\"story_ids\":[]}}"// storyblok-js-client@>=7, node@>=18import Storyblok from "storyblok-js-client";
const storyblok = new Storyblok({ oauthToken: "YOUR_PERSONAL_ACCESS_TOKEN",});
try { const response = await storyblok.put('spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n', { "idea": { "assignee_id": null, "bookmarks": [], "content": {}, "description": "First idea", "internal_tag_ids": [ 12345 ], "is_private": true, "name": "My first idea", "status": "draft", "story_ids": [] } }) console.log({ response })} catch (error) { console.log(error)}$client = new \Storyblok\ManagementClient('YOUR_PERSONAL_ACCESS_TOKEN');
$payload = ["idea" => ["assignee_id" => null,"bookmarks" => [],"content" => [],"description" => "First idea","internal_tag_ids" => [12345],"is_private" => true,"name" => "My first idea","status" => "draft","story_ids" => []]];
$client->put('spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n', $payload)->getBody();HttpResponse<String> response = Unirest.put("https://mapi.storyblok.com/v1/spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n") .header("Content-Type", "application/json") .header("Authorization", "YOUR_PERSONAL_ACCESS_TOKEN") .body({"idea":{"assignee_id":null,"bookmarks":[],"content":{},"description":"First idea","internal_tag_ids":[12345],"is_private":true,"name":"My first idea","status":"draft","story_ids":[]}}) .asString();var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n");var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");request.AddHeader("Authorization", "YOUR_PERSONAL_ACCESS_TOKEN");request.AddParameter("application/json", "{\"idea\":{\"assignee_id\":null,\"bookmarks\":[],\"content\":{},\"description\":\"First idea\",\"internal_tag_ids\":[12345],\"is_private\":true,\"name\":\"My first idea\",\"status\":\"draft\",\"story_ids\":[]}}", ParameterType.RequestBody);IRestResponse response = client.Execute(request);import requests
url = "https://mapi.storyblok.com/v1/spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n"
querystring = {}
payload = {"idea":{"assignee_id":null,"bookmarks":[],"content":{},"description":"First idea","internal_tag_ids":[12345],"is_private":true,"name":"My first idea","status":"draft","story_ids":[]}}headers = { 'Content-Type': "application/json", 'Authorization': "YOUR_PERSONAL_ACCESS_TOKEN"}
response = requests.request("PUT", url, data=payload, headers=headers, params=querystring)
print(response.text)require 'storyblok'client = Storyblok::Client.new(oauth_token: 'YOUR_PERSONAL_ACCESS_TOKEN')
payload = {"idea" => {"assignee_id" => null,"bookmarks" => [],"content" => {},"description" => "First idea","internal_tag_ids" => [12345],"is_private" => true,"name" => "My first idea","status" => "draft","story_ids" => []}}
client.put('spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n', payload)let storyblok = URLSession(storyblok: .mapi(accessToken: .personal("YOUR_PERSONAL_ACCESS_TOKEN")))var request = URLRequest(storyblok: storyblok, path: "spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n")request.httpMethod = "PUT"request.httpBody = try JSONSerialization.data(withJSONObject: [ "idea": [ "assignee_id": nil, "bookmarks": [ ], "content": [ ], "description": "First idea", "internal_tag_ids": [ 12345, ], "is_private": true, "name": "My first idea", "status": "draft", "story_ids": [ ], ],])let (data, _) = try await storyblok.data(for: request)print(try JSONSerialization.jsonObject(with: data))val client = HttpClient { install(Storyblok(MAPI)) { accessToken = Personal("YOUR_PERSONAL_ACCESS_TOKEN") }}
val response = client.put("spaces/288868932106293/ideas/ab123cd4-5e6f-7gh8-9ij1-01k112l13m1n") { setBody(buildJsonObject { putJsonObject("idea") { put("assignee_id", null) putJsonArray("bookmarks") { } putJsonObject("content") { } put("description", "First idea") putJsonArray("internal_tag_ids") { add(12345) } put("is_private", true) put("name", "My first idea") put("status", "draft") putJsonArray("story_ids") { } } })}
println(response.body<JsonElement>())Was this page helpful?
This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window).Terms of Service (opens in a new window) apply.
Get in touch with the Storyblok community