> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useautumn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Invoice Templates

> Lists the organization's invoice templates, newest first, with offset pagination. Use a template's `id` as `invoice_template_id` when creating or reissuing an invoice.

export const DynamicResponseExample = ({json, statusCode = "200"}) => {
  const toCamelCase = str => {
    return str.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
  };
  const convertKeysToCamelCase = obj => {
    if (Array.isArray(obj)) {
      return obj.map(item => convertKeysToCamelCase(item));
    }
    if (obj !== null && typeof obj === "object") {
      return Object.keys(obj).reduce((acc, key) => {
        const camelKey = toCamelCase(key);
        acc[camelKey] = convertKeysToCamelCase(obj[key]);
        return acc;
      }, {});
    }
    return obj;
  };
  const [isTypeScript, setIsTypeScript] = useState(() => {
    if (typeof window !== "undefined") {
      try {
        const lang = localStorage.getItem("code");
        return JSON.parse(lang) === "typescript";
      } catch {
        return true;
      }
    }
    return true;
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      if (event.detail?.key === "code") {
        try {
          const value = JSON.parse(event.detail.value);
          setIsTypeScript(value === "typescript");
        } catch {}
      }
    };
    const pollInterval = setInterval(() => {
      try {
        const lang = localStorage.getItem("code");
        const value = JSON.parse(lang);
        setIsTypeScript(value === "typescript");
      } catch {}
    }, 300);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, []);
  const camelCaseJson = useMemo(() => convertKeysToCamelCase(json), [json]);
  const snakeCaseString = JSON.stringify(json, null, 2);
  const camelCaseString = JSON.stringify(camelCaseJson, null, 2);
  return <ResponseExample>
			{isTypeScript ? <CodeBlock language="json" filename={statusCode}>
					{camelCaseString}
				</CodeBlock> : <CodeBlock language="json" filename={statusCode}>
					{snakeCaseString}
				</CodeBlock>}
		</ResponseExample>;
};

export const DynamicResponseField = ({children, name, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedName = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(name) : name;
    } catch {
      return name;
    }
  }, [name, lang]);
  return <ResponseField name={resolvedName} {...props}>
			{children}
		</ResponseField>;
};

export const DynamicParamField = ({children, body, path, ...props}) => {
  const convertToCamelCase = str => {
    if (typeof str !== "string") return str;
    return str.replace(/[_-](\w)/g, (_, c) => c.toUpperCase());
  };
  const [lang, setLang] = useState(() => {
    if (typeof window !== "undefined") {
      const stored = localStorage.getItem("code");
      return stored || '"typescript"';
    }
    return '"typescript"';
  });
  useEffect(() => {
    const onMintlifyStorage = event => {
      const key = event.detail?.key;
      if (key === "code") {
        setLang(event.detail.value);
      }
    };
    const pollInterval = setInterval(() => {
      const current = localStorage.getItem("code");
      if (current && current !== lang) {
        setLang(current);
      }
    }, 500);
    document.addEventListener("mintlify-localstorage", onMintlifyStorage);
    return () => {
      document.removeEventListener("mintlify-localstorage", onMintlifyStorage);
      clearInterval(pollInterval);
    };
  }, [lang]);
  const resolvedBody = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(body) : body;
    } catch {
      return body;
    }
  }, [body, lang]);
  const resolvedPath = useMemo(() => {
    try {
      const value = JSON.parse(lang);
      const useCamelCase = value === "typescript";
      return useCamelCase ? convertToCamelCase(path) : path;
    } catch {
      return path;
    }
  }, [path, lang]);
  return <ParamField body={resolvedBody} path={resolvedPath} {...props}>
			{children}
		</ParamField>;
};

### Body Parameters

<DynamicParamField body="offset" type="integer">
  Number of items to skip
</DynamicParamField>

<DynamicParamField body="limit" type="integer">
  Number of items to return. Default 10, max 1000.
</DynamicParamField>

### Response

<DynamicResponseField name="list" type="object[]">
  Invoice templates, newest first.

  <Expandable title="properties">
    <DynamicResponseField name="id" type="string">
      Unique identifier for the invoice template.
    </DynamicResponseField>

    <DynamicResponseField name="name" type="string">
      User-defined name to distinguish this template when sending an invoice.
    </DynamicResponseField>

    <DynamicResponseField name="footer" type="string">
      Footer text rendered on the invoice, typically bank details so customers can pay directly.
    </DynamicResponseField>

    <DynamicResponseField name="memo" type="string">
      Memo shown near the top of the invoice (Stripe invoice description), e.g. a contact line for payment questions.
    </DynamicResponseField>

    <DynamicResponseField name="net_terms_days" type="integer">
      Default number of days the customer has to pay before the invoice is due. Overridable when sending.
    </DynamicResponseField>

    <DynamicResponseField name="created_at" type="number">
      Timestamp (ms) when the template was created.
    </DynamicResponseField>
  </Expandable>
</DynamicResponseField>

<DynamicResponseField name="total" type="number">
  Number of templates returned in this page.
</DynamicResponseField>

<DynamicResponseField name="limit" type="number" />

<DynamicResponseField name="offset" type="number" />

<DynamicResponseField name="has_more" type="boolean">
  Whether more templates exist after this page.
</DynamicResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "list": [
      {
        "id": "inv_tmpl_2b3c4d5e6f7g8h",
        "name": "Bank transfer",
        "footer": "Pay by wire to IBAN GB00 EXAM 0000 0000 0000 00",
        "memo": "Questions? billing@example.com",
        "net_terms_days": 30,
        "created_at": 1759247877000
      }
    ],
    "total": 1,
    "limit": 10,
    "offset": 0,
    "has_more": false
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi POST /v1/invoices.listTemplates
openapi: 3.1.0
info:
  title: Autumn API
  version: 2.4.0
servers:
  - url: https://api.useautumn.com
    description: Production server
security:
  - secretKey: []
paths:
  /v1/invoices.listTemplates:
    post:
      tags:
        - invoices
      description: >-
        Lists the organization's invoice templates, newest first, with offset
        pagination. Use a template's `id` as `invoice_template_id` when creating
        or reissuing an invoice.
      operationId: listInvoiceTemplates
      parameters:
        - name: x-api-version
          in: header
          required: true
          schema:
            type: string
            default: 2.4.0
          x-speakeasy-globals-hidden: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                offset:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                  default: 0
                  description: Number of items to skip
                limit:
                  type: integer
                  minimum: 1
                  maximum: 1000
                  default: 10
                  description: Number of items to return. Default 10, max 1000.
              additionalProperties: false
              title: ListInvoiceTemplatesParams
              description: Parameters for listing an organization's invoice templates.
              examples:
                - limit: 10
                  offset: 0
            example:
              limit: 10
              offset: 0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  list:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the invoice template.
                        name:
                          type: string
                          description: >-
                            User-defined name to distinguish this template when
                            sending an invoice.
                        footer:
                          type: string
                          description: >-
                            Footer text rendered on the invoice, typically bank
                            details so customers can pay directly.
                        memo:
                          type: string
                          description: >-
                            Memo shown near the top of the invoice (Stripe
                            invoice description), e.g. a contact line for
                            payment questions.
                        net_terms_days:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          exclusiveMinimum: 0
                          description: >-
                            Default number of days the customer has to pay
                            before the invoice is due. Overridable when sending.
                        created_at:
                          type: number
                          description: Timestamp (ms) when the template was created.
                      required:
                        - id
                        - name
                    description: Invoice templates, newest first.
                  total:
                    type: number
                    description: Number of templates returned in this page.
                  limit:
                    type: number
                  offset:
                    type: number
                  has_more:
                    type: boolean
                    description: Whether more templates exist after this page.
                required:
                  - list
                  - total
                  - limit
                  - offset
                  - has_more
                examples:
                  - list:
                      - id: inv_tmpl_2b3c4d5e6f7g8h
                        name: Bank transfer
                        footer: Pay by wire to IBAN GB00 EXAM 0000 0000 0000 00
                        memo: Questions? billing@example.com
                        net_terms_days: 30
                        created_at: 1759247877000
                    total: 1
                    limit: 10
                    offset: 0
                    has_more: false
              example:
                list:
                  - id: inv_tmpl_2b3c4d5e6f7g8h
                    name: Bank transfer
                    footer: Pay by wire to IBAN GB00 EXAM 0000 0000 0000 00
                    memo: Questions? billing@example.com
                    net_terms_days: 30
                    created_at: 1759247877000
                total: 1
                limit: 10
                offset: 0
                has_more: false
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { Autumn } from 'autumn-js'

            const autumn = new Autumn()

            const result = await autumn.invoices.listTemplates({});
        - lang: python
          label: Python (SDK)
          source: |-
            from autumn_sdk import Autumn

            autumn = Autumn(secret_key="am_sk_test...")

            res = autumn.invoices.list_templates(offset=0, limit=10)
components:
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````