Skip to main content

Using the SDK

The @usenotra/sdk package includes its types, so you can import them directly. Every method has <Method>Params and <Method>Result types, and every schema in the OpenAPI document is exported by name:
The SDK ships with full type definitions, so you do not need to maintain your own, and you only need the types below if you call the API with raw fetch.
The SDK covers every endpoint, including GEO. Without it, the OpenAPI document is the source of truth, and tools such as openapi-typescript can turn it into a complete set of types.

Using fetch

If you call the post endpoints directly with fetch, these types match the current responses:

Type definitions

Copy these types into your project:
Copy these type definitions into a types/notra.ts file in your project.

Zod schemas

Use these Zod schemas for runtime validation. Their request limits match the API:
  • Titles up to 120 characters.
  • Slugs up to 160 characters of lowercase letters, numbers and hyphens.
  • Markdown up to 100,000 characters.
  • At least one field per update, and at least one field inside metadata when you send it.
  • Up to 12 tags of 40 characters, up to 5 authors, excerpts up to 300 characters and cover alt text up to 300 characters.
Last modified on November 11, 2026