Articles on: Developers

Automations (developers)

Automations are used to automatically gather feedback and reviews from Contacts. You can create your automations in Trustmary  here. For more information in Automations themselves, see our help documentation.

Automation object



Attributes



id string
Unique identifier for the object.

name string
User given automation name.

type string
Type of automation. Allowed values: customer, employee*.

status string
Status of the automation. Allowed values: active, draft.*

created_at ISO 8601 with timezone
Time automation was created.

updated_at ISO 8601 with timezone
Time of last update performed on the automation object.

{  
  "id": "sjXEZBsX2",
  "name": "Dev test",
  "type": "customer",
  "status": "active",
  "created_at": "2021-01-04T12:32:53.199Z",
  "updated_at": "2021-01-04T12:32:53.199Z"
}


Getting automations



GET /automations


Returning



{ 
  "automations": [automation_objects] 
}


Triggering an Automation for a Contact



Automations can have triggers like "Contact added to a list", "Contact answered a survey", or using this endpoint to manually trigger an automation for a Contact.

POST /automations/:automation_id/trigger


Body attributes



email string (required)
Contact email address. Requires a valid email.

field_YOURFIELDNAME string (optional)
Any number of custom fields can be added. Custom fields need to be added to Trustmary before they can be used.

{ 
  "email": "contact.email@example.com" 
}


Returning



Attributes


action string
TRIGGER_AUTOMATION is returned if the triggering was successful.

{ 
  "action": "TRIGGER_AUTOMATION" 
}

Updated on: 28/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!