---
title: "List a template's input contracts"
method: GET
path: "/v1/templates/{id}/input-contracts"
tags: ["Templates"]
---

# List a template's input contracts

`GET /v1/templates/{id}/input-contracts`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/templates/{id}/input-contracts`
- Auth: API key in header `x-api-key`

Returns the immutable input contracts this template has published under, newest version first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Send against a contract to follow later publications that validate input identically.

## Path parameters

- `id` string, required

## Query parameters

- `limit` string, nullable
- `cursor` string

## Response `200`

TemplateInputContractPage

- TemplateInputContractPage
  - `items` object[], required
    - `id` string, required
    - `organizationId` string, required
    - `templateId` string, required
    - `version` integer, required
    - `validationDigest` string, required
    - `schema` object, required
    - `createdAt` string, required
  - `nextCursor` string, nullable, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
