Skip to main content
Gender personalization helps you create more engaging, relevant email campaigns. Unosend’s gender detection is 100% free with unlimited requests, powered by AI and the open-source gender-guesser library.
No extra cost — Gender detection is included free with all plans.

How It Works

Unosend analyzes first names to determine likely gender:
"David" → male (100% confidence)
"Maria" → female (100% confidence)  
"Alex"  → unknown (50% confidence, androgynous)
For email addresses, we extract the first name:
"david.smith@gmail.com" → "david" → male
"maria_garcia@example.com" → "maria" → female

Quick Start

1. Enrich a Single Contact

curl -X POST https://www.unosend.co/api/v1/contacts/enrich \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"email": "john.smith@example.com"}'
Response:
{
  "data": {
    "email": "john.smith@example.com",
    "extractedName": "john",
    "gender": "male",
    "confidence": 100
  }
}

2. Enrich on Import

Add enrich_gender=true when importing contacts:
curl -X POST https://www.unosend.co/api/v1/contacts/import \
  -H "Authorization: Bearer un_your_api_key" \
  -F "file=@contacts.csv" \
  -F "audience_id=YOUR_AUDIENCE_ID" \
  -F "enrich_gender=true"

3. Enrich an Entire Audience

curl -X POST https://www.unosend.co/api/v1/contacts/enrich \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"audienceId": "YOUR_AUDIENCE_ID"}'

Personalization Examples

Personalized Greetings

Use the detected gender to customize salutations:
const greeting = contact.gender === 'male' 
  ? `Dear Mr. ${contact.last_name}`
  : contact.gender === 'female'
  ? `Dear Ms. ${contact.last_name}`
  : `Hi ${contact.first_name}`;

Template Variables

In your email templates, use conditional content:
{{#if gender == "male"}}
  <p>Hi {{first_name}}, check out our new men's collection!</p>
{{else if gender == "female"}}
  <p>Hi {{first_name}}, discover our latest women's arrivals!</p>
{{else}}
  <p>Hi {{first_name}}, see what's new!</p>
{{/if}}

Segmentation

Filter your audience by gender in broadcasts:
// Create a segment for female contacts
const femaleContacts = contacts.filter(c => c.gender === 'female');

// Send targeted campaign
await unosend.broadcasts.send({
  audienceId: femaleSegmentId,
  subject: "New arrivals you'll love",
  // ...
});

Best Practices

Always Have a Fallback

Some names are ambiguous. Always handle the “unknown” case gracefully.

Respect Privacy

Don’t assume or force gender. Use detected values as suggestions.

Test Both Versions

A/B test gendered vs. neutral content to see what resonates.

Update Regularly

Re-enrich contacts when their profile is updated.

Integration Examples

Node.js / TypeScript

import { Unosend } from 'unosend';

const unosend = new Unosend('un_your_api_key');

// Single email
const result = await unosend.contacts.enrich({
  email: 'john@example.com'
});
console.log(result.gender); // "male"

// Batch
const results = await unosend.contacts.enrich({
  emails: ['john@example.com', 'maria@example.com'],
  updateContacts: true // Save to database
});

Python

import requests

response = requests.post(
    'https://www.unosend.co/api/v1/contacts/enrich',
    headers={'Authorization': 'Bearer un_your_api_key'},
    json={'email': 'john@example.com'}
)

data = response.json()
print(f"Gender: {data['data']['gender']}")  # "male"

PHP

$ch = curl_init('https://www.unosend.co/api/v1/contacts/enrich');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer un_your_api_key',
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => json_encode(['email' => 'john@example.com'])
]);

$response = json_decode(curl_exec($ch), true);
echo $response['data']['gender']; // "male"

Database Schema

When gender is detected, contacts are updated with:
FieldTypeDescription
genderstringmale, female, or unknown
gender_confidenceintegerConfidence score 0-100
Query contacts by gender:
SELECT * FROM contacts 
WHERE gender = 'female' 
AND gender_confidence >= 75;

Limitations

  • Works best with common Western names
  • Some names are genuinely ambiguous (Alex, Jordan, Taylor)
  • Email-based detection depends on extractable first name
  • Nicknames may not be recognized

FAQ

Yes! Gender detection is 100% free with unlimited requests on all plans.
For common names, accuracy is 95%+. Ambiguous names return “unknown” with lower confidence.
The database includes names from 40+ countries. Coverage varies by region.
Yes, contacts can be manually updated via API or dashboard.