Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Knock Templates API

The Templates API from Knock — 1 operation(s) for templates.

Knock Templates API is one of 35 APIs that Knock publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 2 JSON Schema definitions.

Tagged areas include Templates. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 2 JSON Schemas.

This API exposes 1 operation across 1 path, and defines 16 schemas. It is described by OpenAPI 3.0.3, at version 1.0.

Requests are made against a single base URL, https://api.knock.app.

1 operations 1 paths 16 schemas 1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.3
API Version
1.0
Server
https://api.knock.app
Authentication
HTTP Bearer
Contact
License
Proprietary
Resource Areas
1

Authentication & Security 1

Knock Templates API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (BearerAuth). By default, every request must be authenticated.

  • BearerAuth — Knock API key as a Bearer token. Use a public key (pk...) for client-side requests or a secret key (sk...) for server-side.

Paths & Operations 1

Across 1 path, the API surfaces 1 operation — 1 POST. Each is listed below with its method, path, parameters, and response codes.

Templates 1
POST
/v1/templates/preview
Preview a template
previewTemplate 2 params body → 200

Schemas 16

The contract defines 16 schemas that model the data the API accepts and returns. The most detailed are PreviewTemplateRequest (8 properties), EmailImageBlock (8 properties), EmailPartialBlock (7 properties), EmailTemplate (6 properties). Each schema is shown below with its type and property counts.

EmailDividerBlock
object
A divider block in an email template.
4 properties 1 required
EmailHtmlBlock
object
An HTML block in an email template.
5 properties 2 required
PreviewTemplateResponse
object
A response to a template preview request.
4 properties 2 required
EmailVisualBlocks
array
The visual blocks that make up the email template.
EmailButtonSetBlock
object
A button set block in an email template.
5 properties 2 required
EmailPartialBlock
object
A partial block in an email template, used to render a reusable partial component.
7 properties 4 required
PreviewTemplateRequest
object
A request to preview a template, without requiring a template to be persisted within Knock.
8 properties 3 required
EmailMarkdownBlock
object
A markdown block in an email template.
6 properties 2 required
PushTemplate
object
A push notification template.
3 properties 3 required
EmailTemplate
object
An email message template.
6 properties 2 required
EmailButtonSetBlockButton
object
A button in a button set block.
5 properties 3 required
InAppFeedTemplate
object
An in-app feed template.
3 properties 1 required
EmailImageBlock
object
An image block in an email template.
8 properties 2 required
SmsTemplate
object
An SMS template.
2 properties 1 required
ChatTemplate
object
A chat template.
3 properties 1 required
RecipientReference
object
A recipient reference, used when referencing a recipient by either their ID (for a user), or by a reference for an object.

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

knock-app-templates-api-openapi.yml Raw ↑

Other APIs Knock publishes across the network.

Knock Outbound Webhooks
Knock Accounts API
Knock API keys API
Knock Audiences API
Knock Branches API
Knock Broadcasts API
Knock Bulk operations API
Knock Channel data API
Knock Channel Groups API
Knock Channels API
Knock Commits API
Knock Email layouts API