Create a profile

Request

Creates a new profile in the environment.

Security
Bearer
Bodyrequired

Input data containing profile properties

namestring, non-emptyrequired

The profile name Example value: Basic Editing

Example:"Basic Editing"
valuestring, non-emptyrequired

The editor toolbar profile configuration Example value: {"toolbar":{"items":["bold","italic","emphasis","underline","blockQuote",{"label":"Formatting","icon":"text","items":["strikethrough","subscript","superscript","|","removeFormat"]},"fontColor","fontBackgroundColor","|","heading","|","alignment","bulletedList","numberedList","|","outdent","indent","|","link","internalLink","phoneLink","|",{"label":"Insert","withText":false,"icon":"plus","items":["sitecoreSelectMedia","insertTable","horizontalLine"]},"|","sourceEditing","|","sitecoreResetFieldValue"]}}

Example:"{\"toolbar\":{\"items\":[\"bold\",\"italic\",\"emphasis\",\"underline\",\"blockQuote\",{\"label\":\"Formatting\",\"icon\":\"text\",\"items\":[\"strik
import fetch from 'node-fetch';

async function run() {
  const resp = await fetch(
    `https://xmapps-api.sitecorecloud.io/api/ui/v1/editorprofiles`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: 'Bearer <YOUR_TOKEN_HERE>'
      },
      body: JSON.stringify({
        name: 'Basic Editing',
        value: '{"toolbar":{"items":["bold","italic","emphasis","underline","blockQuote",{"label":"Formatting","icon":"text","items":["strikethrough","subscript","superscript","|","removeFormat"]},"fontColor","fontBackgroundColor","|","heading","|","alignment","bulletedList","numberedList","|","outdent","indent","|","link","internalLink","phoneLink","|",{"label":"Insert","withText":false,"icon":"plus","items":["sitecoreSelectMedia","insertTable","horizontalLine"]},"|","sourceEditing","|","sitecoreResetFieldValue"]}}'
      })
    }
  );

  const data = await resp.json();
  console.log(data);
}

run();

Responses

Created

Bodyapplication/json
idstring or null

The identifier of the profile. Example value: 123e4567-e89b-12d3-a456-426614174000

Example:"123e4567-e89b-12d3-a456-426614174000"
namestring or null

The name of the profile. Example value: Basic Editing

Example:"Basic Editing"
profilestring or null

The tools configured for this profile. Example value: {"toolbar":{"items":["bold","italic","underline","link","bulletedList","numberedList"]}}

Example:"{\"toolbar\":{\"items\":[\"bold\",\"italic\",\"underline\",\"link\",\"bulletedList\",\"numberedList\"]}}"
Response
{ "id": "123e4567-e89b-12d3-a456-426614174000", "name": "Basic Editing", "profile": "{\"toolbar\":{\"items\":[\"bold\",\"italic\",\"underline\",\"link\",\"bulletedList\",\"numberedList\"]}}" }