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

# N8N - Content Brief

> Create a basic N8N Flow for Content Briefs

## Step 1 - Authentication via API key

* Use an HTTP Request node and select the following options:
* Authentication: `Generic Credential Type`
* Generic Auth Type: `Header Auth`
* Header Auth: `Header Auth account`

<img src="https://mintcdn.com/snippetdigital/HSuWZ5eFnP-6yTnC/images/mintlify-api-auth-main-window.png?fit=max&auto=format&n=HSuWZ5eFnP-6yTnC&q=85&s=5546f24219cb0d282d5a31bafadb259a" alt="Authentication section in Mintlify" width="518" height="570" data-path="images/mintlify-api-auth-main-window.png" />

* Then click the `Edit Pencil icon` to open up the detail model to enter your API key:
* Then in the modal, add X-API-KEY: `kwi_sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abc`
  <img src="https://mintcdn.com/snippetdigital/HSuWZ5eFnP-6yTnC/images/mintlify-api-auth-main-window-detail.png?fit=max&auto=format&n=HSuWZ5eFnP-6yTnC&q=85&s=403a7b30690bc3507e2482e97e505030" alt="Authentication section in Mintlify" width="1093" height="690" data-path="images/mintlify-api-auth-main-window-detail.png" />

### Alternatively you can authenticate via username and password

* Use an HTTP Request node
* URL: `Keywordinsightsapi.keywordinsights.ai//authentication/login`
* Method: `POST`
* Body -> JSON: `{  "email": "<email>",  "password": "<password>"}`
  <img src="https://mintcdn.com/snippetdigital/HSuWZ5eFnP-6yTnC/images/mintlify-simple-auth.png?fit=max&auto=format&n=HSuWZ5eFnP-6yTnC&q=85&s=f69a0a6fff6cb28d5ea26c0c5d4f26f0" alt="Authentication section in Mintlify" width="1250" height="1452" data-path="images/mintlify-simple-auth.png" />

## Step 2 - Creating a Content Brief Order

* Ensure the output of the Auth node shows in the second node
  <img src="https://mintcdn.com/snippetdigital/HSuWZ5eFnP-6yTnC/images/mintlify-content-brief-order-1.png?fit=max&auto=format&n=HSuWZ5eFnP-6yTnC&q=85&s=518ba084300e15571c8873b3067c698d" alt="Authentication section in Mintlify" width="1970" height="1446" data-path="images/mintlify-content-brief-order-1.png" />
* Paste the following json into the body,
  * `folder_id`: optional if you want the project placed in a specific folder
  * `secondary_keywords`: optional to provide more detail
* `keywords`: pass up to 25 keywords, in a comma separated list within the array brackets `[]`

```
{
  "keywords": ["how to become a model"],
  "language": "en",
  "location": "United States",
  "title_ai_order_id": "",
  "title": "",
  "folder_id": "",
  "secondary_keywords": ""
}
```

<img src="https://mintcdn.com/snippetdigital/HSuWZ5eFnP-6yTnC/images/mintlify-content-brief-2.png?fit=max&auto=format&n=HSuWZ5eFnP-6yTnC&q=85&s=12bca1cc0ebda1d323ea2a7337e71dce" alt="Body payload for Content Brief Orders" width="1156" height="1082" data-path="images/mintlify-content-brief-2.png" />
