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
      • GETGet Current Subscription
      • POSTSubscribe
      • POSTCancel Subscription
      • POSTChange Plan
      • POSTCancel Scheduled Change
      • GETList Payment Methods
      • POSTAdd Payment Method
      • DELDelete Payment Method
      • PUTSet Default Payment Method
      • GETGet My Credits
      • GETGet My Plan Limits
      • GETList Invoices
      • GETGet Current Notification Preferences
      • PATCHUpdate Current Notification Preferences
      • GETList My Templates
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referenceusers

List My Templates

GET
/api/v1/users/me/templates
GET
/api/v1/users/me/templates
$curl https://api.onepin.ai/api/v1/users/me/templates \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "data": [
3 {
4 "id": "a3f1c9e2-4b7d-4f8a-9c2e-1d2b3f4a5e6f",
5 "name": "Social Media Campaign",
6 "definition": {
7 "graph": {
8 "nodes": [
9 {
10 "id": "b7e2d3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
11 "type": "source_script",
12 "position": {
13 "x": 100.5,
14 "y": 200.75
15 },
16 "config": {
17 "script": "fetchLatestPosts",
18 "interval": "daily"
19 },
20 "config_version": 1
21 }
22 ],
23 "edges": [
24 {
25 "id": "c8d9e0f1-2a3b-4c5d-6e7f-8a9b0c1d2e3f",
26 "source": "b7e2d3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
27 "sourcePort": "output",
28 "target": "d9e0f1a2-3b4c-5d6e-7f8a-9b0c1d2e3f4a",
29 "targetPort": "input"
30 }
31 ]
32 },
33 "execution": {
34 "steps": [
35 "b7e2d3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f"
36 ],
37 "params": {
38 "postFrequency": "3 per day",
39 "platforms": [
40 "facebook",
41 "instagram",
42 "twitter"
43 ]
44 }
45 }
46 },
47 "is_starter": true,
48 "is_public": true,
49 "uses_count": 42,
50 "created_at": "2024-01-15T09:30:00Z",
51 "updated_at": "2024-04-10T14:45:00Z",
52 "description": "Template for creating engaging social media posts with automated scheduling.",
53 "category": "media",
54 "is_favorite": false,
55 "created_by": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90"
56 }
57 ],
58 "meta": {
59 "request_id": "req_20240115_093000_abc123",
60 "timestamp": "2024-04-10T14:45:00Z"
61 },
62 "pagination": {
63 "limit": 1,
64 "next": "https://api.onepin.ai/api/v1/users/me/templates?offset=1&limit=1",
65 "prev": null
66 }
67}

List templates the current user created in the current workspace.

Scoped on both (workspace_id, created_by) so when workspaces become multi-user this endpoint keeps returning only the caller’s own rows — other workspace members’ public/starter templates surface via the gallery endpoint (GET /api/v1/templates) instead.

Was this page helpful?
Previous

List Workflows

Next
Built with

Authentication

AuthorizationBearer
Clerk JWT token

Headers

X-Workspace-Idstring or nullOptional

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