Documentation
Technical documentation for SelfLoop integrations, service accounts, API access, and dealership pilot setup.
SelfLoop deployments are usually configured with the SelfLoop team during a pilot. These docs cover the technical surfaces your team may use once API access, CRM sync, or service accounts are enabled for your organization.
For a product walkthrough or pilot scope, book a demo.
REST API
Our REST API provides programmatic access to supported SelfLoop functionality, such as organization settings, teams, service accounts, and integration workflows. Available endpoints depend on your deployment.
The API documentation includes:
- Complete endpoint reference
- Request/response schemas
- Authentication examples
- Code samples in multiple languages
JavaScript/TypeScript SDK
For JavaScript and TypeScript teams, we provide a typed SDK that wraps the REST API:
The SDK provides:
- Full TypeScript support with complete type definitions
- Convenient wrapper functions for all API endpoints
- Built-in request/response validation using Zod schemas
- Automatic error handling
Installation
npm install @selfloop/sdk # or pnpm add @selfloop/sdk # or yarn add @selfloop/sdk
Authentication & Tokens
SelfLoop uses token-based authentication. All tokens are built upon service accounts, which you can create and manage in your team settings.
Token Types
We support two types of tokens, each designed for different use cases:
Secret Tokens
Secret tokens are intended for server-side use and can manipulate any data in your account. These should be kept secret and never exposed in client-side code or public repositories.
- Use for: Backend services, server-side scripts, CI/CD pipelines
- Security: Keep these tokens secure and never commit them to version control
Frontend Tokens
Frontend tokens are designed for limited browser-based access in approved client applications. They should be scoped narrowly and should not be used for administrative workflows.
- Use for: Approved web applications and embedded client workflows
- Security: Restrict access by scope, origin, and deployment policy
Creating Tokens
You can create service accounts and both token types in your team settings:
- Navigate to your team settings
- Go to the "Service Accounts" section
- Create a new service account
- Generate secret tokens or frontend tokens as needed
CLI Tool
For command-line workflows and automation, we provide a CLI tool:
The CLI tool supports:
- Managing organizations, teams, and integration settings where enabled
- Testing authenticated API access
- Authentication and token management
- Batch operations and automation scripts
Installation
npm install -g @selfloop/cli # or pnpm add -g @selfloop/cli # or yarn global add @selfloop/cli
Authentication
The CLI supports two authentication methods:
-
Personal Account Login: Authenticate using your personal SelfLoop account credentials
loa auth login -
Secret Token: Use a secret token for automated workflows
loa auth token <your-secret-token>
Getting Started
-
Choose your integration method:
- Use the Web Dashboard for team and deployment management
- Use the REST API for direct HTTP access
- Use the SDK for JavaScript/TypeScript teams
- Use the CLI for command-line workflows
-
Install the Tools:
# Install the SDK npm install @selfloop/sdk # Install the CLI npm install -g @selfloop/cli -
Set up authentication:
- CLI: Run
loa auth loginto authenticate via browser - SDK/API: Create a service account in your team settings and generate a token
- CLI: Run
-
Start building:
- Explore the API documentation for available endpoints
- Check out the SDK examples for common use cases
- Use the CLI for quick operations and testing
