Skip to content

API reference

Save the invoice email template

Other routes API

PUT/v1/email-template

Saves a subject and a text. Each may use the fields {{rechnungsnummer}}, {{verkaeufer}}, {{kaeufer}}, {{betrag}} and {{faellig}}, filled from the invoice being sent; a fact the invoice does not state is left empty. Any other field is refused. Only a signed-in person can save it.

Request body

application/json, required

  • subjectstringRequired
  • bodystringRequired

Response

A 200 answer carries these fields.

  • subjectstring or nullRequired
  • bodystring or nullRequired
  • versionintegerRequired

    0 when none was saved.

Status codes

Status Meaning
200 The saved version.
400 A field is unknown, a part is empty or too long, or the body names another key (invalid_email_template). Nothing was saved.
401 No usable credential, or not a signed-in person (invalid_credentials, session_required).
503 No database is configured (store_unavailable).
PUT/v1/email-template
Example
curl -X PUT https://api.certinvo.com/v1/email-template \
  -H "Authorization: Bearer $CERTINVO_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @body.json
import { readFile } from 'node:fs/promises'

const response = await fetch(`https://api.certinvo.com/v1/email-template`, {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.CERTINVO_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: await readFile('body.json'),
})
console.log(response.status, await response.json())
import os

import requests

response = requests.put(
    "https://api.certinvo.com/v1/email-template",
    headers={"Authorization": f"Bearer {os.environ['CERTINVO_API_KEY']}", "Content-Type": "application/json"},
    data=open("body.json", "rb"),
)
print(response.status_code, response.text)
200
application/json
{
  "subject": "string",
  "body": "string",
  "version": 0
}
Success response
PUT
/v1/email-template
Save the invoice email template
All
›AuthenticationRequiredBearerAuth

Provide your API key in the Authorization: Bearer <key> header. Keys are stored locally in your browser.

›Headers2
›Bodyapplication/json
›Code Snippet
curl -X PUT "https://api.certinvo.com/v1/email-template" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "subject": "string",
  "body": "string"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close