I was looking through the Metadata API (and Partner) but can't find anywhere described how I can define via the API a custom object.

We have specific datasets which have to translate into Custom Objects in Salesforce via the API.

For instance a Home Repair dataset would include: Address, Estimate and Repair Date fields. I want to translate this dataset into a Custom Object (named HomeRepair__c with those 3 custom fields) in Salesforce in our client's account via an API call.

Is this even possible?


1 Answer 1


Sure, you can use the Metadata API. You want the create() call. Here's the sample xml to define the custom object from the documentation:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <description>just a test object with one field for eclipse ide testing</description>
        <description>add your comments about this object here</description>
        <inlineHelpText>This field contains comments made about this object</inlineHelpText>
        <label>MyFirstObject Name</label>
  • Could you explain how to use this?
    – auny
    Commented Jun 6, 2015 at 12:27

You must log in to answer this question.

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