Create and update custom labels using Tooling API


To be able to create custom label along with translation programmatically.


We can use tooling API to create the custom label and its translation as below.

The Master label is stored in External String and translation is stored in ExternalStringLocalization

Request to create master label:




  "Name" : "API_Name_Of_Label",
  "MasterLabel" : "Label of Custom Label",
  "Value" : "Hi, how are you?",
  "IsProtected" : true,
  "Category" : null,
  "Language" : "en_US"


  "id" : "1012v00000NNo06AAD",
  "success" : true,
  "errors" : [ ],
  "warnings" : [ ],
  "infos" : [ ]

We can grab the Id of Master Label and create translation by creating a record in ExternalStringLocalization. Payload would be like this:

  "ExternalStringId" : "1012v00000NNo06AAD",
  "Value" : "Salut comment ├ža va?",
  "Language" : "fr"

P.S: I came across the requirement to create label using API and did this POC using Workbench and thought to share this.