> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Fairing

The Fairing connector lets your AI agent act in each user's Fairing account. Each user connects their own Fairing API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 2 tools.

**Authentication:** API Key
**Categories:** Marketing, Analytics
**Tools:** 2: 2 read, 0 write, 0 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=FAIRING)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Fairing connection

   In **AgentKit > Connections**, create a Fairing connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'fairing'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Fairing:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'fairing_list_questions',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "fairing"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Fairing:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="fairing_list_questions",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Fairing credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'fairing_list_questions',
  toolInput: {},
  connector: 'fairing',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="fairing_list_questions",
    tool_input={},
    connection_name="fairing",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `fairing_list_questions`

List Questions · Read-only

List the questions in your Fairing question stream, including answer options and follow-up questions.
Returns a data array of questions (id, prompt, type, customer_type, frequency_type, answer options, published_at and timestamps).
Use to find a question_id before calling fairing_list_responses, or to review the survey configuration.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `include_targeting` (`boolean`, optional): Set to true to include each question's targeting rules in the result. Defaults to false. Default: `false`.

Example input: `{}`

### `fairing_list_responses`

List Responses · Read-only

List customer survey responses collected by Fairing, with order, customer, attribution and UTM details for each answer.
Returns a data array of response records (response id, question and answer text, order id and total, customer email, UTM fields, timestamps) plus prev and next page URLs.
Use to pull answers to post-purchase questions; filter by question_id or time window. Use fairing_list_questions to look up question IDs and wording.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `ending_before` (`string`, optional): Pagination cursor: the id of the first response from the current page. Returns the page before it. Cannot be combined with starting_after. Example: pk9ZDChjMNueWHZqHEF5Z.
- `inserted_at_max` (`string`, optional): ISO 8601 UTC timestamp. Return only responses created at or before this time. Example: 2026-05-31T23:59:59Z.
- `inserted_at_min` (`string`, optional): ISO 8601 UTC timestamp. Return only responses created at or after this time. Example: 2026-05-01T00:00:00Z.
- `limit` (`integer`, optional): Number of responses to return per page, from 1 to 1000. Defaults to 100 when omitted. Example: 100.
- `question_id` (`integer`, optional): Return only responses to the question with this numeric ID. Get IDs from fairing_list_questions. Example: 11.
- `sort` (`string`, optional): Result ordering. One of inserted_at_desc (newest first, the default), inserted_at_asc, updated_at_desc, updated_at_asc. Cursors walk in the active sort direction. One of: `inserted_at_desc`, `inserted_at_asc`, `updated_at_desc`, `updated_at_asc`.
- `starting_after` (`string`, optional): Pagination cursor: the id of the last response from the previous page. Returns the page after it. Cannot be combined with ending_before. Example: ENz45Kvbxru0B5X6kDN7Y.
- `updated_at_max` (`string`, optional): ISO 8601 UTC timestamp. Return only responses last updated at or before this time. Example: 2026-05-31T23:59:59Z.
- `updated_at_min` (`string`, optional): ISO 8601 UTC timestamp. Return only responses last updated at or after this time; useful for finding responses recategorized in Fairing. Example: 2026-05-01T00:00:00Z.

Example input: `{}`

## Related

Other Marketing connectors ([all 87](/agentkit/connectors/?category=marketing)):

- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Mailchimp](/agentkit/connectors/mailchimp/): Scalekit connector, OAuth, 73 tools
- [Twitter / X](/agentkit/connectors/twitteroauth/): Scalekit connector, OAuth, 92 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
