{"info":{"_postman_id":"02e33b2d-ec84-4905-a915-15adcf3229b0","name":"Mails.ai API Documentation (Public)","description":"<html><head></head><body><h2 id=\"overview\"><strong>Overview</strong></h2>\n<p>Welcome to the <strong>Mails.ai API</strong> documentation. This API allows you to programmatically add contacts to your email campaigns.</p>\n<h3 id=\"base-url\"><strong>Base URL</strong></h3>\n<p>All API endpoints are relative to the base URL:</p>\n<p><a href=\"https://app.mails.ai/api/v1\">https://app.mails.ai/api/v1</a></p>\n<h3 id=\"authentication\"><strong>Authentication</strong></h3>\n<p>All requests require an API key for authentication. Include your API key in the <code>Authorization</code> header of each request.</p>\n<ul>\n<li><strong>Header</strong>: <code>Authorization: YOUR_API_KEY</code></li>\n</ul>\n<p><strong>Note:</strong> Replace <code>YOUR_API_KEY</code> with your actual API key.</p>\n<h3 id=\"content-type\"><strong>Content-Type</strong></h3>\n<p>All requests should include the <code>Content-Type</code> header set to <code>application/json</code>.</p>\n<ul>\n<li><strong>Header</strong>: <code>Content-Type: application/json</code></li>\n</ul>\n<hr>\n<h2 id=\"endpoint-add-contacts-to-a-campaign\"><strong>Endpoint: Add Contacts to a Campaign</strong></h2>\n<h3 id=\"endpoint-url\"><strong>Endpoint URL</strong></h3>\n<p>POST <a href=\"https://app.mails.ai/api/v1/add_contacts\">https://app.mails.ai/api/v1/add_contacts</a></p>\n<h3 id=\"description\"><strong>Description</strong></h3>\n<p>Adds one or more contacts to a specified email campaign.</p>\n<h3 id=\"headers\"><strong>Headers</strong></h3>\n<ul>\n<li><p><strong>Authorization</strong>: Your API key.</p>\n</li>\n<li><p><strong>Content-Type</strong>: <code>application/json</code></p>\n</li>\n</ul>\n<h3 id=\"request-body-parameters\"><strong>Request Body Parameters</strong></h3>\n<ul>\n<li><p><strong>campaign_id</strong> (string, required): The unique identifier of the campaign to which you want to add contacts.</p>\n</li>\n<li><p><strong>email_data</strong> (array of objects, required): An array of contact objects.</p>\n<p>  Each contact object may include:</p>\n<ul>\n<li><p><strong>email</strong> (string, required): The contact's email address.</p>\n</li>\n<li><p><strong>first_name</strong> (string, optional): The contact's first name.</p>\n</li>\n<li><p><strong>Additional Fields</strong>: Depending on your API's capabilities, you might include other fields. However, based on the information provided, only <code>email</code> and <code>first_name</code> are used.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"example-request-body\"><strong>Example Request Body</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"campaign_id\": \"c022f9ded8b2dd6dd07f878b770as6de\",\n  \"email_data\": [\n    {\n      \"email\": \"user1@example.com\",\n      \"first_name\": \"Alice\"\n    },\n    {\n      \"email\": \"user2@example.com\",\n      \"first_name\": \"Bob\"\n    }\n  ]\n}\n\n</code></pre>\n<h3 id=\"example-curl-command\"><strong>Example cURL Command</strong></h3>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"34130051","collectionId":"02e33b2d-ec84-4905-a915-15adcf3229b0","publishedId":"2sAY4shic1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-24T23:39:21.000Z"},"item":[{"name":"Add Contacts to a Campaign","id":"1107b86c-b334-4114-9970-d463d2297bb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"API_KEY"},{"key":"content-type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\"campaign_id\": \"c022f9ded8b2dd6dd07f878b770as6de\",\n\"email_data\": [\n{\n\"email\": \"dsfdgsafdgffsagdhffgasd@demo.com\",\n\"first_name\": \"test\"\n},\n{\n\"email\": \"dsafdgffsagd@demo.com\",\n\"first_name\": \"sfadg\"\n}\n]\n}","options":{"raw":{"language":"json"}}},"url":"https://app.mails.ai/api/v1/add_contacts","description":"<p>Generated from cURL: curl --request POST <br />--url <a href=\"https://app.mails.ai/api/v1/add_contacts\">https://app.mails.ai/api/v1/add_contacts</a> <br />--header 'Authorization: API_KEY' <br />--header 'content-type: application/json' <br />--data '{\n\"campaign_id\": \"c022f9ded8b2dd6dd07f878b770as6de\",\n\"email_data\": [\n{\n\"email\": \"<a href=\"mailto:dsfdgsafdgffsagdhffgasd@demo.com\">dsfdgsafdgffsagdhffgasd@demo.com</a>\",\n\"first_name\": \"test\"\n},\n{\n\"email\": \"<a href=\"mailto:dsafdgffsagd@demo.com\">dsafdgffsagd@demo.com</a>\",\n\"first_name\": \"sfadg\"\n}\n]\n}'</p>\n","urlObject":{"protocol":"https","path":["api","v1","add_contacts"],"host":["app","mails","ai"],"query":[],"variable":[]}},"response":[],"_postman_id":"1107b86c-b334-4114-9970-d463d2297bb8"}]}