A StackOne connector is a YAML configuration that turns a third-party API into a set of agent-ready actions. By the end of this guide, you’ll have a working connector pushed to your StackOne project — built with the StackOne CLI, an AI assistant, and the connectors-template. You’ll set up your environment, generate an API key, build and test authentication against a provider, then add and validate your first actions.Documentation Index
Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
Use this file to discover all available pages before exploring further.
Setup
Generate a StackOne API key
- In the StackOne dashboard, go to Project Settings → API keys.
- Click Create API key.
- Ensure the following Scopes are enabled (some are not selected by default):
connectors:read— download connectors from registryconnectors:write— push and delete connectorscredentials:read— use linked account credentials withstackone run
- Copy the key (format:
v1.{region}.xxxxx) and store it somewhere safe — you won’t be able to view it again.
Open a Terminal & Install the StackOne CLI
You’ll run all StackOne CLI commands from a terminal window.
- macOS
- Windows
- Linux
- Press
Cmd + Spaceto open Spotlight, type Terminal, and press Enter. - Confirm Node.js 18+ is installed by running:
If the command isn’t found or the version is below 18, install Node.js from nodejs.org.
- Confirm Git is installed:
If the command isn’t found, install the Xcode Command Line Tools (
xcode-select --install) or download Git from git-scm.com. - Install the StackOne CLI globally via npm:
The
-gflag installs the CLI globally so thestackonecommand is available in any directory. - Verify the install:
Set Up Your Working Directory
Create your own private GitHub repository by following the connectors-template setup guide.Clone your new private repo into a All subsequent CLI commands run from inside
my-connector folder and install dependencies:my-connector.Starting without connectors-template
Starting without connectors-template
Create an empty folder, move into it, then pull an existing connector as a reference:
Configure the StackOne CLI
From inside your working directory, authenticate the StackOne CLI:This configures MCP tools for AI-assisted development and stores your access token.
Create a StackOne CLI Profile
Create a named profile so deployment commands like You’ll be prompted for a profile label and an API key — paste the StackOne API key you generated in Step 1. Create separate profiles for staging vs. production and reference them later with
stackone push can authenticate without you pasting your API key each time:--profile <profile-label>.Starting the Build
The connectors-template includes agent skills and a pre-configuredCLAUDE.md, so the recommended path is to open your project in an AI coding assistant and start a chat from inside the my-connector directory.
- Claude Code
- Cursor / VS Code
From inside The template’s
my-connector, launch Claude Code:CLAUDE.md and bundled skills (including /on-boarding) load automatically.- Connector type selection — Agentic Actions (raw provider data) vs Schema-Based (unified output)
- Provider details — Name, API version, and pulling any existing connector
- Authentication setup — Configuring and validating auth before building actions
- Schema definition (for unified connectors) — Defining your target output format
- Endpoint research — Discovering available API endpoints and their trade-offs
- Action building — Implementing and testing each action
Build Workflow
The recommended workflow ensures you validate each step before moving to the next:Step 1: Fork or Pull Existing Connector
Always start by checking if a connector already exists:Step 2: Build Authentication
Configure authentication in the main connector file:- API Key (Bearer)
- API Key (Header)
- Basic Auth
list_users) and verify auth works before building more actions.
Step 3: Connect Account & Test Auth
Most providers offer sandbox or developer accounts for testing — check the provider’s developer portal for signup, then generate API credentials (API key, OAuth app, etc.). Note any rate limits or restrictions on sandbox accounts. Create test files for local development:Alternative: push and link an account
Alternative: push and link an account
If you prefer, push the connector and create a linked account in the StackOne dashboard (see Getting Started guide). Then use
--account-id instead of local credential files:<profile-label> is the name you set when running stackone init (see Setup).Step 4: Build Actions
With auth working, build out your actions. See Common Step Functions for patterns.Step 5: Iterate
- Validate syntax:
stackone validate connectors/provider/ - Test actions:
stackone run --debug ... - Fix issues and repeat
Common Step Functions
request - Single HTTP Request
Use for GET single resource, POST create, PUT update operations:
paginated_request - Cursor Pagination
Use for list endpoints with cursor-based pagination:
map_fields - Transform Data (Unified Connectors)
Transform provider response to your schema:
Always use
version: "2" for map_fields and typecast steps.typecast - Apply Type Conversions
Apply after map_fields to ensure correct types:
Cursor Pagination with Dynamic Page Size
For list actions where callers can specify page size, use the dual-condition pattern:StackOne CLI Examples
For the full command list, see the CLI Reference. The examples below cover the patterns you’ll use most while iterating on your first connector.Validate as you build
Watch mode re-runs validation on every save:Test actions with parameters
--params accepts a structured JSON object with these top-level keys, each corresponding to an input’s in: location in the action’s YAML:
path—in: pathinputs (URL path parameters)queryParams—in: queryinputsheader—in: headersinputs (note: singularheader)body—in: bodyinputs
in: location:
Push when ready
<profile-label> is the name you set when running stackone init (see the setup section). Create separate profiles for staging vs. production and swap the label as needed.
Debugging
Enable Debug Mode
Add--debug to any stackone run command to surface:
- The raw HTTP request sent to the provider (URL, method, headers, body)
- The full response body before any mapping is applied
- The inputs and outputs of each step in the connector
- The resolved values of any JSONPath or JEXL expressions
Debug Empty or Incorrect Results
When mapping produces unexpected results:Common Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
| 401 Unauthorized | Invalid credentials | Check API key, regenerate if needed |
| Empty data array | Wrong dataKey path | Use --debug to verify actual response structure |
| Null field values | Incorrect expression path | Verify nested paths match actual response |
| Pagination returns same data | Wrong iterator.key | Check API docs for expected cursor parameter name |
| Enum not translated | matchExpression case mismatch | Provider might return "ACTIVE" not "Active" |
Error Mapping
Map provider-specific errors to meaningful responses using error handlers:Manual Testing Methods
Beyondstackone run, you have additional testing options:
Action Request Tester (Dashboard)
The StackOne dashboard includes an Action Request Tester for testing deployed connectors:- Navigate to your project in the dashboard
- Select a linked account
- Choose an action and provide parameters
- Execute and view results
RPC Calls via API
Test actions programmatically using the StackOne API:MCP Testing (AI Agents)
If using Claude Code or similar, test actions conversationally:Unified Connector Checklist
For schema-based connectors, verify:Schema Definition
Schema Definition
- Target schema documented before building
- All required fields identified
- Field types specified (string, number, enum, datetime_string)
- Enum values defined with mappings
Field Mapping
Field Mapping
-
fieldConfigsmap all schema fields -
targetFieldKeyuses YOUR schema names (not provider names) - Nested paths verified against actual response
- Enum mappings handle all provider values + default case
Pagination
Pagination
-
cursor.enabled: truefor list actions -
dataKeypath verified with--debug -
nextKeypath verified with--debug -
result.nextreturns cursor for next page - Tested: first page, next page, last page, empty results
Steps
Steps
-
map_fieldsstep withversion: "2" -
typecaststep withversion: "2" - Correct
dataSourcereferences between steps
Optimizing Agent Performance
The connector building agent starts with baseline capabilities. As you build connectors, you can improve agent performance by creating custom skills that encode your specific use cases and schemas.The Optimization Workflow
Why Create Custom Skills?
| Without Skills | With Skills |
|---|---|
| Agent asks for schema every time | Agent auto-loads your schema skill |
| Generic action structures | Actions match your specific requirements |
| Manual field mapping decisions | Consistent mapping patterns across connectors |
| Repeated explanations of your use case | Agent understands context immediately |
Creating Schema Skills
After building your first few connectors, extract your schema into a reusable skill:Recommended Progression
Build 2-3 Connectors
Use the baseline agent to build your first connectors. Note patterns in your requirements.
Create Schema Skills
Extract your target schemas into
.claude/skills/schemas/. Include field definitions, types, and enum mappings.Document Use-Case Patterns
Create skills that describe your specific integration patterns, endpoint preferences, or data transformation rules.
Next Steps
Connector Structure
Detailed YAML structure reference
Expression Language
JSONPath, JEXL, and string interpolation
YAML Reference
Complete property documentation
CI/CD Setup
Automated deployment with GitHub Actions