How to create and update Custom Label using tooling API? Is it possible to do it without deployment? Dont want to create and update via Metadata API.

2 Answers 2


The Tooling API does not have a documented CustomLabel object you can interact with. The list of supported objects are listed in Tooling API Objects.

On version 42.0, there's two objects that represent labels, CustomLabel and ExternalString. However, attempting to insert, update, or delete labels results in the following error:

[ {
  "message" : "entity type cannot be inserted: Custom Label",
  "fields" : [ ]
} ]
  • You can query custom labels using tooling API. Are u sure?
    – Arteezy
    Commented Apr 26, 2018 at 19:40
  • @SouravNandy It's not in the documentation or the describe call. Are you sure you're not mistaking the Tooling API with the Metadata API?
    – sfdcfox
    Commented Apr 26, 2018 at 19:44
  • Select id,Name from CustomLabel If i run this in query editor with Using tooling API checkbox it is giving me the values.
    – Arteezy
    Commented Apr 26, 2018 at 21:27
  • @SouravNandy Okay, so it's new in v42, but it's not documented, and DML operations are restricted.
    – sfdcfox
    Commented Apr 26, 2018 at 21:39
  • yea same result i also got.. just wanted to confirm... If i now go via Metadata API how should i go about..
    – Arteezy
    Commented Apr 26, 2018 at 21:41

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.

  • did you try to update a few ExternalStringLocalization by /vXX.X/tooling/composite/sobjects? I have issues getting positive results.
    – hsd
    Commented Sep 29, 2022 at 17:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .