|
| 1 | +--- |
| 2 | +title: Integrate |
| 3 | +description: Send contacts from third-party tools to FirstQuadrant. |
| 4 | +--- |
| 5 | + |
| 6 | +You can use FirstQuadrant's integrations to send contacts from third-party tools to FirstQuadrant. This allows you to use your existing CRM, marketing automation platform, or other tools to send contacts to FirstQuadrant for further enrichment and use in your campaigns. |
| 7 | + |
| 8 | +## Supported integrations |
| 9 | + |
| 10 | +### Zapier |
| 11 | + |
| 12 | +The easiest way to integrate FirstQuadrant with third-party tools is to use [Zapier](https://zapier.com). Zapier allows you to connect FirstQuadrant with thousands of other tools, such as CRMs, marketing automation platforms, and more, without writing any code. |
| 13 | + |
| 14 | +To use Zapier, you can create an audience with the type "Integrate" and click on "Connect with Zapier" to join the beta program. Once you've joined the beta program, you can create a Zap to send contacts from your third-party tool to FirstQuadrant. |
| 15 | + |
| 16 | +### Campaign API |
| 17 | + |
| 18 | +Each campaign with the type "Integrate" also gets a campaign-specific, public-facing API endpoint that you can use to send contacts to FirstQuadrant. You can use this API endpoint to send contacts from your third-party tool to FirstQuadrant programmatically. For example, when someone signs up on your website, you can send their contact information to FirstQuadrant using the Campaign API. |
| 19 | + |
| 20 | +The API key starts with `fqa_pub_` and is unique to each campaign. You can find the API key on the Audience page of your campaign by clicking on "Review API key". Note that this API key is different from your team's API keys, which are used for authentication when using the FirstQuadrant API. The campaign-specific API key is used to send contacts to a specific campaign and can be safely shared with third-party tools or used in client-side code (note that campaign API keys include `pub_` in the key, meaning "public", whereas others do not). |
| 21 | + |
| 22 | +#### Request body |
| 23 | + |
| 24 | +The API endpoint accepts an object with the properties `contact`, `company`, and `data`. The minimum required properties is `contact.email`, but it is recommended to include `contact.name` and `company.name` if available. The following properties are supported: |
| 25 | + |
| 26 | +- `contact`: `name`, `email`, `apolloId`, `nickname`, `bio`, `avatar`, `website`, `location`, `timeZone`, `city`, `state`, `countryCode`, `latitude`, `longitude`, `employmentTitle`, `employmentSeniority`, `linkedInUrl`, `twitterUrl`, `facebookUrl`, `githubUrl` |
| 27 | +- `company`: `name`, `domain`, `nickname`, `bio`, `avatar`, `website`, `street`, `city`, `state`, `postalCode`, `country`, `rawAddress`, `foundedYear`, `employeesCount`, `alexaGlobalRank`, `retailLocationsCount`, `annualRevenue`, `fundingTotal`, `fundingStage`, `ticker`, `primaryIndustry`, `secondaryIndustries`, `tags`, `languages`, `techStack`, `phone`, `blogUrl`, `angelListUrl`, `linkedInUrl`, `twitterUrl`, `facebookUrl`, `crunchbaseUrl` |
| 28 | +- `data`: You can include any additional data in the `data` property as a key-value pair where both the key and the value is a string. This data will be stored with the contact and can be used in your campaigns. |
| 29 | + |
| 30 | +The descriptions of these properties are the same as the properties in the [Import CSV audience](./import-csv) feature. |
| 31 | + |
| 32 | +#### Authentication |
| 33 | + |
| 34 | +You need to include the API key in the `Campaign-API-Key` header. If you are unable to send custom headers, you can also include the API key in the request body as `apiKey` or as a query parameter `campaign-api-key`. |
| 35 | + |
| 36 | +#### Examples |
| 37 | + |
| 38 | +In the following examples, you can replace `CAMPAIGN_API_KEY` with the API key of your campaign. In these examples, we're sending a contact with the name "John Doe" and email [email protected] to FirstQuadrant. They have written a custom message "I want to contact sales." which is stored in the `data.message` property. |
| 39 | + |
| 40 | +You can use the following HTML form to send contacts to FirstQuadrant. Since HTML forms do not support nested objects, you can use dot notation to specify nested properties. For example, `contact.name` will be parsed as `contact: { name: "John Doe" }` when the header `Content-Type: application/x-www-form-urlencoded` is set. |
| 41 | + |
| 42 | +```html |
| 43 | +<form |
| 44 | + action="https://firstquadrant.ai/api/go/audience?campaign-api-key=CAMPAIGN_API_KEY" |
| 45 | + method="post" |
| 46 | +> |
| 47 | + <label>Name <input name="contact.name" /></label> |
| 48 | + <label>Email <input name="contact.email" type="email" /></label> |
| 49 | + <label>Message <textarea name="data.message"></textarea></label> |
| 50 | + <button type="submit">Submit</button> |
| 51 | +</form> |
| 52 | +``` |
| 53 | + |
| 54 | +You can use the following cURL command to send contacts to FirstQuadrant: |
| 55 | + |
| 56 | +```bash |
| 57 | +curl \ |
| 58 | + -X POST \ |
| 59 | + -H "Campaign-API-Key: CAMPAIGN_API_KEY" \ |
| 60 | + -H "Content-type: application/json" \ |
| 61 | + -d '{ |
| 62 | + "contact": { |
| 63 | + "name": "John Doe", |
| 64 | + |
| 65 | + }, |
| 66 | + "data": { |
| 67 | + "message": "I want to contact sales." |
| 68 | + } |
| 69 | + }' 'https://firstquadrant.ai/api/go/audience' |
| 70 | +``` |
| 71 | + |
| 72 | +You can use the following JavaScript code to send contacts to FirstQuadrant: |
| 73 | + |
| 74 | +```js |
| 75 | +await fetch("https://firstquadrant.ai/api/go/audience", { |
| 76 | + method: "POST", |
| 77 | + headers: { |
| 78 | + "Campaign-API-Key": "CAMPAIGN_API_KEY", |
| 79 | + "Content-Type": "application/json", |
| 80 | + }, |
| 81 | + body: JSON.stringify({ |
| 82 | + contact: { |
| 83 | + name: "John Doe", |
| 84 | + |
| 85 | + }, |
| 86 | + data: { message: "I want to contact sales." }, |
| 87 | + }), |
| 88 | +}); |
| 89 | +``` |
0 commit comments