Skip to content
This is a new version of the Kivra Developer Docs. Report issues or share feedback at avsandare.support@kivra.se. The previous version can be found here.

Send content

POST
/v2/tenant/{tenantKey}/content
curl --request POST \
--url https://sender.api.kivra.com/v2/tenant/example/content \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "ssn": "191212121212", "subject": "Sample Invoice to User", "generated_at": "2024-12-12", "type": "invoice", "parts": [ { "name": "document.pdf", "data": "REVBREJFRUY=", "content_type": "application/pdf", "responsive_part": { "name": "document.html", "data": "PGgxPmNvbnRlbnQgMTwvaDE+CjxwPmNvbnRlbnQgMTwvcD4=", "content_type": "text/html" } } ], "payment_multiple_options": { "payable": true, "currency": "SEK", "method": "1", "account": "12345", "swish_alias": "1231231234", "options": [ { "due_date": "2017-01-01", "amount": "123.50", "type": "SE_OCR", "reference": "426523791" } ] } }'

Sends content to the specified tenant. This can include documents, invoices, or other types of content that need to be delivered to users or companies within the tenant.

tenantKey
required
string format: hexadecimal

The unique Key for a Tenant

Media typeapplication/json
One of:
booking
object
ssn

User’s unique SSN, according to the YYYYMMDDnnnn format

string
email

A kivra user’s verified email address.

string
subject
required

The subject/title will be visibile in the Recipients Inbox. Keep the subject short and concise (i.e. up to 30-35 characters) to make sure that is fully visible on most screen sizes. Avoid using personal or sensitive information in the subject.

string
generated_at

Optional attribute which denotes when a specific Content was generated at the tenant/integrator’s site. The attribute will be used for sorting in the Kivra user interface, which makes it possible for a tenant or integrator to control the sorting.

string format: ISO8601
type
required

Indicating that the content is a booking/appointement.

Allowed value: booking
parts

Array of file Objects

Array<object>
Parts_Responsive
object
name
required

Arbritrary file-name

string
data
required

Base64-encoded data for the PDF content

string format: Base64-encoded data
content_type
required

The IANA media type for PDF files “application/pdf”

string
responsive_part
object
name
required

Arbritrary file-name

string
data
required

Base64-encoded data for the HTML document

string format: Base64-encoded HTML data
content_type
required

The IANA media type for HTML content “text/html”

string
booking
required
Booking

Optionally specify booking information

object
title
required

Booking name that is used when creating a post in an external calendar. Note! Don’t include any personal or sensitive information here.

string
start_time
required

Date and time for the booking to start. Must be in the future. If the time zone is not stated it will be set to UTC.

string format: ISO8601
end_time

Date and time for the booking to end. If present must be after start_time. If the time zone is not stated it will be set to UTC.

string format: ISO8601
location

Location for the appointment/booking. Address must contain city for full functionality.

string
description

Additional information. Note! Don’t include any personal or sensitive information here.

string
info_url

Link to page with additional information. The url must use the secure HTTPS protocol

string format: uri
campaign
Campaign

Optionally attach a campaign

object
tag
required

The tag that refers to the campaign that you want to attach. Note that the request will still be processed even if the campaign does not exist.

string
Examples
{
"ssn": "191212121212",
"subject": "Sample Invoice to User",
"generated_at": "2024-12-12",
"type": "invoice",
"parts": [
{
"name": "document.pdf",
"data": "REVBREJFRUY=",
"content_type": "application/pdf",
"responsive_part": {
"name": "document.html",
"data": "PGgxPmNvbnRlbnQgMTwvaDE+CjxwPmNvbnRlbnQgMTwvcD4=",
"content_type": "text/html"
}
}
],
"payment_multiple_options": {
"payable": true,
"currency": "SEK",
"method": "1",
"account": "12345",
"swish_alias": "1231231234",
"options": [
{
"due_date": "2017-01-01",
"amount": "123.50",
"type": "SE_OCR",
"reference": "426523791"
}
]
}
}

Content Created successfully

Media typeapplication/json
schema-v2-tenantkey-content-response
object
subject

Same data as provided by the sender in the input

string
generated_at

Same data as provided by the sender in the input

string format: ISO8601
type

Same data as provided by the sender in the input

string
Example
{
"subject": "Invoice for November 2025",
"generated_at": "2025-10-31",
"type": "invoice"
}
kivra-objkey
string format: hexadecimal value

Object Key

kivra-retained
boolean

Boolean denoting if a Content was Retained, Note: this header is only returned when a Content is retained

location
string format: url

URL to created Object