Skip to main content

Get started with DelightLoop API

Learn how to authenticate, create your first contact list, and send a campaign using DelightLoop’s powerful API.

Step 1: Authentication

To use the DelightLoop API, you’ll need an API key from your DelightLoop dashboard.
  1. Log in to your DelightLoop account
  2. Navigate to Settings > API Keys
  3. Generate a new API key for your application
  4. Store it securely - you’ll use it in the x-api-key header
Test your API key with a simple request:
curl -X GET "{{api.baseUrl}}/api/campaigns/contact-lists" \
  -H "x-api-key: YOUR_API_KEY_HERE"
All DelightLoop API requests require the x-api-key header for authentication.

Step 2: Create your first contact list

Contact lists are the foundation of your campaigns. Create one with this simple request:
curl -X POST "{{api.baseUrl}}/api/campaigns/contact-lists" \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First Contact List",
    "description": "Getting started with DelightLoop API"
  }'
Once you have a contact list, add some contacts:
curl -X POST "{{api.baseUrl}}/api/campaigns/contact-lists/{listId}/contacts" \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
      {
        "email": "[email protected]",
        "firstName": "Sarah",
        "lastName": "Johnson"
      }
    ]
  }'
Replace {listId} with the ID returned from creating your contact list.

Step 3: Launch your first campaign

Now create a campaign targeting your contact list:
curl -X POST "{{api.baseUrl}}/api/campaigns" \
  -H "x-api-key: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Welcome Campaign",
    "contactListIds": ["your-contact-list-id"],
    "templateId": "template-id",
    "scheduledAt": "2024-12-25T10:00:00Z"
  }'

Next steps

Now that you’ve created your first campaign, explore these key features:

Common use cases

Send personalized gifts to your top customers to strengthen relationships and increase retention.
Welcome new clients with branded gifts that make a lasting first impression.
Schedule seasonal campaigns to maintain touchpoints throughout the year.
Celebrate customer milestones, anniversaries, and achievements automatically.
Need help? Contact DelightLoop support at [email protected] or visit our support portal.