---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: Extend
nav: wcp_docs
parent_url: /wcp_docs/
title: Construct and Send Connect REST API Requests
layout: subsection
---

### Prerequisites

<a id="prereq_N1003D_N1003A_N10001"></a>
-   Set up Workday Notifications on the tenant. See [Steps: Set Up Workday Notifications](https://doc.workday.com/admin-guide/en-us/manage-workday/tenant-configuration/notifications-and-alerts/tar1447197152478.html?toc=1.5.0).

    The Send Message API sends messages according to the tenant setup of Workday Notifications and associated routing rules.

-   Configure these security domains as needed:

    -   <i>Set Up: Message Templates</i> domain in the Learning Core and System functional areas.
    -   <i>Administer Communications</i>, <i>Set Up: Tenant Setup - BP and Notifications</i>, and <i>Security Configuration</i> domains in the System functional area.
    -   <i>Worker Data: Public Worker Reports</i> domain in the Staffing functional area.



### Context

<a id="context_N10074_N1003A_N10001"></a>
You can create a Connect REST API request that will send a message in these ways:

-   Using the message content from a message template or entered directly in the request body.
-   Sent to specified individuals. The available notification channels and their statuses follow the specified configuration in the Notification Type in the <b>Edit Tenant Setup - Notifications</b> task.


### Steps

1.  <a id="step_N1008F_N1008C_N1003A_N10001"></a>Construct the request destination using a `POST` request and the URL `https://api.workday.com/connect/v1/sendMessage`.
2.  <a id="step_N100A0_N1008C_N1003A_N10001"></a>Construct the body of the request.

    To send the message to specified individuals, add the Workday IDs of one or more Workers to the `contacts` section of the `recipients` section.

    <b>Note:</b> The Send Message API only accepts contacts that are of the Worker type. The API returns an error if you specified Workday IDs for other types such as candidate, student, and others.

    To find a Workday ID, select <b>Integration IDs</b> &gt; <b>View IDs</b> as a related action from the Worker (you must be a member of the Developer security group to access this action). The Workday ID displays at the top of the page. You can use the <b>Find Worker</b> report to find a Worker.

3.  <a id="step_N100EF_N1008C_N1003A_N10001"></a>(Optional) If you've created a message template using the Message Template API or the <b>Create Message Template</b> task and want to populate your message content from it, add the Message Template Workday ID to the `messageTemplate` section.
4.  <a id="step_N10100_N1008C_N1003A_N10001"></a>(Optional) If you want to specify the message content manually instead of using a Message Template, complete the `emailDetail` and `pushDetail` sections.
5.  <a id="step_N10111_N1008C_N1003A_N10001"></a>Specify the selected Notification Type for the message. Find the Notification Type’s Workday ID and add it to the `notificationType` section.

    You can also find the Workday ID by executing a `GET /notificationTypes` request in the Notification Type API.



### Example

This example sends both email and push notifications to 3 contacts, as specified by their Workday IDs. The `pushDetail` field sends the message to the Workday mobile app. The `emailDetail` field sends an email message. The `notificationType` is Learning Campaigns, which applies to both push and email messages.

Sample request body:

```
{
"pushDetail": {
"message": "Check out our new CyberSecurity class!"
},    
"notificationType": {
"id": "bcbbab73dcd7100004ed54d17aa80df4"
},
"emailDetail": {
"name": "Learning Department",
"subject": "New CyberSecurity Class",
"replyTo": "replyto_security@acme.com",
"body": "Check out a new CyberSecurity class"
},    
"recipients": {
"contacts": [
    {
        "id": "0e44c92412d34b01ace61e80a47aaf6d"
    },
    {
        "id": "3aa5550b7fe348b98d7b5741afc65534"
    },
    {
        "id": "26c439a5deed4a7dbab76709e0d2d2ca"
    }
]
}    
}
```

Sample response:

```
{
"commID": {
"descriptor": "sent message about Message from  to Logan McNeil",
"id": "c00ed0e62dd410011a4b3c2b92750000"
},
"emailDetail": {
"body": "Check out our new CyberSecurity class",
"name": "Learning Department",
"replyTo": "replyto_security@acme.com",
"subject": "New CyberSecurity Class"
},
"notificationType": {
"descriptor": "Learning Campaigns",
"id": "bcbbab73dcd7100004ed54d17aa80df4"
},
"pushDetail": {
"id": "c00ed0e62dd410011a4b3d5ea69b0000",
"message": "Check out our new CyberSecurity class!"
}
}
```

### Next Steps

<a id="postreq_N1012C_N1003A_N10001"></a>
To view notifications received as an email, mobile push notification, or Workday notification, the recipient can go to these options, which depend on the tenant setup of Workday notifications:

-   In Workday, go to <b>Notifications</b>. The recipient should receive a notification with the message.
-   In the recipient's email inbox, they should receive an email notification with the message.
-   If the recipient has the Workday mobile app and configured Workday notifications on the mobile device, they should receive a mobile push notification.


### Related Information

[Administrator Guide: Reference: Edit Tenant Setup - Notifications](https://doc.workday.com/admin-guide/en-us/manage-workday/tenant-configuration/tenant-setup/wil1451433814625.html)

[Reference: Security Domains for Connect Services](/wcp_docs/fjj1608677601018.html)

[Reference: Workday Extend API Gateways and Authorization Base URLs](/wcp_docs/dlh1653340161856.html)

