I created a custom field through this tooling REST API /services/data/v54.0/tooling/sobjects/CustomField The API call succeed and I could see the custom fields under Setup > Object Manager > Lead.

Try to add a lead using this REST API /services/data/v54.0/sobjects/Lead It says the fields does not exist. even though I can see that field in object manager. Can someone please help me with this?

Thanks in advance


1 Answer 1


After running POST /services/data/v54.0/tooling/sobjects/CustomField and below request body I created the field test2__c

{ "FullName": "Lead.test2__c", "Metadata": { "label": "test", "description": "my new test field", "required": false, "externalId": false, "type": "Text", "length": 32 } }

When I tried POST with /services/data/v54.0/sobjects/Lead it gave me same error

{ "Salutation": "Mr.", "FirstName": "STACK", "LastName": "EXAMPLE", "test2__c": "hey", "Company": "Samosa"}

After setting up FLS for this test2__c to editable for my profile(I did this via UI but based on post, looks like this can be done via REST API), I was able to insert the lead record.

  • 1
    Thanks Swetha, for your response, I will try this out
    – Sam
    Apr 14, 2022 at 10:22

You must log in to answer this question.

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