Back to Arky

API Reference

Complete SDK and REST API documentation for all Arky modules

Reference documentation for Arky SDK modules and their corresponding REST API endpoints.

SDK Modules

The Arky SDK is organized into domain-specific modules:

| Module | Description | | ---------------------------------------------------------- | ----------------------------------------------------------------------- | | User | Authentication (magic links), sessions, account management | | Store | Store settings, subscriptions, deploy hooks, webhooks | | E-shop | Products, services, providers, orders, checkout, payments | | CMS | Collections, entries, schemas, blocks, media fields, and forms | | Media | File uploads, image management | | Notification | Trigger emails, track delivery | | Promo Codes | Discount codes, conditions | | Database | Key-value storage, scripts | | Location | Store locations, zones, and countries/states reference data | | Workflow | Automation workflows, DAG execution, scheduling | | CRM | Contacts, audiences, campaigns, and lead research | | Email Templates | Reusable email templates with Handlebars | | Forms | Form builder and submission collection | | Taxonomies | Hierarchical categories and filters | | Shipping | Shipping rates and label purchasing | | Social | Social providers, publications, comments, replies, and metrics | | Support | Support agents, website chat, conversations, assignment, and resolution | | Platform | Currencies, service capabilities, webhook events |

Tip

For the storefront action key and A/B testing model, see Action Keys and Experiments.

Base URL

All API endpoints are accessed through:

https://api.arky.io

Authentication

Browser storefront routes use a public Store key on every request:

X-Arky-Publishable-Key: arky_pk_...

The SDK adds that header after initialize("arky_pk_..."). Stateful storefront operations also create or resume a visitor session and send its token:

Authorization: Bearer arky_vst_...

Admin and platform endpoints use an account session or Personal API Token:

Authorization: Bearer YOUR_ACCESS_TOKEN
Tip

Use initialize with a publishable key for storefront visitors and createAdmin for platform operators. Never put an Admin access token or Personal API Token in storefront code. The browser SDK stores arky_vst_... visitor sessions internally.

Request Format

  • All request bodies use JSON format
  • Use Content-Type: application/json header
  • All timestamps are Unix timestamps (seconds)
  • All monetary amounts are in the currency’s minor units

Response Format

Successful responses return the requested data directly:

{
	"id": "prod_abc123",
	"name": "Product Name",
	"created_at": 1704067200
}

Paginated responses include cursor-based pagination:

{
  "items": [...],
  "cursor": "next_page_cursor"
}

Error Handling

Errors return appropriate HTTP status codes with details:

{
	"error": "VALIDATION_ERROR",
	"message": "Invalid email format",
	"details": {
		"field": "email",
		"reason": "must be a valid email address"
	}
}

See the Error Handling Guide for more details.