Send Mail - Send Mail

RESTful method to send mail for selected/queried work items.

POST https://dev.azure.com/{organization}/{project}/_apis/wit/sendmail?api-version=7.1-preview.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

project
path

string

Project ID or project name

api-version
query True

string

Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api.

Request Body

Name Type Description
fields

string[]

ids

integer[]

message

MailMessage

persistenceId

string

projectId

string

sortFields

string[]

tempQueryId

string

wiql

string

Responses

Name Type Description
200 OK

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.work Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks.

Definitions

Name Description
EmailRecipients
MailMessage
SendMailBody

EmailRecipients

Name Type Description
emailAddresses

string[]

Plaintext email addresses.

tfIds

string[]

TfIds

unresolvedEntityIds

string[]

Unresolved entity ids

MailMessage

Name Type Description
body

string

The mail body in HTML format.

cc

EmailRecipients

CC recipients.

inReplyTo

string

The in-reply-to header value

messageId

string

The Message Id value

replyTo

EmailRecipients

Reply To recipients.

subject

string

The mail subject.

to

EmailRecipients

To recipients

SendMailBody

Name Type Description
fields

string[]

ids

integer[]

message

MailMessage

persistenceId

string

projectId

string

sortFields

string[]

tempQueryId

string

wiql

string