Triggering a Signal through an API

When should you trigger the signal via an API?

When the third-party allows you to make a POST request with the details of the event and supports the OAuth2.0 authentication. You can also use this method when the third-party allows you to customize the way it sends the data in the callback.
In this case, you can construct a JSON body with the details of the event and make a POST request to the Signals API directly.
Note that when you want to trigger a signal through an API, you must establish a connection between the third-party app and Zoho CRM. Refer to Connections to know more.

You can trigger a custom signal through an API.

Request URL

https://www.zohoapis.com/crm/v2/signals/notifications

Request Method

POST

Scope

scope=ZohoCRM.signals.ALL

Attributes

AttributeData TypeMandatoryDescription
signal_namespaceStringYesUnique name of the signal.
subjectStringYesA short description about the signal. Accepts up to 100 characters.
messageStringYesA detailed description about the signal. Accepts up to 1000 characters.
email/idStringYesEmail ID or the record ID of the module. Refer to the Note section for more information
actions Show propertiesJSON arrayYesDetails of the third-party extension such as the display name of the page you want to open, the URL, and how you want to open the link.

actions Properties

AttributeData TypeMandatoryDescription
typeStringYesRepresents that the details page of the third-party extension is given as a link. The value for this key is link.
open_inStringYesRepresents if you want to open the third-party's link in a new tab or as a pop up. The possible values are tab and popup.
display_nameStringYesRepresents the display name of the link.
urlStringYesRepresents the URL of the third-party extension.
Note
  • You can format the contents in the "message" key. The following are the formatting options.

    • Bold: Enclose the contents in asterisks (*). Example: *This content is bold.*

    • Italics: Enclose the contents in carets (^). Example: ^This content is in italics.^

    • Line break: Use ~br~ to insert a line break. You must not insert a line break between either of the other two formatting options.

  • The email/id attribute is currently supported only for Contact and Lead modules.

Sample POST Body


{
"signals": [
    {
      "signal_namespace": "surveymonkey.responded", 
      "email": "p.boyle@xyz.com", 
      "subject": "Welcome Zoho CRM 2020", 
      "message": "*ZOHO Corporation* offers  ~br~ ^Online Business,^ ~br~ ^Network and IT Infrastructure Management Applications,^ ~br~ ^Software Maintenance  and Support Services^", 
      "actions": [
        {
          "type": "link", 
          "open_in": "popup", 
          "display_name": "View Email", 
          "url": "www.google.com"
        }
      ]
    }
  ]
}