Trustmary Integration API (1.0.0)

Download OpenAPI specification:

API key test

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "message": "Your API key is working",
  • "organization_id": "testorg",
  • "organization_name": "Test Organization",
  • "api_key_name": "Test API key"
}

List contacts

Authorizations:
ApiKeyAuth
query Parameters
email
string

Email to filter by

offset
integer <int32>

Start offset for query

includeAll
boolean

Include also contacts marked as deleted.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create or update contact

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required

Contact data

email
required
string
name
string
eid
string
phone
string
company
string
type
string
Enum: "customer" "employee"
Array of strings or objects (AddToContactListItem)

Array of contact list ID's or list ID/segment tuples. If the optional segment parameter is included in addToLists then a connected automation will be triggered with the segment value included.

removeFromLists
Array of strings

Array of contact list ID's

processName
boolean

If set to true, firstname and lastname will be extracted and populated from name.

field_*
string

Set custom field value

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "eid": "string",
  • "phone": "string",
  • "company": "string",
  • "type": "customer",
  • "addToLists": [
    ],
  • "removeFromLists": [
    ],
  • "processName": true,
  • "field_*": "string"
}

Response samples

Content type
application/json
{
  • "contact": {
    },
  • "action": "IMPORT_CREATE",
  • "listsUpdated": 1
}

Delete contact

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
email
string

Responses

Request samples

Content type
application/json
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "contact": {
    }
}

List contact lists

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List surveys

Authorizations:
ApiKeyAuth
query Parameters
type
string
Enum: "customer" "employee"

Survey type to filter by

offset
integer <int32>

Start offset for query

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get survey information

Authorizations:
ApiKeyAuth
path Parameters
surveyId
required
string

String ID of the survey to get

Responses

Response samples

Content type
application/json
{
  • "id": "TN6I4tvo_",
  • "name": "NPS survey",
  • "organization_id": "testorg",
  • "type": "customer",
  • "status": "open",
  • "fields": [
    ]
}

List embeds owned by the API key holder

Authorizations:
ApiKeyAuth
query Parameters
offset
integer <int32>

Start offset for query

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List widgets owned by the API key holder

Authorizations:
ApiKeyAuth
query Parameters
offset
integer <int32>

Start offset for query

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

List experiments owned by the API key holder

Authorizations:
ApiKeyAuth
query Parameters
offset
integer <int32>

Start offset for query

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List webhooks

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "webhooks": [
    ]
}

Create webhook

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
name
string

Webhook name

hookUrl
required
string

Webhook URL to receive events

events
required
Array of strings
Items Enum: "surveyAnswerComplete" "newSurveyAnswer" "newReview"

List of events to subscribe to

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "webhook": {
    }
}

Delete webhook

Authorizations:
ApiKeyAuth
path Parameters
webhook_id
required
string

Webhook ID to delete

Responses

Response samples

Content type
application/json
{
  • "webhook": {
    }
}

Get webhook example payload

Returns example webhook payload data for testing and integration purposes

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{
  • "payload": [
    ]
}

Retrieve a review connection by the ID or the slug property

Authorizations:
ApiKeyAuth
path Parameters
idOrSlug
required
string

The ID as returned by the review connection list operation or user-specified name (slug)

Responses

Response samples

Content type
application/json
{}

Delete a review connection by the ID or the slug property

Authorizations:
ApiKeyAuth
path Parameters
idOrSlug
required
string

The ID as returned by the review connection list operation or user-specified name (slug)

Update a review connection by the ID or the slug property

Authorizations:
ApiKeyAuth
path Parameters
idOrSlug
required
string

The ID as returned by the review connection list operation or user-specified name (slug)

Request Body schema: application/json
required
slug
string or null

User-specified name for the connection (unique), or null to unset

title
string or null

User-specified title for the connection (unique), or null to unset

Request samples

Content type
application/json
{
  • "slug": "my-hotel",
  • "title": "My hotel in Helsinki"
}

Create a new review connection by URL, source ID or by Google Places search

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
One of
slug
string

Optional user-specified name for the review connection

title
string

Optional title for the review connection

targetUrl
string

The URL for the review service page. Connection parameters will be automatically parsed.

Responses

Request samples

Content type
application/json
Example
{}

Response samples

Content type
application/json
{
  • "id": "string",
  • "targetId": "string",
  • "targetTitle": "string"
}

List review connections

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
{}

List custom fields

Authorizations:
ApiKeyAuth
query Parameters
entity
string

Filter fields by entity type

Responses

Response samples

Content type
application/json
{
  • "fields": [
    ]
}

Create custom field

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
type
required
string

Field type identifier

code
required
string

Unique field code within the organization

label
required
string

Display name for the field

options
Array of any

Field options for select-type fields

entities
Array of strings

Entity types the field is attached to

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "code": "string",
  • "label": "string",
  • "options": [
    ],
  • "entities": [
    ]
}

Response samples

Content type
application/json
{
  • "field": {
    }
}

Upsert custom field

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
id
required
string

Unique field identifier

type
required
string

Field type identifier

code
required
string

Unique field code within the organization

label
required
string

Display name for the field

options
required
Array of any

Field options for select-type fields

entities
required
Array of strings

Entity types the field is attached to

created_at
required
string <date-time>
updated_at
required
string <date-time>
deleted_at
string or null <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "code": "string",
  • "label": "string",
  • "options": [
    ],
  • "entities": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "field": {
    }
}

Delete custom field by code

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
code
required
string

Field code to delete

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "field": {
    }
}

Get custom field

Authorizations:
ApiKeyAuth
path Parameters
field_id
required
string

Identifier of the field to retrieve

Responses

Response samples

Content type
application/json
{
  • "field": {
    }
}

Update custom field

Authorizations:
ApiKeyAuth
path Parameters
field_id
required
string

Identifier of the field to update

Request Body schema: application/json
required
id
required
string

Unique field identifier

type
required
string

Field type identifier

code
required
string

Unique field code within the organization

label
required
string

Display name for the field

options
required
Array of any

Field options for select-type fields

entities
required
Array of strings

Entity types the field is attached to

created_at
required
string <date-time>
updated_at
required
string <date-time>
deleted_at
string or null <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "type": "string",
  • "code": "string",
  • "label": "string",
  • "options": [
    ],
  • "entities": [
    ],
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "field": {
    }
}

Delete custom field

Authorizations:
ApiKeyAuth
path Parameters
field_id
required
string

Identifier of the field to delete

Responses

Response samples

Content type
application/json
{
  • "success": true
}