API Reference

Complete reference for the Fuddlink REST API. Send emails, manage templates, track events, and more.

Base URL

https://api.fudd.link

Authentication

All API requests must include your API key in the Authorization header.

Authorization: YOUR_API_KEY

Security: Never expose your API key in client-side code. Always make API calls from your server.

Create Transmission

POST/v1/transmissions

Create and send an email to recipients. Content limited to 20 MB.

Request Body

{
  "recipients": [
    {
      "address": {
        "email": "john.doe@acme.com",
        "name": "John Doe"
      },
      "tags": ["customer"],
      "metadata": {
        "age": "24",
        "place": "Anytown"
      },
      "substitution_data": {
        "customer_type": "Platinum",
        "year": "Freshman"
      }
    }
  ],
  "content": {
    "from": {
      "email": "deals@acme.com",
      "name": "Acme"
    },
    "subject": "Big Black Friday savings!",
    "text": "Hi {{address.name}}\nSave big this Black Friday in your area!",
    "html": "<p>Hi {{address.name}}</p><p>Save big this Black Friday in your area!</p>",
    "reply_to": "sales@acme.com",
    "headers": {
      "X-Customer-Campaign-ID": "black_friday_campaign"
    }
  },
  "options": {
    "open_tracking": true,
    "click_tracking": true,
    "transactional": false,
    "perform_substitutions": true
  },
  "substitution_data": {
    "sender": "Acme Team",
    "holiday_name": "Black Friday"
  }
}

Parameters

ParameterTypeRequiredDescription
recipientsarrayYesArray of recipient objects
contentobjectYesEmail content (inline or RFC822)
optionsobjectNoTransmission options for tracking and behavior
substitution_dataobjectNoTemplate variables for substitution
num_rcpt_errorsintegerNoMax recipient errors to return

Response

{
  "results": {
    "total_rejected_recipients": 0,
    "total_accepted_recipients": 1,
    "id": "77b31e54-a73c-4c73-8ec3-c5b70a25e2cd",
    "rcpt_to_errors": []
  },
  "errors": []
}

Example Request

curl -X POST https://api.fudd.link/v1/transmissions \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": [
      {
        "address": {
          "email": "john.doe@acme.com",
          "name": "John Doe"
        }
      }
    ],
    "content": {
      "from": "deals@acme.com",
      "subject": "Welcome to Acme!",
      "html": "<h1>Welcome {{address.name}}!</h1>",
      "text": "Welcome {{address.name}}!"
    }
  }'

Content Types

Inline Content

Use inline content to specify email content directly in the API request.

{
  "content": {
    "from": {
      "email": "deals@acme.com",
      "name": "Acme"
    },
    "subject": "Big Black Friday savings!",
    "text": "Hi {{address.name}}\nSave big this Black Friday!",
    "html": "<p>Hi {{address.name}}</p><p>Save big this Black Friday!</p>",
    "amp_html": "<amp-email>...</amp-email>",
    "reply_to": "sales@acme.com",
    "headers": {
      "X-Custom-Header": "value"
    },
    "attachments": [
      {
        "name": "billing.pdf",
        "type": "application/pdf",
        "data": "V2VsY29tZSB0byBvdXIgZW1haWwgc2VydmljZSE="
      }
    ],
    "inline_images": [
      {
        "name": "logo.jpeg",
        "type": "image/jpeg",
        "data": "/9j/4AAQSkZJRgABAQEAYABgAAD..."
      }
    ]
  }
}

RFC822 Content

Use RFC822 content to provide a pre-built email message.

{
  "content": {
    "email_rfc822": "Content-Type: text/plain\nTo: \"{{address.name}}\" <{{address.email}}>\n\nHi {{first_name}}\n\nSave big this Black Friday in your area {{place}}!\nClick http://www.acme.com and get huge discount.\nHurry, this offer is only for {{customer_type}}!\n\n{{sender}}"
  }
}

Tracking Options

Configure tracking and transmission behavior with the options object.

Available Options

OptionTypeDefaultDescription
open_trackingbooleantrueTrack email opens
initial_openbooleantrueTrack initial opens only
click_trackingbooleantrueTrack link clicks
transactionalbooleanfalseMark as transactional email
inline_cssbooleanfalseInline CSS in HTML
perform_substitutionsbooleantrueEnable template substitution

Example

{
  "options": {
    "open_tracking": true,
    "click_tracking": true,
    "transactional": false,
    "inline_css": false,
    "perform_substitutions": true
  }
}

Template Substitutions

Use template variables to personalize emails. Variables can be set at transmission level and overridden per recipient.

Transmission-level Substitutions

These variables apply to all recipients unless overridden.

{
  "substitution_data": {
    "sender": "Acme Team",
    "holiday_name": "Black Friday",
    "company_name": "Acme Corp"
  }
}

Recipient-level Substitutions

Override transmission data for specific recipients.

{
  "recipients": [
    {
      "address": {
        "email": "john.doe@acme.com",
        "name": "John Doe"
      },
      "substitution_data": {
        "customer_type": "Platinum",
        "year": "Freshman"
      },
      "metadata": {
        "age": "24",
        "place": "Anytown"
      }
    }
  ]
}

Using Variables in Content

Reference variables using double curly braces syntax.

{
  "content": {
    "subject": "Hi {{address.name}}, {{holiday_name}} deals await!",
    "html": "<p>Hi {{address.name}},</p><p>Check out our {{holiday_name}} deals in {{place}}!</p><p>As a {{customer_type}} customer, you get exclusive access.</p>",
    "text": "Hi {{address.name}},\n\nCheck out our {{holiday_name}} deals in {{place}}!\nAs a {{customer_type}} customer, you get exclusive access."
  }
}

Error Codes

The Fuddlink API uses conventional HTTP response codes to indicate success or failure.

CodeMeaningDescription
201CreatedTransmission created successfully
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
403ForbiddenInsufficient permissions
404Not FoundResource not found
422Unprocessable EntityRequest validation failed
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error occurred

Error Response Format

{
  "errors": [
    {
      "message": "Unauthorized.",
      "code": "2101",
      "description": "Exceed Sending Limit (hourly)"
    }
  ]
}

Common Error Codes

Authentication Errors

  • 2101 - Unauthorized API key
  • 2102 - API key suspended
  • 2103 - Rate limit exceeded

Validation Errors

  • 1001 - Invalid email address
  • 1002 - Content too large
  • 1003 - Missing required field

Rate Limits

100
requests per minute
Free tier
1,000
requests per minute
Pro tier
10,000
requests per minute
Enterprise tier

Need Help?

Our API is designed to be developer-friendly, but we're here if you need assistance.