Credential Interactions

Create a credential interaction

Creates a new credential interaction event.

<Callout title="Important considerations" type="warn"> This feature uses the browser's `LocalStorage` to identify the actions made by the recipient of the credential. When the user accesses the page with `?recipient=true` query parameter, the application saves that information in `LocalStorage` and removes the parameter from the URL. Actions taken afterwards in the same browser are recorded as the recipient's, until the `LocalStorage` data is cleared.

If you are distributing the credential links independently and wish to track events as originating from the recipient, be sure to include the ?recipient=true parameter. Without this parameter, we won't be able to mark this person as the recipient, and their actions will be marked under the guest actor category.

This approach may not capture every scenario. For example, if a recipient opens a link with ?recipient=true on one device, then shares the link without the parameter (or opens it on a different device without the stored flag), those subsequent views will be categorized as guest. Similarly, if the user clears their LocalStorage or uses an incognito session, the system can no longer confirm that they are the recipient.

</Callout>
post/v1/credential-interactions

Headers

Certifier-Versionstring required

API version header. Required for all requests.

Example:2022-10-26

API version header. Required for all requests.

Request body

credentialIdstring required

The unique credential's identifier, to which this credential interaction belongs

eventType'credential_viewed' | 'credential_shared_to_linkedin' | 'credential_added_to_linkedin_profile' | 'credential_shared_to_facebook' | 'credential_shared_to_twitter' | 'credential_shared_to_messenger' | 'credential_shared_to_whatsapp' | 'credential_shared_to_pinterest' | 'credential_shared_to_telegram' | 'credential_shared_to_weibo' | 'credential_downloaded' | 'credential_link_copied' | 'credential_verified' required

Specifies the type of user interaction event related to the credential

triggeredBy'recipient' | 'guest' required

The actor that triggered this credential interaction. Currently one of two values: recipient or guest

triggeredAtstring date-time required

The date and time when this credential interaction happened. Formatted as an ISO 8601 date and time string

Example request

{
  "credentialId": "01hrsvjp560yksep2a3bek3z97",
  "eventType": "credential_viewed",
  "triggeredBy": "recipient",
  "triggeredAt": "2024-03-12T17:33:05.784Z"
}

Response

Credential interaction created successfully

idstring required

The unique credential interaction's identifier

credentialIdstring required

The unique credential's identifier, to which this credential interaction belongs

eventType'credential_viewed' | 'credential_shared_to_linkedin' | 'credential_added_to_linkedin_profile' | 'credential_shared_to_facebook' | 'credential_shared_to_twitter' | 'credential_shared_to_messenger' | 'credential_shared_to_whatsapp' | 'credential_shared_to_pinterest' | 'credential_shared_to_telegram' | 'credential_shared_to_weibo' | 'credential_downloaded' | 'credential_link_copied' | 'credential_verified' required

Specifies the type of user interaction event related to the credential

triggeredBy'recipient' | 'guest' required

The actor that triggered this credential interaction. Currently one of two values: recipient or guest

triggeredAtstring date-time required

The date and time when this credential interaction happened. Formatted as an ISO 8601 date and time string

Example response

{
  "id": "01hrsvk8xnj8vkt8p1e2tc1jt7",
  "credentialId": "01hrsvjp560yksep2a3bek3z97",
  "eventType": "credential_viewed",
  "triggeredBy": "recipient",
  "triggeredAt": "2024-03-12T17:33:05.784Z"
}

Changes

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