Skip to content

API reference

Save the sending setting

Other routes API

PUT/v1/sending

automatic emails an invoice by itself once its check is filed, when it is made for a customer delivered by email (deliveryPlan.delivery.channel is email) and its verdict is one of verdicts. A rejected invoice is never sent. duplicates says what happens to a likely duplicate: hold (the default) keeps it until a person keeps or dismisses it, and send lets it go, its warning kept on the invoice. The same applies to an invoice mailed to the send address. A customer’s own delivery.sending overrides mode for that customer. The setting is copied into each invoice’s plan when it is filed, so a change applies from the next invoice and never to one already filed. A signed-in person or an API key may save it.

Request body

application/json, required

  • modestringRequired
    One of by-hand, automatic.
  • verdictsarray

    Which verdicts go out by themselves. Default ["clean"].

  • duplicatesstring

    What happens to a likely duplicate. Default hold.

    One of hold, send.

Response

A 200 answer carries these fields.

  • modestringRequired
    One of by-hand, automatic.
  • verdictsarray of stringRequired
  • duplicatesstringRequired

    hold keeps a likely duplicate for a person; send lets it go with its warning.

    One of hold, send.
  • versionintegerRequired

    0 when nobody chose.

Status codes

Status Meaning
200 The saved version.
400 An unknown mode or duplicates choice, verdicts other than the two choices, or another key (invalid_sending). Nothing was saved.
401 No usable credential was sent (invalid_credentials).
503 No database is configured (store_unavailable).
PUT/v1/sending
Example
curl -X PUT https://api.certinvo.com/v1/sending \
  -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/sending`, {
  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/sending",
    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
{
  "mode": "by-hand",
  "verdicts": [
    "clean"
  ],
  "duplicates": "hold",
  "version": 0
}
Success response
PUT
/v1/sending
Save the sending setting
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/sending" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "by-hand",
  "verdicts": [],
  "duplicates": "hold"
}...'
Response

No request sent yet

Configure parameters and click Send to view the response.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close