Skip to content

Commit b77074e

Browse files
docs: add HITL webhook authentication examples
1 parent 7d5cd4d commit b77074e

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

docs/en/learn/human-in-the-loop.mdx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,45 @@ Human-in-the-Loop (HITL) is a powerful approach that combines artificial intelli
2222
<Frame>
2323
<img src="/images/enterprise/crew-webhook-url.png" alt="Crew Webhook URL" />
2424
</Frame>
25+
26+
Example with Bearer authentication:
27+
```bash
28+
curl -X POST {BASE_URL}/kickoff \
29+
-H "Authorization: Bearer YOUR_API_TOKEN" \
30+
-H "Content-Type: application/json" \
31+
-d '{
32+
"inputs": {
33+
"topic": "AI Research"
34+
},
35+
"humanInputWebhook": {
36+
"url": "https://your-webhook.com/hitl",
37+
"authentication": {
38+
"strategy": "bearer",
39+
"token": "your-webhook-secret-token"
40+
}
41+
}
42+
}'
43+
```
44+
45+
Or with Basic authentication:
46+
```bash
47+
curl -X POST {BASE_URL}/kickoff \
48+
-H "Authorization: Bearer YOUR_API_TOKEN" \
49+
-H "Content-Type: application/json" \
50+
-d '{
51+
"inputs": {
52+
"topic": "AI Research"
53+
},
54+
"humanInputWebhook": {
55+
"url": "https://your-webhook.com/hitl",
56+
"authentication": {
57+
"strategy": "basic",
58+
"username": "your-username",
59+
"password": "your-password"
60+
}
61+
}
62+
}'
63+
```
2564
</Step>
2665

2766
<Step title="Receive Webhook Notification">
@@ -76,4 +115,4 @@ HITL workflows are particularly valuable for:
76115
- Complex decision-making scenarios
77116
- Sensitive or high-stakes operations
78117
- Creative tasks requiring human judgment
79-
- Compliance and regulatory reviews
118+
- Compliance and regulatory reviews

0 commit comments

Comments
 (0)