For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • API Reference
      • GETList Templates
      • POSTCreate Template
      • GETGet Template
      • DELDelete Template
      • PATCHUpdate Template
      • POSTClone Template
      • POSTFavorite Template
      • DELUnfavorite Template
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referencetemplates

List Templates

GET
/api/v1/templates
GET
/api/v1/templates
$curl https://api.onepin.ai/api/v1/templates \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "data": [
3 {
4 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5 "name": "Social Media Campaign",
6 "definition": {
7 "graph": {
8 "nodes": [
9 {
10 "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
11 "type": "source_script",
12 "position": {
13 "x": 100.5,
14 "y": 200.75
15 },
16 "config": {
17 "script": "fetchLatestTrends()"
18 },
19 "config_version": 1
20 }
21 ],
22 "edges": [
23 {
24 "id": "e7b8f1a2-3c4d-4f5a-9b6c-123456789abc",
25 "source": "d290f1ee-6c54-4b01-90e6-d701748f0851",
26 "sourcePort": "output",
27 "target": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
28 "targetPort": "input"
29 }
30 ]
31 },
32 "execution": {
33 "steps": [
34 "d290f1ee-6c54-4b01-90e6-d701748f0851"
35 ],
36 "params": {
37 "language": "en",
38 "postLength": 280
39 }
40 }
41 },
42 "is_starter": true,
43 "is_public": true,
44 "uses_count": 152,
45 "created_at": "2024-01-15T09:30:00Z",
46 "updated_at": "2024-04-10T14:45:00Z",
47 "description": "A template for creating engaging social media posts with automated content generation.",
48 "category": "media",
49 "is_favorite": false,
50 "created_by": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
51 }
52 ],
53 "meta": {
54 "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
55 "timestamp": "2024-06-01T12:00:00Z"
56 },
57 "pagination": {
58 "limit": 20,
59 "next": "https://api.onepin.ai/api/v1/templates?offset=20&limit=20",
60 "prev": null
61 }
62}
List live published templates across workspaces (gallery). Authenticated but not workspace-scoped — the gallery is cross-workspace by design (published rows from any workspace). Does not require `X-Workspace-Id`, so a freshly signed-up user without a workspace can still browse templates. Dual-auth: Clerk JWT or `op_live_*` API key (scope `templates:read`).
Was this page helpful?
Previous

Create Template

Next
Built with

List live published templates across workspaces (gallery).

Authenticated but not workspace-scoped — the gallery is cross-workspace by design (published rows from any workspace). Does not require X-Workspace-Id, so a freshly signed-up user without a workspace can still browse templates.

Dual-auth: Clerk JWT or op_live_* API key (scope templates:read).

Authentication

AuthorizationBearer
Clerk JWT token
OR
AuthorizationBearer

Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.

Query parameters

categorylist of enums or nullOptional

Repeat for OR, e.g. ?category=media&category=creative

Allowed values:
searchstring or nullOptional<=100 characters
sortenumOptionalDefaults to recent
Allowed values:
offsetintegerOptional>=0Defaults to 0
limitintegerOptional1-100Defaults to 20
favorites_onlybooleanOptionalDefaults to false

Response

Successful Response
datalist of objects
metaobject
paginationobject

Errors

422
Unprocessable Entity Error