Skip to content

journalRules

Journal Rules. Copy email to a journaling mailbox for archiving and compliance. The journalRules entity set lives under /exchange/v1.0/journalRules in the Mail flow category.

Fact Value
Path /exchange/v1.0/journalRules
Category Mail flow
Tier Tier 3, Mail flow
Read role MailFlow.Read.All (Community)
Write role MailFlow.ReadWrite.All (Pro)
Backing cmdlets Get-JournalRule, Set-JournalRule, New-JournalRule, Remove-JournalRule, Enable-JournalRule, Disable-JournalRule
Method Path Synopsis Role Plan
GET /exchange/v1.0/journalRules List journalRules entries. MailFlow.Read Community
POST /exchange/v1.0/journalRules POST /journalRules - creates a journal rule via New-JournalRule. Returns 201 + Location. MailFlow.ReadWrite Pro
GET /exchange/v1.0/journalRules/{key} Get a single journalRules entry by Identity. MailFlow.Read Community
PATCH /exchange/v1.0/journalRules/{key} PATCH /journalRules/{key} - partial update via Set-JournalRule. Returns 200 + updated entity. MailFlow.ReadWrite Pro
DELETE /exchange/v1.0/journalRules/{key} DELETE /journalRules/{key} - destructive, no soft-delete. MailFlow.ReadWrite Pro
POST /exchange/v1.0/journalRules/{key}/disable POST /journalRules/{key}/disable - bound action via Disable-JournalRule. Returns 204. MailFlow.ReadWrite Pro
POST /exchange/v1.0/journalRules/{key}/enable POST /journalRules/{key}/enable - bound action via Enable-JournalRule. Returns 204. MailFlow.ReadWrite Pro

List journalRules entries.

Backing cmdlet: Get-JournalRule. Role: MailFlow.Read (Community).

Stub auto-generated example for the journalRules collection. Backing cmdlet: Get-JournalRule. Live-verify with ?$top=3&$select=Id,Name and replace the synthetic body before promoting to Tier 1.

GET /exchange/v1.0/journalRules?$top=3 HTTP/1.1
Authorization: Bearer {token}
HTTP/1.1 200 OK
{
"@odata.context": "http://localhost:5043/exchange/v1.0/$metadata#journalRules",
"value": []
}

Notes: Illustrative example derived from the cmdlet documentation, not a live capture: field names are real, values are placeholders.

Related: GET /exchange/v1.0/journalRules/{key}

POST /journalRules - creates a journal rule via New-JournalRule. Returns 201 + Location.

Backing cmdlet: New-JournalRule. Role: MailFlow.ReadWrite (Pro).

Parameter In Type Required Description
journalEmailAddress body yes
name body yes
enabled body
recipient body
scope body
dryRun query bool (switch)

Create a journal rule - missing required field (400)

Section titled “Create a journal rule - missing required field (400)”

New-JournalRule requires both name and journalEmailAddress. Omitting journalEmailAddress fails body validation before the cmdlet is invoked.

POST /exchange/v1.0/journalRules HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "exonaut-sample-journalRules"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"error": {
"code": "BadRequest",
"message": "The 'journalEmailAddress' field is required.",
"target": "journalEmailAddress"
},
"correlationId": "0HN7K3V2P9Q4C:00000001"
}

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/journalRules

Creates a compliance journaling rule via New-JournalRule. Matching messages are copied to the journal mailbox named by journalEmailAddress.

POST /exchange/v1.0/journalRules HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "exonaut-sample-journalRules",
"journalEmailAddress": "journal-archive@contoso.com",
"recipient": "user@contoso.com",
"scope": "Global",
"enabled": true
}
HTTP/1.1 201 Created
Location: /exchange/v1.0/journalRules/exonaut-sample-journalRules
{
"Identity": "exonaut-sample-journalRules",
"Id": "exonaut-sample-journalRules",
"name": "exonaut-sample-journalRules",
"journalEmailAddress": "journal-archive@contoso.com",
"recipient": "user@contoso.com",
"scope": "Global",
"enabled": true
}

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/journalRules

Get a single journalRules entry by Identity.

Backing cmdlet: Get-JournalRule. Role: MailFlow.Read (Community).

Stub auto-generated example for GET /journalRules/{key}. Backing cmdlet: Get-JournalRule with -Identity {key}. Returns the full entity body; 404 if the identity doesn’t resolve.

GET /exchange/v1.0/journalRules/{key} HTTP/1.1
Authorization: Bearer {token}
HTTP/1.1 200 OK
{
"@odata.context": "http://localhost:5043/exchange/v1.0/$metadata#journalRules/$entity"
}

Notes: Illustrative example derived from the cmdlet documentation, not a live capture: field names are real, values are placeholders.

Related: GET /exchange/v1.0/journalRules

PATCH /journalRules/{key} - partial update via Set-JournalRule. Returns 200 + updated entity.

Backing cmdlet: Set-JournalRule. Role: MailFlow.ReadWrite (Pro).

Parameter In Type Required Description
journalEmailAddress body
name body
recipient body
scope body
dryRun query bool (switch)

Sub-resource of journalRules at GET /journalRules/{key} - partially updates a journal rule via Set-JournalRule, then returns the refreshed entity.

PATCH /exchange/v1.0/journalRules/{key} HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
{
"journalEmailAddress": "journal-archive-2@contoso.com",
"recipient": "team@contoso.com",
"scope": "Internal"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"Identity": "exonaut-sample-journalRules",
"Id": "exonaut-sample-journalRules",
"name": "exonaut-sample-journalRules",
"journalEmailAddress": "journal-archive-2@contoso.com",
"recipient": "team@contoso.com",
"scope": "Internal"
}

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/journalRules

DELETE /journalRules/{key} - destructive, no soft-delete.

Backing cmdlet: Remove-JournalRule. Role: MailFlow.ReadWrite (Pro).

Parameter In Type Required Description
dryRun query bool (switch)

Sub-resource of journalRules at GET /journalRules/{key} - permanently deletes a journal rule via Remove-JournalRule. Destructive; there is no soft-delete.

DELETE /exchange/v1.0/journalRules/{key} HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
HTTP/1.1 204 No Content

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/journalRules

POST /exchange/v1.0/journalRules/{key}/disable

Section titled “POST /exchange/v1.0/journalRules/{key}/disable”

POST /journalRules/{key}/disable - bound action via Disable-JournalRule. Returns 204.

Backing cmdlet: Disable-JournalRule. Role: MailFlow.ReadWrite (Pro).

Parameter In Type Required Description
dryRun query bool (switch)

Sub-resource of journalRules at GET /journalRules/{key} - bound action that deactivates an active journal rule via Disable-JournalRule.

POST /exchange/v1.0/journalRules/{key}/disable HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
HTTP/1.1 204 No Content

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/journalRules

POST /exchange/v1.0/journalRules/{key}/enable

Section titled “POST /exchange/v1.0/journalRules/{key}/enable”

POST /journalRules/{key}/enable - bound action via Enable-JournalRule. Returns 204.

Backing cmdlet: Enable-JournalRule. Role: MailFlow.ReadWrite (Pro).

Parameter In Type Required Description
dryRun query bool (switch)

Sub-resource of journalRules at GET /journalRules/{key} - bound action that activates a disabled journal rule via Enable-JournalRule.

POST /exchange/v1.0/journalRules/{key}/enable HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
HTTP/1.1 204 No Content

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/journalRules

?dryRun=true previews of any write stay on Community.