{
"openapi": "3.0.2",
"info": {
"title": "Klaviyo API",
"version": "2026-10-15",
"description": "The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.",
"contact": {
"name": "Klaviyo Developer Experience Team",
"email": "developers@klaviyo.com",
"url": "https://developers.klaviyo.com"
},
"termsOfService": "https://www.klaviyo.com/legal/api-terms",
"license": {
"name": "License",
"url": "https://www.klaviyo.com/legal"
}
},
"servers": [
{
"url": "https://a.klaviyo.com",
"description": "Production"
}
],
"security": [
{
"Klaviyo-API-Key": []
}
],
"paths": {
"/api/template-conversion-jobs": {
"post": {
"operationId": "create_template_conversion_job",
"summary": "Create Template Conversion Job",
"description": "Convert an HTML template into a new drag-and-drop template.\n\nThe job runs asynchronously. Poll the job until its status is `complete` or `failed`. When complete, `converted-template` is the new template. Rate limited to 1 request per minute.\n\nRequires an account on a paid plan; other accounts get a 403.
*Rate limits*:
Burst: `1/s`
Steady: `1/m`\n\n**Scopes:**\n`templates:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_template_conversion_job.json)",
"parameters": [
{
"name": "fields[template-conversion-job]",
"in": "query",
"description": "For more information please visit https://developers.klaviyo.com/en/v2026-10-15/reference/api-overview#sparse-fieldsets",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"completed_at",
"created_at",
"error",
"id",
"status"
]
}
},
"explode": false
},
{
"name": "revision",
"in": "header",
"description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
"required": true,
"schema": {
"type": "string",
"default": "2026-10-15"
}
}
],
"requestBody": {
"description": "Convert an HTML template into a new drag-and-drop template.",
"required": true,
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/TemplateConversionJobCreateQuery"
}
}
}
},
"responses": {
"202": {
"description": "Success",
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/PostTemplateConversionJobResponse"
}
}
}
},
"4XX": {
"$ref": "#/components/responses/ClientError"
},
"5XX": {
"$ref": "#/components/responses/ServerError"
}
},
"tags": [
"Templates"
],
"x-klaviyo-pre-release": "None",
"x-klaviyo-ratelimit": {
"burst": "1/s",
"steady": "1/m"
},
"x-klaviyo-scopes": [
"templates:write"
]
}
}
},
"components": {
"responses": {
"ClientError": {
"description": "Client Error",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"code",
"title",
"detail"
],
"properties": {
"id": {
"type": "string"
},
"code": {
"type": "string"
},
"title": {
"type": "string"
},
"detail": {
"type": "string"
},
"source": {
"type": "object",
"properties": {
"pointer": {
"type": "string"
},
"parameter": {
"type": "string"
}
}
}
}
}
}
},
"required": [
"errors"
]
}
}
}
},
"ServerError": {
"description": "Server Error",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"code",
"title",
"detail"
],
"properties": {
"id": {
"type": "string"
},
"code": {
"type": "string"
},
"title": {
"type": "string"
},
"detail": {
"type": "string"
},
"source": {
"type": "object",
"properties": {
"pointer": {
"type": "string"
},
"parameter": {
"type": "string"
}
}
}
}
}
}
},
"required": [
"errors"
]
}
}
}
}
},
"schemas": {
"AgentHints": {
"description": "Optional hints emitted by the API for agent callers",
"type": "object",
"properties": {
"next_steps": {
"description": "Suggested follow-up actions for agents to take after this response",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ObjectLinks": {
"type": "object",
"properties": {
"self": {
"type": "string",
"format": "uri"
}
},
"required": [
"self"
]
},
"PostTemplateConversionJobResponse": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/TemplateConversionJobEnum"
},
"id": {
"description": "ID of the conversion job.",
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"status": {
"description": "The status of the job.",
"type": "string",
"enum": [
"complete",
"failed",
"processing",
"queued"
]
},
"created_at": {
"description": "Datetime when the job was created.",
"type": "string",
"format": "date-time",
"example": "2022-11-08T00:00:00+00:00"
},
"error": {
"description": "Why the conversion failed. Null unless the status is failed.",
"type": "string",
"nullable": true
},
"completed_at": {
"description": "Datetime when the job completed or failed.",
"type": "string",
"format": "date-time",
"example": "2022-11-08T00:00:00+00:00",
"nullable": true
}
},
"required": [
"status",
"created_at"
]
},
"relationships": {
"type": "object",
"properties": {
"source-template": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/TemplateEnum"
},
"id": {
"description": "The HTML template being converted.",
"type": "string"
}
},
"required": [
"type",
"id"
]
},
"links": {
"$ref": "#/components/schemas/RelationshipLinks"
}
}
},
"converted-template": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/TemplateEnum"
},
"id": {
"description": "The drag-and-drop template created by the conversion. Absent until the status is complete.",
"type": "string"
}
},
"required": [
"type",
"id"
]
},
"links": {
"$ref": "#/components/schemas/RelationshipLinks"
}
}
}
}
},
"links": {
"$ref": "#/components/schemas/ObjectLinks"
}
},
"required": [
"type",
"id",
"attributes",
"links"
]
},
"links": {
"$ref": "#/components/schemas/ObjectLinks"
},
"meta": {
"$ref": "#/components/schemas/ResponseMeta"
}
},
"required": [
"data"
]
},
"RelationshipLinks": {
"type": "object",
"properties": {
"self": {
"type": "string",
"format": "uri"
},
"related": {
"type": "string",
"format": "uri"
}
},
"required": [
"self",
"related"
]
},
"ResponseMeta": {
"description": "Response-level metadata",
"type": "object",
"properties": {
"agent_hints": {
"$ref": "#/components/schemas/AgentHints"
}
}
},
"TemplateConversionJobCreateQuery": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/TemplateConversionJobCreateQueryResourceObject"
}
},
"required": [
"data"
]
},
"TemplateConversionJobCreateQueryResourceObject": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/TemplateConversionJobEnum"
},
"relationships": {
"type": "object",
"properties": {
"source-template": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/TemplateEnum"
},
"id": {
"description": "The HTML template to convert.",
"type": "string"
}
},
"required": [
"type",
"id"
]
}
}
}
},
"required": [
"source-template"
]
}
},
"required": [
"type",
"relationships"
]
},
"TemplateConversionJobEnum": {
"type": "string",
"enum": [
"template-conversion-job"
]
},
"TemplateEnum": {
"type": "string",
"enum": [
"template"
]
}
},
"securitySchemes": {
"Klaviyo-API-Key": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Private key authentication for /api/ endpoints is performed by setting the `Authorization` header to `Klaviyo-API-Key your-private-api-key`
For more information please visit https://developers.klaviyo.com/en/v2026-10-15/reference/api-overview#authentication",
"x-default": "Klaviyo-API-Key your-private-api-key"
}
}
},
"tags": [
{
"name": "Templates",
"description": "templates"
}
]
}