CNContact.AddURLAddress
-----------------------

Adds an URL address to a contact.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Contacts](component_Contacts.md) | [8.4](newinversion84.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "CNContact.AddURLAddress"; ContactIdentifier; URL { ; Label } ) 

**MBS**( **"CNContact.AddURLAddress";** /\* Adds an URL address to a contact. \*/  
**$ContactIdentifier**; /\* The contact identifier.e.g. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" \*/   
**$URL**; /\* The URL address.e.g. "https://www.mbsplugins.de/" \*/   
**$Label**) /\* Optional; The label to use.  
For your convenience we translate Homepage, Work, Home and Other to the right values, so they get localized in display.  
Default label is Other.e.g. "Work" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ContactIdentifier | The contact identifier. | "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" |  |
| URL | The URL address. | "https://www.mbsplugins.de/" |  |
| Label | The label to use.   For your convenience we translate Homepage, Work, Home and Other to the right values, so they get localized in display.   Default label is Other. | "Work" | Optional |

### Result

Returns OK or error.

### Description

Adds an URL address to a contact.  
This is a convenience function to add just one URL with a given label to the contact.  
Please call [CNContactStore.UpdateContact](CNContactStoreUpdateContact.md) later to store the values.  
### Examples

Add homepage:

 Set Variable \[ $r ; Value:MBS ( "CNContact.AddURLAddress"; $contactID ; "http://www.monkeybreadsoftware.com/"; "Homepage" ) \]  
Add FMP URL to carry the record ID for our record in FileMaker for this person:

 Set Variable \[ $r ; Value:MBS ( "CNContact.AddURLAddress"; $contactID ; "fmp://$/Contacts.fmp12?script=ShowContact&amp;param=12345"; "FileMaker" ) \]  
Update a contact by adding an URL:

 Set Variable \[ $ContactID ; Value: "BD2307E5-92F6-4A8F-946D-C4804615C18B:ABPerson" \]  
\# add the URL:   
Set Variable \[ $r ; Value: MBS ( "CNContact.AddURLAddress"; $contactID ; "http://www.monkeybreadsoftware.com/"; "Homepage" ) \]  
\# and save   
Set Variable \[ $r ; Value: MBS ( "[CNContactStore.UpdateContact](CNContactStoreUpdateContact.md)"; $ContactID ) \]  
### See also

- [CNContact.AddEmailAddress](CNContactAddEmailAddress.md)
- [CNContact.AddInstantMessage](CNContactAddInstantMessage.md)
- [CNContact.AddPhoneNumber](CNContactAddPhoneNumber.md)
- [CNContact.AddPostalAddress](CNContactAddPostalAddress.md)
- [CNContactStore.AddContact](CNContactStoreAddContact.md)
- [CNContactStore.NewContact](CNContactStoreNewContact.md)
- [CNContactStore.UpdateContact](CNContactStoreUpdateContact.md)

### Example Databases

- [Mac and iOS/Contacts/Contacts](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Contacts/Contacts.shtml#7ScriptAnchor_)

Created 1st August 2018 , last changed 25th February 2026

  
[CNContact.AddSocialProfileJSON](CNContactAddSocialProfileJSON.md) - [CNContact.DeleteValue](CNContactDeleteValue.md)

[HTML Version](CNContactAddURLAddress.shtml)