---
schema_version: "1"
id: ca1b88122ae9112d781c846e106795be8d5c93bf8fff3182d9fb715c8588e35b
title: Metadata API Example
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/caf-dev/guides/caf/caf-dev-examples-api-meta.md
canonical_url: https://developer.salesforce.com/docs/platform/caf-dev/guide/caf-dev-examples-api-meta.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 287cf7aa913497c1cf82bb83bc34b9e06c173b36edfe9d1d29a7fe843a9b5fd7
products:
  - Custom Address Fields Developer Guide
  - Platform Developer Content
---

# Metadata API Example

To create a custom address field on an object, use Metadata API.

**note:** Before you create a custom address field, review the [Custom Address Fields Requirements and Limitations](https://developer.salesforce.com/docs/platform/caf-dev/guide/caf-dev-limitations.md). To discuss the feature and ask questions, join the [Custom Address Fields Discussion](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000H3KISA0) group on the Trailblazer Community.

This example creates a custom object of type Address on the Account object.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">       
    <fields>
        <fullName>MailingAddress__c</fullName>
        <externalId>false</externalId>
        <label>Mailing Address</label>
        <required>false</required>
        <type>Address</type>
        <unique>false</unique>
   </fields>
 </CustomObject>
```

