summaryrefslogtreecommitdiff
path: root/static/api-docs.html
blob: a133375c68e89fc22afa8cbb01bd8a1405b56933 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>API Documentation - TaskFlow</title>
    <link rel="stylesheet" href="api-docs-styles.css">
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
</head>
<body>
    <nav class="navbar">
        <div class="nav-container">
            <a href="landing.html" class="nav-logo">TaskFlow</a>
            <ul class="nav-menu">
                <li><a href="landing.html#features" class="nav-link">Features</a></li>
                <li><a href="landing.html#pricing" class="nav-link">Pricing</a></li>
                <li><a href="about.html" class="nav-link">About</a></li>
                <li><a href="blog.html" class="nav-link">Blog</a></li>
                <li><a href="contact.html" class="nav-link">Contact</a></li>
            </ul>
            <div class="nav-actions">
                <a href="login.html" class="btn btn-ghost">Sign In</a>
                <button class="btn btn-primary">Start Free Trial</button>
            </div>
        </div>
    </nav>

    <div class="docs-layout">
        <aside class="sidebar" id="sidebar">
            <div class="sidebar-header">
                <h3>API Documentation</h3>
                <div class="api-version">v2.1</div>
            </div>

            <nav class="sidebar-nav">
                <div class="nav-section">
                    <h4>Getting Started</h4>
                    <ul>
                        <li><a href="#introduction" class="nav-item">Introduction</a></li>
                        <li><a href="#authentication" class="nav-item">Authentication</a></li>
                        <li><a href="#rate-limiting" class="nav-item">Rate Limiting</a></li>
                        <li><a href="#errors" class="nav-item">Error Handling</a></li>
                    </ul>
                </div>

                <div class="nav-section">
                    <h4>Core Resources</h4>
                    <ul>
                        <li><a href="#projects" class="nav-item">Projects</a></li>
                        <li><a href="#tasks" class="nav-item">Tasks</a></li>
                        <li><a href="#users" class="nav-item">Users</a></li>
                        <li><a href="#teams" class="nav-item">Teams</a></li>
                    </ul>
                </div>

                <div class="nav-section">
                    <h4>Advanced</h4>
                    <ul>
                        <li><a href="#webhooks" class="nav-item">Webhooks</a></li>
                        <li><a href="#search" class="nav-item">Search</a></li>
                        <li><a href="#analytics" class="nav-item">Analytics</a></li>
                        <li><a href="#integrations" class="nav-item">Integrations</a></li>
                    </ul>
                </div>

                <div class="nav-section">
                    <h4>Resources</h4>
                    <ul>
                        <li><a href="#sdks" class="nav-item">SDKs</a></li>
                        <li><a href="#changelog" class="nav-item">Changelog</a></li>
                        <li><a href="#support" class="nav-item">Support</a></li>
                    </ul>
                </div>
            </nav>
        </aside>

        <main class="main-content">
            <div class="content-header">
                <h1>TaskFlow API Documentation</h1>
                <p>Build powerful integrations with TaskFlow's RESTful API. Access projects, tasks, users, and more programmatically.</p>

                <div class="quick-actions">
                    <button class="btn btn-primary" id="getApiKeyBtn">Get API Key</button>
                    <button class="btn btn-secondary" id="tryApiBtn">Try API</button>
                    <div class="api-status">
                        <div class="status-dot operational"></div>
                        <span>API Status: Operational</span>
                    </div>
                </div>
            </div>

            <section id="introduction" class="doc-section">
                <h2>Introduction</h2>
                <p>The TaskFlow API is a RESTful API that allows you to integrate TaskFlow's project management capabilities into your applications. Our API follows standard HTTP conventions and returns JSON responses.</p>

                <div class="info-box">
                    <div class="info-icon">â„šī¸</div>
                    <div class="info-content">
                        <h4>Base URL</h4>
                        <code>https://api.taskflow.com/v2</code>
                    </div>
                </div>

                <h3>Key Features</h3>
                <ul class="feature-list">
                    <li>RESTful architecture with predictable URLs</li>
                    <li>JSON request and response bodies</li>
                    <li>Standard HTTP status codes</li>
                    <li>OAuth 2.0 and API key authentication</li>
                    <li>Rate limiting and pagination</li>
                    <li>Comprehensive error messages</li>
                    <li>Real-time webhooks</li>
                    <li>SDKs for popular languages</li>
                </ul>
            </section>

            <section id="authentication" class="doc-section">
                <h2>Authentication</h2>
                <p>TaskFlow API supports two authentication methods: API Keys for server-to-server communication and OAuth 2.0 for user-facing applications.</p>

                <div class="auth-methods">
                    <div class="auth-method">
                        <h3>API Key Authentication</h3>
                        <p>Include your API key in the Authorization header:</p>

                        <div class="code-example">
                            <div class="code-header">
                                <span class="code-title">Request Headers</span>
                                <button class="copy-btn" data-copy="auth-header">Copy</button>
                            </div>
                            <pre><code id="auth-header">Authorization: Bearer your_api_key_here
Content-Type: application/json</code></pre>
                        </div>
                    </div>

                    <div class="auth-method">
                        <h3>OAuth 2.0</h3>
                        <p>For user-facing applications, use OAuth 2.0 with the authorization code flow:</p>

                        <div class="code-example">
                            <div class="code-header">
                                <span class="code-title">Authorization URL</span>
                                <button class="copy-btn" data-copy="oauth-url">Copy</button>
                            </div>
                            <pre><code id="oauth-url">https://api.taskflow.com/oauth/authorize?
  client_id=your_client_id&
  redirect_uri=your_redirect_uri&
  response_type=code&
  scope=read write</code></pre>
                        </div>
                    </div>
                </div>
            </section>

            <section id="rate-limiting" class="doc-section">
                <h2>Rate Limiting</h2>
                <p>API requests are rate limited to ensure fair usage and system stability.</p>

                <div class="rate-limits">
                    <div class="rate-limit-tier">
                        <h4>Free Tier</h4>
                        <div class="limit-value">1,000 requests/hour</div>
                        <div class="limit-burst">Burst: 100 requests/minute</div>
                    </div>
                    <div class="rate-limit-tier">
                        <h4>Pro Tier</h4>
                        <div class="limit-value">10,000 requests/hour</div>
                        <div class="limit-burst">Burst: 500 requests/minute</div>
                    </div>
                    <div class="rate-limit-tier">
                        <h4>Enterprise</h4>
                        <div class="limit-value">100,000 requests/hour</div>
                        <div class="limit-burst">Burst: 2,000 requests/minute</div>
                    </div>
                </div>

                <h3>Rate Limit Headers</h3>
                <div class="code-example">
                    <div class="code-header">
                        <span class="code-title">Response Headers</span>
                    </div>
                    <pre><code>X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200</code></pre>
                </div>
            </section>

            <section id="errors" class="doc-section">
                <h2>Error Handling</h2>
                <p>TaskFlow API uses conventional HTTP response codes and returns detailed error information in JSON format.</p>

                <div class="error-codes">
                    <div class="error-code">
                        <div class="code-number">200</div>
                        <div class="code-description">
                            <h4>OK</h4>
                            <p>Request succeeded</p>
                        </div>
                    </div>
                    <div class="error-code">
                        <div class="code-number">400</div>
                        <div class="code-description">
                            <h4>Bad Request</h4>
                            <p>Invalid request parameters</p>
                        </div>
                    </div>
                    <div class="error-code">
                        <div class="code-number">401</div>
                        <div class="code-description">
                            <h4>Unauthorized</h4>
                            <p>Invalid or missing authentication</p>
                        </div>
                    </div>
                    <div class="error-code">
                        <div class="code-number">403</div>
                        <div class="code-description">
                            <h4>Forbidden</h4>
                            <p>Insufficient permissions</p>
                        </div>
                    </div>
                    <div class="error-code">
                        <div class="code-number">404</div>
                        <div class="code-description">
                            <h4>Not Found</h4>
                            <p>Resource not found</p>
                        </div>
                    </div>
                    <div class="error-code">
                        <div class="code-number">429</div>
                        <div class="code-description">
                            <h4>Too Many Requests</h4>
                            <p>Rate limit exceeded</p>
                        </div>
                    </div>
                </div>

                <h3>Error Response Format</h3>
                <div class="code-example">
                    <div class="code-header">
                        <span class="code-title">Error Response</span>
                        <button class="copy-btn" data-copy="error-response">Copy</button>
                    </div>
                    <pre><code id="error-response">{
  "error": {
    "code": "validation_error",
    "message": "The request contains invalid parameters",
    "details": [
      {
        "field": "name",
        "message": "Name is required"
      }
    ],
    "request_id": "req_1234567890"
  }
}</code></pre>
                </div>
            </section>

            <section id="projects" class="doc-section">
                <h2>Projects</h2>
                <p>Projects are the top-level containers for organizing tasks and team collaboration.</p>

                <div class="endpoint-group">
                    <div class="endpoint">
                        <div class="endpoint-header">
                            <div class="method get">GET</div>
                            <div class="endpoint-path">/projects</div>
                            <div class="endpoint-title">List Projects</div>
                        </div>

                        <div class="endpoint-content">
                            <p>Retrieve a list of projects accessible to the authenticated user.</p>

                            <h4>Query Parameters</h4>
                            <div class="parameters">
                                <div class="parameter">
                                    <div class="param-name">limit</div>
                                    <div class="param-type">integer</div>
                                    <div class="param-description">Number of results to return (1-100, default: 20)</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">offset</div>
                                    <div class="param-type">integer</div>
                                    <div class="param-description">Number of results to skip (default: 0)</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">status</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Filter by status: active, completed, archived</div>
                                </div>
                            </div>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Request</span>
                                    <div class="code-tabs">
                                        <button class="tab-btn active" data-tab="curl">cURL</button>
                                        <button class="tab-btn" data-tab="javascript">JavaScript</button>
                                        <button class="tab-btn" data-tab="python">Python</button>
                                    </div>
                                    <button class="copy-btn" data-copy="projects-curl">Copy</button>
                                </div>
                                <div class="code-content">
                                    <pre class="tab-content active" id="curl"><code id="projects-curl">curl -X GET "https://api.taskflow.com/v2/projects?limit=10&status=active" \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json"</code></pre>
                                    <pre class="tab-content" id="javascript"><code>const response = await fetch('https://api.taskflow.com/v2/projects?limit=10&status=active', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer your_api_key_here',
    'Content-Type': 'application/json'
  }
});

const projects = await response.json();</code></pre>
                                    <pre class="tab-content" id="python"><code>import requests

headers = {
    'Authorization': 'Bearer your_api_key_here',
    'Content-Type': 'application/json'
}

response = requests.get(
    'https://api.taskflow.com/v2/projects',
    headers=headers,
    params={'limit': 10, 'status': 'active'}
)

projects = response.json()</code></pre>
                                </div>
                            </div>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Response</span>
                                    <button class="copy-btn" data-copy="projects-response">Copy</button>
                                </div>
                                <pre><code id="projects-response">{
  "data": [
    {
      "id": "proj_1234567890",
      "name": "Website Redesign",
      "description": "Complete overhaul of company website",
      "status": "active",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-20T14:22:00Z",
      "owner": {
        "id": "user_0987654321",
        "name": "John Doe",
        "email": "john@company.com"
      },
      "team_id": "team_1122334455",
      "task_count": 24,
      "completed_tasks": 12,
      "progress": 50.0,
      "due_date": "2025-03-01T00:00:00Z",
      "tags": ["design", "frontend", "priority-high"]
    }
  ],
  "pagination": {
    "limit": 10,
    "offset": 0,
    "total": 1,
    "has_more": false
  }
}</code></pre>
                            </div>

                            <div class="try-it-section">
                                <button class="btn btn-primary try-it-btn" data-endpoint="projects">Try It</button>
                            </div>
                        </div>
                    </div>

                    <div class="endpoint">
                        <div class="endpoint-header">
                            <div class="method post">POST</div>
                            <div class="endpoint-path">/projects</div>
                            <div class="endpoint-title">Create Project</div>
                        </div>

                        <div class="endpoint-content">
                            <p>Create a new project.</p>

                            <h4>Request Body</h4>
                            <div class="parameters">
                                <div class="parameter required">
                                    <div class="param-name">name</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Project name (1-100 characters)</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">description</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Project description (max 1000 characters)</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">team_id</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">ID of the team to assign the project to</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">due_date</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Due date in ISO 8601 format</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">tags</div>
                                    <div class="param-type">array</div>
                                    <div class="param-description">Array of tag strings</div>
                                </div>
                            </div>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Request</span>
                                    <button class="copy-btn" data-copy="create-project">Copy</button>
                                </div>
                                <pre><code id="create-project">curl -X POST "https://api.taskflow.com/v2/projects" \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mobile App Development",
    "description": "Build iOS and Android mobile applications",
    "team_id": "team_1122334455",
    "due_date": "2025-06-01T00:00:00Z",
    "tags": ["mobile", "ios", "android"]
  }'</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section id="tasks" class="doc-section">
                <h2>Tasks</h2>
                <p>Tasks represent individual work items within projects.</p>

                <div class="endpoint-group">
                    <div class="endpoint">
                        <div class="endpoint-header">
                            <div class="method get">GET</div>
                            <div class="endpoint-path">/projects/{project_id}/tasks</div>
                            <div class="endpoint-title">List Tasks</div>
                        </div>

                        <div class="endpoint-content">
                            <p>Retrieve tasks for a specific project.</p>

                            <h4>Path Parameters</h4>
                            <div class="parameters">
                                <div class="parameter required">
                                    <div class="param-name">project_id</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">The ID of the project</div>
                                </div>
                            </div>

                            <h4>Query Parameters</h4>
                            <div class="parameters">
                                <div class="parameter">
                                    <div class="param-name">status</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Filter by status: todo, in_progress, completed</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">assignee_id</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Filter by assigned user ID</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">priority</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Filter by priority: low, medium, high, urgent</div>
                                </div>
                            </div>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Response</span>
                                    <button class="copy-btn" data-copy="tasks-response">Copy</button>
                                </div>
                                <pre><code id="tasks-response">{
  "data": [
    {
      "id": "task_9876543210",
      "title": "Design homepage mockup",
      "description": "Create wireframes and visual mockups for the new homepage",
      "status": "in_progress",
      "priority": "high",
      "created_at": "2025-01-16T09:15:00Z",
      "updated_at": "2025-01-18T11:30:00Z",
      "due_date": "2025-01-25T17:00:00Z",
      "assignee": {
        "id": "user_1357924680",
        "name": "Jane Smith",
        "email": "jane@company.com"
      },
      "project_id": "proj_1234567890",
      "tags": ["design", "homepage"],
      "time_estimate": 480,
      "time_spent": 240,
      "subtasks": [
        {
          "id": "subtask_1111111111",
          "title": "Create wireframes",
          "completed": true
        },
        {
          "id": "subtask_2222222222",
          "title": "Design visual mockups",
          "completed": false
        }
      ]
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 1,
    "has_more": false
  }
}</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section id="users" class="doc-section">
                <h2>Users</h2>
                <p>Manage user accounts and profiles.</p>

                <div class="endpoint-group">
                    <div class="endpoint">
                        <div class="endpoint-header">
                            <div class="method get">GET</div>
                            <div class="endpoint-path">/users/me</div>
                            <div class="endpoint-title">Get Current User</div>
                        </div>

                        <div class="endpoint-content">
                            <p>Retrieve information about the authenticated user.</p>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Response</span>
                                    <button class="copy-btn" data-copy="user-response">Copy</button>
                                </div>
                                <pre><code id="user-response">{
  "id": "user_0987654321",
  "name": "John Doe",
  "email": "john@company.com",
  "avatar_url": "https://cdn.taskflow.com/avatars/user_0987654321.jpg",
  "role": "admin",
  "created_at": "2024-12-01T10:00:00Z",
  "last_active": "2025-01-20T15:30:00Z",
  "timezone": "America/New_York",
  "preferences": {
    "notifications": {
      "email": true,
      "push": true,
      "desktop": false
    },
    "theme": "light"
  },
  "subscription": {
    "plan": "pro",
    "status": "active",
    "expires_at": "2025-12-01T00:00:00Z"
  }
}</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section id="teams" class="doc-section">
                <h2>Teams</h2>
                <p>Manage teams and team memberships.</p>

                <div class="endpoint-group">
                    <div class="endpoint">
                        <div class="endpoint-header">
                            <div class="method get">GET</div>
                            <div class="endpoint-path">/teams</div>
                            <div class="endpoint-title">List Teams</div>
                        </div>

                        <div class="endpoint-content">
                            <p>Retrieve teams that the authenticated user belongs to.</p>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Response</span>
                                    <button class="copy-btn" data-copy="teams-response">Copy</button>
                                </div>
                                <pre><code id="teams-response">{
  "data": [
    {
      "id": "team_1122334455",
      "name": "Design Team",
      "description": "UI/UX designers and visual artists",
      "created_at": "2024-11-15T08:00:00Z",
      "member_count": 8,
      "project_count": 12,
      "owner": {
        "id": "user_0987654321",
        "name": "John Doe",
        "email": "john@company.com"
      },
      "members": [
        {
          "id": "user_1357924680",
          "name": "Jane Smith",
          "email": "jane@company.com",
          "role": "member",
          "joined_at": "2024-11-20T10:30:00Z"
        }
      ]
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 1,
    "has_more": false
  }
}</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section id="webhooks" class="doc-section">
                <h2>Webhooks</h2>
                <p>Set up real-time notifications for events in your TaskFlow account.</p>

                <div class="webhook-events">
                    <h3>Supported Events</h3>
                    <div class="event-grid">
                        <div class="event-item">
                            <div class="event-name">project.created</div>
                            <div class="event-description">New project created</div>
                        </div>
                        <div class="event-item">
                            <div class="event-name">project.updated</div>
                            <div class="event-description">Project details changed</div>
                        </div>
                        <div class="event-item">
                            <div class="event-name">task.created</div>
                            <div class="event-description">New task created</div>
                        </div>
                        <div class="event-item">
                            <div class="event-name">task.completed</div>
                            <div class="event-description">Task marked as completed</div>
                        </div>
                        <div class="event-item">
                            <div class="event-name">user.invited</div>
                            <div class="event-description">User invited to team</div>
                        </div>
                        <div class="event-item">
                            <div class="event-name">comment.added</div>
                            <div class="event-description">Comment added to task</div>
                        </div>
                    </div>
                </div>

                <div class="endpoint-group">
                    <div class="endpoint">
                        <div class="endpoint-header">
                            <div class="method post">POST</div>
                            <div class="endpoint-path">/webhooks</div>
                            <div class="endpoint-title">Create Webhook</div>
                        </div>

                        <div class="endpoint-content">
                            <p>Create a new webhook endpoint.</p>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Request</span>
                                    <button class="copy-btn" data-copy="webhook-create">Copy</button>
                                </div>
                                <pre><code id="webhook-create">curl -X POST "https://api.taskflow.com/v2/webhooks" \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/taskflow",
    "events": ["task.created", "task.completed"],
    "secret": "your_webhook_secret"
  }'</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section id="search" class="doc-section">
                <h2>Search</h2>
                <p>Search across projects, tasks, and other resources.</p>

                <div class="endpoint-group">
                    <div class="endpoint">
                        <div class="endpoint-header">
                            <div class="method get">GET</div>
                            <div class="endpoint-path">/search</div>
                            <div class="endpoint-title">Search Resources</div>
                        </div>

                        <div class="endpoint-content">
                            <p>Perform a full-text search across your TaskFlow data.</p>

                            <h4>Query Parameters</h4>
                            <div class="parameters">
                                <div class="parameter required">
                                    <div class="param-name">q</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Search query</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">type</div>
                                    <div class="param-type">string</div>
                                    <div class="param-description">Resource type: projects, tasks, users, teams</div>
                                </div>
                                <div class="parameter">
                                    <div class="param-name">limit</div>
                                    <div class="param-type">integer</div>
                                    <div class="param-description">Number of results (1-50, default: 10)</div>
                                </div>
                            </div>

                            <div class="code-example">
                                <div class="code-header">
                                    <span class="code-title">Example Request</span>
                                    <button class="copy-btn" data-copy="search-request">Copy</button>
                                </div>
                                <pre><code id="search-request">curl -X GET "https://api.taskflow.com/v2/search?q=design&type=tasks&limit=5" \
  -H "Authorization: Bearer your_api_key_here"</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section id="sdks" class="doc-section">
                <h2>SDKs</h2>
                <p>Official SDKs and libraries for popular programming languages.</p>

                <div class="sdk-grid">
                    <div class="sdk-card">
                        <div class="sdk-icon">🟨</div>
                        <h3>JavaScript/Node.js</h3>
                        <p>Official JavaScript SDK for browser and Node.js applications.</p>
                        <div class="sdk-install">
                            <code>npm install @taskflow/sdk</code>
                        </div>
                        <div class="sdk-links">
                            <a href="#" class="sdk-link">Documentation</a>
                            <a href="#" class="sdk-link">GitHub</a>
                        </div>
                    </div>

                    <div class="sdk-card">
                        <div class="sdk-icon">🐍</div>
                        <h3>Python</h3>
                        <p>Official Python SDK with async support.</p>
                        <div class="sdk-install">
                            <code>pip install taskflow-sdk</code>
                        </div>
                        <div class="sdk-links">
                            <a href="#" class="sdk-link">Documentation</a>
                            <a href="#" class="sdk-link">PyPI</a>
                        </div>
                    </div>

                    <div class="sdk-card">
                        <div class="sdk-icon">☕</div>
                        <h3>Java</h3>
                        <p>Official Java SDK for enterprise applications.</p>
                        <div class="sdk-install">
                            <code>implementation 'com.taskflow:sdk:2.1.0'</code>
                        </div>
                        <div class="sdk-links">
                            <a href="#" class="sdk-link">Documentation</a>
                            <a href="#" class="sdk-link">Maven Central</a>
                        </div>
                    </div>

                    <div class="sdk-card">
                        <div class="sdk-icon">🔷</div>
                        <h3>Go</h3>
                        <p>Official Go SDK with full API coverage.</p>
                        <div class="sdk-install">
                            <code>go get github.com/taskflow/go-sdk</code>
                        </div>
                        <div class="sdk-links">
                            <a href="#" class="sdk-link">Documentation</a>
                            <a href="#" class="sdk-link">GitHub</a>
                        </div>
                    </div>
                </div>
            </section>

            <section id="changelog" class="doc-section">
                <h2>Changelog</h2>
                <p>Recent updates and changes to the TaskFlow API.</p>

                <div class="changelog">
                    <div class="changelog-entry">
                        <div class="changelog-date">2025-01-15</div>
                        <div class="changelog-version">v2.1.0</div>
                        <div class="changelog-content">
                            <h4>New Features</h4>
                            <ul>
                                <li>Added search endpoint with full-text search capabilities</li>
                                <li>Introduced webhook support for real-time notifications</li>
                                <li>Added subtasks support in task objects</li>
                            </ul>
                            <h4>Improvements</h4>
                            <ul>
                                <li>Increased rate limits for Pro and Enterprise tiers</li>
                                <li>Enhanced error messages with more detailed information</li>
                                <li>Added time tracking fields to tasks</li>
                            </ul>
                        </div>
                    </div>

                    <div class="changelog-entry">
                        <div class="changelog-date">2024-12-20</div>
                        <div class="changelog-version">v2.0.0</div>
                        <div class="changelog-content">
                            <h4>Breaking Changes</h4>
                            <ul>
                                <li>Updated authentication to use Bearer tokens</li>
                                <li>Changed date format to ISO 8601</li>
                                <li>Renamed several field names for consistency</li>
                            </ul>
                            <h4>New Features</h4>
                            <ul>
                                <li>Added teams endpoint</li>
                                <li>Introduced pagination for all list endpoints</li>
                                <li>Added OAuth 2.0 support</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </section>

            <section id="support" class="doc-section">
                <h2>Support</h2>
                <p>Get help with the TaskFlow API.</p>

                <div class="support-options">
                    <div class="support-option">
                        <div class="support-icon">📚</div>
                        <h3>Documentation</h3>
                        <p>Comprehensive guides and tutorials</p>
                        <a href="#" class="support-link">View Docs</a>
                    </div>

                    <div class="support-option">
                        <div class="support-icon">đŸ’Ŧ</div>
                        <h3>Community Forum</h3>
                        <p>Ask questions and share knowledge</p>
                        <a href="#" class="support-link">Join Forum</a>
                    </div>

                    <div class="support-option">
                        <div class="support-icon">đŸŽĢ</div>
                        <h3>Support Tickets</h3>
                        <p>Get direct help from our team</p>
                        <a href="contact.html" class="support-link">Contact Support</a>
                    </div>

                    <div class="support-option">
                        <div class="support-icon">📊</div>
                        <h3>API Status</h3>
                        <p>Check current API status and uptime</p>
                        <a href="status.html" class="support-link">View Status</a>
                    </div>
                </div>
            </section>
        </main>
    </div>

    <div class="api-tester" id="apiTester">
        <div class="tester-header">
            <h3>API Tester</h3>
            <button class="close-btn" id="closeTester">×</button>
        </div>
        <div class="tester-content">
            <div class="tester-form">
                <div class="form-group">
                    <label>Method</label>
                    <select id="testMethod">
                        <option value="GET">GET</option>
                        <option value="POST">POST</option>
                        <option value="PUT">PUT</option>
                        <option value="DELETE">DELETE</option>
                    </select>
                </div>
                <div class="form-group">
                    <label>Endpoint</label>
                    <input type="text" id="testEndpoint" placeholder="/projects">
                </div>
                <div class="form-group">
                    <label>Headers</label>
                    <textarea id="testHeaders" rows="3">Authorization: Bearer your_api_key_here
Content-Type: application/json</textarea>
                </div>
                <div class="form-group">
                    <label>Request Body</label>
                    <textarea id="testBody" rows="5" placeholder='{"name": "Test Project"}'></textarea>
                </div>
                <button class="btn btn-primary" id="sendRequest">Send Request</button>
            </div>
            <div class="tester-response">
                <h4>Response</h4>
                <div class="response-status" id="responseStatus"></div>
                <pre id="responseBody"></pre>
            </div>
        </div>
    </div>

    <div class="toast" id="toast">
        <div class="toast-content">
            <span class="toast-icon">✓</span>
            <span class="toast-message"></span>
        </div>
    </div>

    <script src="api-docs-script.js"></script>
</body>
</html>