cURL
curl --request POST \ --url https://api.example.com/v1/audiences/{audienceId}/contacts \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "first_name": "<string>", "last_name": "<string>", "unsubscribed": true } '
Add a contact to an audience.
curl -X POST https://www.unosend.co/api/v1/audiences/aud_123/contacts \ -H "Authorization: Bearer un_xxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "first_name": "John", "last_name": "Doe" }'
{ "id": "con_123", "email": "[email protected]", "first_name": "John", "last_name": "Doe", "unsubscribed": false, "created_at": "2024-01-15T10:30:00.000Z" }