Getting startedCreate your first initiativeConnect version controlInvite your teamPlan today's work
Build with One HorizonMCPCLIAPI KeysREST APIJavaScriptJavaScript SDKSwiftSwift SDKOAuth AppsWebhooks
DocsAPI Reference

Main

  • Home
  • About
  • Pricing
  • Changelog
  • Docs

Features

  • Roadmap
  • Boards
  • Triage
  • Workflows & agents
  • Progress
  • Insights
  • CLI
  • Integrations

Solutions

  • Startups
  • Dev shops / agencies
  • Software teams
  • Internal IT & platform teams

Alternatives

  • vs Jira
  • vs Linear
  • vs Asana
  • vs Monday.com
  • vs ClickUp
  • vs Notion

Company

  • Blog
  • Security
  • Log in
  • Sign up
  • Terms of Use
  • Privacy Policy

Resources

  • Docs
  • Community
  • Support
  • API reference
  • Desktop app
  • SDK
  • Vault
  • QR code generator

© 2026 One Horizon. All rights reserved

FacebookInstagramThreadsXTikTokYouTubeMedium


Swift SDK

The Swift SDK is the typed client for the REST API on Apple platforms: generated API clients, Codable models, and auth through OneHorizonAPIConfiguration.customHeaders.

Read the SDK docs

Getting started

Add the package with Swift Package Manager, in Xcode or in Package.swift:

.package(url: "https://github.com/onehorizonai/swift.git", from: "1.1.0")

Choose the credential boundary

Never ship a workspace API key, OAuth client secret, or registration access token in an app. A signed-in user's OAuth tokens are different: a native app can obtain them with authorization code flow and PKCE, store them in the iOS Keychain, and refresh them without a backend.

  • Users sign in: create a Native iOS (public) app in Settings → Apps, follow the OAuth app guide, and store the user's access and refresh tokens in the Keychain. The maintained Examples/NativeOAuth app covers PKCE, ASWebAuthenticationSession, token exchange, refresh, and Simulator tests.
  • Anonymous features such as “Report issue”: the app sends the request to your backend; your backend uses its One Horizon API key to create the bug.
// Trusted backend only. Never inside an iOS app binary.import OneHorizonimport Foundation
let config = OneHorizonAPIConfiguration.sharedconfig.customHeaders["Authorization"] = "Bearer \(ProcessInfo.processInfo.environment["ONE_API_KEY"] ?? "")"
let bug = try await TasksAPI.reportBug(    workspaceId: "current",    report: ReportTriageItemRequest(title: "Checkout fails after applying a discount"),    apiConfiguration: config)
print(bug.taskId ?? "")

reportBug and submitIdea create items directly in Triage. One Horizon derives the reporter from the credential and supplies the scope, status, visibility, role, origin, and report time.

Add report context

Pass only the context your integration has:

let idea = try await TasksAPI.submitIdea(    workspaceId: "current",    report: ReportTriageItemRequest(        title: "Let customers save multiple shipping addresses",        description: "Customers want to reuse addresses during checkout.",        reporterUserId: "u_...",        source: "customer-portal",        priority: .medium,        teamIds: Set(["team_..."]),        assigneeIds: Set(["u_..."]),        labels: [LabelSnapshot(name: "Checkout", type: .component)]    ),    apiConfiguration: config)

For tasks that need explicit lifecycle, scope, kind, or routing fields, call createTask. The REST API guide covers follow-up links, documents, files, and error handling.


PreviousJavaScript SDKNextOAuth Apps
JavaScript

JavaScript SDK

Install the typed JavaScript client for REST API calls and webhook event handling.

MCP

Let AI assistants read and act on One Horizon work context through tools.

REST API

Create, read, and update workspace work from services, scripts, and CI.

CLI

Install the CLI, sign in, choose a workspace, and work from your terminal.

  • Getting started
  • Choose the credential boundary
  • Add report context
  • Back to top