---
title: "POST /ver2/MessageService.svc/messages"
method: POST
path: "/ver2/MessageService.svc/messages"
tags: ["Message"]
---

# POST /ver2/MessageService.svc/messages

`POST /ver2/MessageService.svc/messages`

## Request

- Base URL: `https://api.enviance.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.enviance.com/ver2/MessageService.svc/messages`
- Auth: none declared
- TypeScript: <https://skmtc.dev/enviance/apis/restapi/docs/ver2/MessageService.svc/messages/post.ts> (a function with typed inputs; its response is checked against the schema)

Queues a message for delivery to the Enviance Inbox for a specified recipient, as well as optionally to the recipient e-mail address.

**Security:** All users

**SDK API:**  `envianceSdk.messages.createMessage(messageInfo, onsuccess, onerror) `

```
POST /ver2/MessageService.svc/messages/ HTTP/1.1
 
{
  "messageInfo": {
    "id": "d8ac14f5-c4b1-4db2-b0fc-15452f71737d",
    "recipientId": "d2148a6f-4989-4a61-9c27-855a110f8c68",
    "sentById": "21e1f9b6-fc7c-4257-85f1-01d097762d09",
    "sentOn": "2013-06-14T14:07:52",
    "subject": "Report Completion Notification: \"Emergency Checklist Report\"",
    "body": "This is to notify you that the \"Emergency Checklist Report\" is complete.",
    "type": "EmailNotification",
    "archived": false,
    "read": false,
    "sendByEmail": true
  }
}

```



envianceSdk.messages.createMessage
```
[
  {
    "recipientIdOrUserName": "5bfdbd05-225f-40ee-bff1-2efe18a75375",
    "subject": "subject text",
    "body": "body text",
    "sendByEmail": true
  },
  "onsuccess",
  "onerror"
]
```

## Headers

- `EnvApi-Systemid` string
- `EnvApi-Packageid` string
- `EnvApi-Udf-DateTime-Iso-In-CustomFields` string
- `EnvApi-Udf-DateTime-ReadInUserTz` string
- `EnvApi-Udf-Value-Invariant` string
- `EnvApi-Localization-All` string
- `x-client-request-id` string

## Request body

- CreateMessage
  - `messageInfo` EnvianceRestServicesVer2MessagesMessageInfo
    - `id` string, guid
    - `recipientIdOrUserName` string
    - `sentByIdOrUserName` string
    - `sentOn` string, date-time
    - `subject` string
    - `body` string
    - `type` string
    - `archived` boolean
    - `read` boolean
    - `sendByEmail` boolean

## Response `default`

not available

---

[API](https://skmtc.dev/enviance/apis/restapi.md) - [All operations](https://skmtc.dev/enviance/apis/restapi/llms.txt) - [OpenAPI document](https://skmtc.dev/enviance/apis/restapi/revisions/45b2200a8cf2?raw)
