This resource represents the email address used to send a project's notifications. Use it to get and set the project's sender email address.
Returns the project's sender email address.
Permissions required: Browse projects project permission for the project.
manage:jira-project
read:project.email:jira
Connect app scope required: READ
integer
RequiredReturned if the request is successful.
A project's sender email address.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/project/{projectId}/email`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
{
"emailAddress": "jira@example.customdomain.com",
"emailAddressStatus": [
"Email address or domain not verified."
]
}
Sets the project's sender email address.
If emailAddress
is an empty string, the default email address is restored.
Permissions required: Administer Jira global permission or Administer Projects project permission.
manage:jira-project
write:project.email:jira
Connect app scope required: PROJECT_ADMIN
integer
RequiredThe project's sender email address to be set.
string
array<string>
Returned if the project's sender email address is successfully set.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"emailAddress": "jira@example.atlassian.net"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/project/{projectId}/email`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Rate this page: