> ## Documentation Index
> Fetch the complete documentation index at: https://docs.preceptai.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Make

## Connecting to Make

Our API is designed to work seamlessly with Make. By using the **HTTP > Make a request** module, you can connect Precept to thousands of other applications and build powerful, automated workflows.

### Step 1: Get Your API Key

Before you can connect to Precept, you need your unique API key.

1. Navigate to the [Developer Dashboard](https://app.preceptai.co.uk/developer) in your Precept account.
2. If you haven't already, generate a new API key.
3. Copy the key to your clipboard. Treat this key like a password and keep it secure.

<Card title="Need a Precept account?" icon="rocket" href="https://app.preceptai.co.uk/auth">
  Sign up for a free trial to get your API key and developer credits.
</Card>

<img src="https://mintcdn.com/precept/ZNWTJJJ682eOlJcx/images/developer-page.png?fit=max&auto=format&n=ZNWTJJJ682eOlJcx&q=85&s=1aec26b78c50819fb5094ffcc7a9322c" alt="Getting API Key" width="2402" height="888" data-path="images/developer-page.png" />

### Step 2: Create a Webhook Scenario to Receive Results

Since enrichment jobs are asynchronous, you must first set up a dedicated scenario to receive the results. This scenario will have a **Webhook** trigger that provides a unique URL.

1. **Create a New Scenario**: In Make, create a new, separate scenario that will act as your webhook listener.
2. **Add a Webhook Trigger**: For the first module, search for and select **Webhooks > Custom webhook**.
3. **Generate a URL**: Click **Add** to create a new webhook, give it a name (e.g., "Precept Results"), and save. Make will generate a unique URL. **Copy this URL** to your clipboard, as you will need it in the next step.
4. **Listen for Data**: Run this new scenario once so it is ready to receive data from Precept.

### Step 3: Set Up the HTTP Request Scenario

Now, create a second scenario to send the enrichment request to Precept.

1. **Add the HTTP Module**: In a new scenario, add the **HTTP > Make a request** module.

2. **Configure the Request**:

   * **URL**: `https://api.preceptai.co.uk/v1/companies/insights`
   * **Method**: `POST`
   * **Headers**: Add one header with the **Name** `Authorization` and **Value** `Bearer YOUR_API_KEY`.
   * **Body type**: `Raw`
   * **Content type**: `JSON (application/json)`
   * **Request content**: Enter the JSON payload, making sure to include the `webhookUrl` you copied in Step 2.

   ```json theme={null}
   {
     "webhookUrl": "https://hook.eu1.make.com/your-unique-url",
     "companies": [
       {
         "companyWebsite": "preceptai.co.uk",
         "customData": { "id": "12345" }
       },
       {
         "companyLinkedin": "https://linkedin.com/company/google",
         "customData": { "id": "67890" }
       },
       {
         "companyWebsite": "apple.com",
         "companyLinkedin": "https://linkedin.com/company/apple",
         "customData": { "id": "13579" }
       }
     ],
     "queries": ["When was their last funding round?"],
     "enrichments": {
       "type": "decision_makers",
       "departments": ["sales"],
       "decisionMakersLimit": 2
     }
   }
   ```

3. **Parse Response**: Ensure the `Parse response` switch is turned on.

### Step 4: Run and Test

Run your HTTP request scenario. The API will return a `202 Accepted` response with an `enrichment_id`, confirming the job is queued. Shortly after, your webhook scenario will trigger and receive the enrichment results.

### Step 5: Example Webhook Responses

Once the enrichment is complete, Precept will send the results to your Make webhook. Below are some examples of what the payload might look like.

<CodeGroup>
  ```json Standard Enrichments theme={null}
  {
    "enrichment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
    "results": [
      {
        "company_website": "https://www.preceptai.co.uk",
        "company_linkedin": "https://www.linkedin.com/company/precept-ai",
        "custom_data": {
          "id": "12345",
          "crm_id": "01234"
        },
        "company_data": {
          "id": 12345,
          "company_name": "Precept AI",
          "website": "https://www.preceptai.co.uk"
        }
      },
      {
        "company_website": "https://www.unknown-company.com",
        "company_linkedin": "LinkedIn URL not found",
        "error": "Company not found"
      }
    ]
  }
  ```

  ```json Decision Makers theme={null}
  {
    "enrichment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
    "results": [
      {
        "company_website": "https://www.preceptai.co.uk",
        "custom_data": {
          "id": "0987"
        },
        "decision_makers": [
          {
            "name": "Jane Smith",
            "jobTitle": "Sales Manager",
            "linkedin": "https://www.linkedin.com/in/janesmith",
            "department": "sales"
          }
        ],
        "query_responses": [
          {
            "query": "What is their tech stack?",
            "text": "Precept AI uses React, Node.js, and Python."
          }
        ]
      }
    ]
  }
  ```
</CodeGroup>

That's it! You have now built a complete, asynchronous workflow.
