Tenant API - Tenant Management

Create Tenant

Creation of tenants via API allows clients to create new tenants in an efficient manner. The created tenant is automatically added to the client scope. The client needs to re-authenticate to have the new scope in effect.

<aside class="notice"> Note: Creation of tenants via API is only allowed in certain specific cases and its usage needs to be regulated in the business relationship between the sender party and Kivra. </aside>
post/v2/tenant

Request

  • Base URL: https://sender.api.kivra.com
  • URL: https://sender.api.kivra.com/v2/tenant
  • Auth: oAuth2Client (defined in the document in a form this page cannot read)

Request body

namestring required

Name of the Tenant, this name shows up in the Users Inbox

edit_security_level25 | 50

Security level needed for an enduser to opt_out from this Tenant

groupsstring[]

List of groups this Tenant belongs to

visibility'visible' | 'hidden'

Determines if this Tenant is visible for the enduser

created_atstring

Datum when the tenant was created in UTC format

created_bystring

ID of client that created the tenant

statusstring

internal field describing whether the user can opt-out the tenant

classstring

internal field

Example request

{
  "name": "Kivra",
  "company_id": [
    {
      "name": "Kivra AB",
      "orgnr": "SE556840226601"
    }
  ],
  "edit_security_level": 50,
  "groups": [],
  "created_at": "2019-05-20T12:42:29Z",
  "created_by": "client_15063298495eafd2749bb78e2f991af3ab023d13df",
  "status": "optional",
  "class": "opt_out"
}

Response

Tenant already existing and added to the client scope

namestring required

Name of the Tenant, this name shows up in the Users Inbox

edit_security_level25 | 50

Security level needed for an enduser to opt_out from this Tenant

groupsstring[]

List of groups this Tenant belongs to

visibility'visible' | 'hidden'

Determines if this Tenant is visible for the enduser

created_atstring

Datum when the tenant was created in UTC format

created_bystring

ID of client that created the tenant

statusstring

internal field describing whether the user can opt-out the tenant

classstring

internal field

Example response

{
  "name": "Kivra",
  "company_id": [
    {
      "name": "Kivra AB",
      "orgnr": "SE556840226601"
    }
  ],
  "edit_security_level": 50,
  "groups": [],
  "created_at": "2019-05-20T12:42:29Z",
  "created_by": "client_15063298495eafd2749bb78e2f991af3ab023d13df",
  "status": "optional",
  "class": "opt_out"
}

Changes

No recorded changes to this operation across all 1 revision of this API.