---
title: "Create a custom source definition"
slug: "create-a-custom-source-definition"
abstract: "How to create a custom source definition and subscribe a contact to a list."
---
# Create a custom source definition

You can create a custom source definition and [manage](https://doc.sitecore.com/xp/en/users/93/sitecore-experience-platform/manage-contact-lists-and-sources.html "Manage contact lists and sources") them using the List Manager. The association between a list and a source is created automatically when at least one contact is added to a list using that source.

To create a custom source definition:

1. On the [Sitecore Launchpad](https://doc.sitecore.com/xp/en/users/93/sitecore-experience-platform/overview-of-the-sitecore-launchpad.html "Overview of the Sitecore Launchpad"), click **Content Editor**.
2. Go to */sitecore/System/Marketing Control Panel/Subscriptions*.
3. In the tree view, right-click **Subscriptions** and click  **Insert from Template**.
4. Expand the *Templates/System/Analytics* folder, click the *Subscription* item, and click **Insert**.
5. On the **Content** tab, in the **Name** field, type the name you want to appear on the contact list page.
6. To use the subscription across multiple contact lists, in the **Tags** field, define a shared value. Without a shared value, the life of the subscription source is tied to the contact list.
7. Deploy the created subscription definition item.

You can subscribe a contact to a list with a custom subscription source using the following API:

```

var contacts = new List<Contact>(); // List of contacts
var subscriptionService = ServiceLocator.ServiceProvider.GetService<ISubscriptionService>();
subscriptionService.Subscribe(contactListId, contacts, subscriptionSourceId);

```

Where `subscriptionSourceId` is the ID of a subscription definition item.