API reference
Klype API reference
Klype is a GTM and content intelligence platform with a REST API and an MCP server. The API gives your CRM, scripts or agents the same workspace context, drafting, pre-publish check and approval record as the app. Nothing in it can publish: a person approves and posts every post.
Base URL
https://api.klype.ai/api/v1/platform
Requests and responses are JSON. Send Content-Type: application/json with a body.
Authentication
- Create an API key on the Connections page in the Klype app. Keys start with
klp_live_, are shown once and stored only as a SHA-256 hash, so a lost key cannot be recovered; issue a new one. - Send it on every request:
Authorization: Bearer klp_live_... - Up to 10 active keys per account. Revoking a key takes effect immediately.
- Access tokens from apps connected through OAuth (
klp_at_...) work the same way. - Keys only reach the API and MCP endpoints, never billing, account or admin routes.
Scopes
| Scope | Allows |
|---|---|
context:read | List workspaces, read context, run the check, read insights |
drafts:write | Draft posts, report outcomes, fix checked text, record approvals |
approvals:read | Read the approval record |
A key created without a scope list gets all three.
Endpoints
GET /platform/workspaces
Lists the workspaces (businesses) the key owner can draft for.
No parameters.
Response
Array of { id, name, description }. description may be null.
curl https://api.klype.ai/api/v1/platform/workspaces \
-H "Authorization: Bearer $KLYPE_KEY"GET /platform/workspaces/{id}/context
Returns the saved product, buyer and voice context for one workspace.
Path: id, workspace UUID.
Response
{ workspaceId, sections: [ { key, content, updatedAt } ] }. Each content is cut at 4,000 characters.
curl https://api.klype.ai/api/v1/platform/workspaces/WORKSPACE_ID/context \
-H "Authorization: Bearer $KLYPE_KEY"POST /platform/drafts
Drafts a post in the owner's measured voice. Never publishes.
Body
briefstring, required, up to 4,000 characters: what the post is about.platformone of linkedin (default), twitter, instagram, facebook, reddit.workspaceIdUUID, optional.toneone of professional, conversational, inspiring, educational, storytelling, humorous.contextstring, up to 4,000 characters: facts, numbers or links to include.
Response
{ generationId, platform, draft, published: false, next }. Keep generationId to report the outcome.
curl -X POST https://api.klype.ai/api/v1/platform/drafts \
-H "Authorization: Bearer $KLYPE_KEY" \
-H "Content-Type: application/json" \
-d '{"brief":"Why we dropped our free plan","platform":"linkedin","tone":"storytelling"}'POST /platform/drafts/{generationId}/outcome
Reports that a draft was used (possibly edited) or discarded. A use enters the approval record with how much was changed.
Path: generationId from POST /drafts.
Body
actionrequired:usedordiscarded.finalTextup to 20,000 characters: the text actually posted.sourceoptional:apiorchrome_extension.
Response
{ recorded: true, outcome, editRatio }
curl -X POST https://api.klype.ai/api/v1/platform/drafts/GENERATION_ID/outcome \
-H "Authorization: Bearer $KLYPE_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"used","finalText":"The version I posted..."}'POST /platform/review
Checks any text against the owner's measured voice, saved facts, machine-writing patterns and publishing rules.
Body
textstring, required, about a sentence (20 characters) up to 12,000 characters.workspaceIdUUID, optional; defaults to the first workspace.platformone of linkedin, twitter, instagram, facebook, reddit, email, blog, other.sourceTextup to 4,000 characters: facts the owner supplied; figures in it count as sourced.
Response
{ reviewId, text, score, verdict, summary, voice, aiPatterns, claims, rules, fixes, workspaceId, wordCount, checkedAt }. score is 0 to 100; verdict is ready, needs_changes or blocked; aiPatterns is a list of { pattern, detail }; fixes is a list of strings.
curl -X POST https://api.klype.ai/api/v1/platform/review \
-H "Authorization: Bearer $KLYPE_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Paste the full draft here.","platform":"linkedin"}'POST /platform/review/{reviewId}/fix
Rewrites checked text to fix exactly what the check found, in the owner's voice, then checks it again.
Path: reviewId from POST /review. No body.
Response
The same shape as POST /review, for the rewritten text, with a new reviewId.
curl -X POST https://api.klype.ai/api/v1/platform/review/REVIEW_ID/fix \
-H "Authorization: Bearer $KLYPE_KEY"POST /platform/review/{reviewId}/approve
Records that the owner approved the checked text. Does not publish.
Path: reviewId.
Body
finalTextoptional, up to 20,000 characters: the exact text approved if it changed after the check.
Response
{ approved: true, sequence, entryHash, verdictAtApproval, scoreAtApproval }
curl -X POST https://api.klype.ai/api/v1/platform/review/REVIEW_ID/approve \
-H "Authorization: Bearer $KLYPE_KEY" \
-H "Content-Type: application/json" \
-d '{}'GET /platform/insights
What has worked for the owner, from imported post results over the last 180 days.
Query: workspaceId optional.
Response
{ windowDays, posts, withRates, medianImpressions, medianEngagementRate, linkedToApprovals, findings, comparisons, bestDays, topPosts }. findings is a list of plain-language statements.
curl "https://api.klype.ai/api/v1/platform/insights?workspaceId=WORKSPACE_ID" \
-H "Authorization: Bearer $KLYPE_KEY"GET /platform/approvals
The owner's approval record, newest first.
Query: limit 1 to 500, default 50.
Response
Array of entries with sequence, createdAt, action, actor, platform, aiAssisted, editRatio, wordCount, postId, generationId, productId, contentHash, prevHash, entryHash. Each entry carries the hash of the one before it, so the record is tamper-evident.
curl "https://api.klype.ai/api/v1/platform/approvals?limit=20" \
-H "Authorization: Bearer $KLYPE_KEY"Errors
Errors use standard HTTP status codes with a JSON body:
{
"statusCode": 403,
"message": "This API key is missing the drafts:write scope",
"error": "Forbidden"
}
400: invalid input. Validation errors returnmessageas a list. Unknown body fields are rejected.401: missing, invalid or revoked key.403: the key lacks the scope the endpoint needs.404: the workspace, draft or review is not on your account.429: rate limit reached.
Rate limits
- Every request: 10 a second, 120 a minute, 1,000 an hour.
POST /draftsandPOST /review/{reviewId}/fix: 120 an hour.POST /review: 240 an hour.- Drafting also uses your plan's allowance, the same as drafting in the app.
Related
Klype MCP server for Claude, ChatGPT, Cursor and VS Code · About Klype · Start the 7-day trial