| name | grammarly-webhooks-events |
| description | Implement Grammarly webhook signature validation and event handling.
Use when setting up webhook endpoints, implementing signature verification,
or handling Grammarly event notifications securely.
Trigger with phrases like "grammarly webhook", "grammarly events",
"grammarly webhook signature", "handle grammarly events", "grammarly notifications".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*) |
| version | 1.8.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","grammarly","writing"] |
| compatibility | Designed for Claude Code |
Grammarly Webhooks & Events
Overview
Grammarly's current API is request/response based — there are no push webhooks. For async operations (plagiarism detection), you poll for results. Build your own event system around Grammarly API results.
Instructions
Step 1: Plagiarism Polling with Callback
async function plagiarismWithCallback(
text: string,
token: string,
onComplete: (result: any) => void
) {
const createRes = await fetch('https://api.grammarly.com/ecosystem/api/v1/plagiarism', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ text }),
});
const { id } = await createRes.json();
const poll = async () => {
const res = await fetch(`https://api.grammarly.com/ecosystem/api/v1/plagiarism/${id}`, {
headers: { 'Authorization': `Bearer ${token}` },
});
const result = await res.json();
(result. === ) { (poll, ); ; }
(result);
};
();
}