Skip to content

Latest commit

 

History

History
138 lines (110 loc) · 5.5 KB

inferenceclassification-post-overrides.md

File metadata and controls

138 lines (110 loc) · 5.5 KB
title description ms.localizationpriority author ms.subservice doc_type
Create inferenceClassificationOverride
Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classified
medium
SuryaLashmiS
mail
apiPageType

Create inferenceClassificationOverride

Namespace: microsoft.graph

Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classified as specified in the override.

Note

  • If an override already exists with the same SMTP address, then the classifyAs and name fields of that override are updated with the provided values.
  • The maximum number of overrides supported for a mailbox is 1000, based on unique sender SMTP addresses.
  • The POST operation supports creating only one override at a time.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

POST /me/inferenceClassification/overrides
POST /users/{id}/inferenceClassification/overrides

Request headers

Name Type Description
Authorization string Bearer {token}. Required.
Content-Type string Nature of the data in the body of an entity. Required.

Request body

In the request body, supply a JSON representation of inferenceClassificationOverride object.

Response

If successful, this method returns 201 Created response code and an inferenceClassificationOverride object in the response body.

Example

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/me/inferenceClassification/overrides
Content-type: application/json

{
  "classifyAs": "focused",
  "senderEmailAddress": {
    "name": "Samantha Booth",
    "address": "samanthab@contoso.com"
  }
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response. Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-type: application/json

{
  "classifyAs": "focused",
  "senderEmailAddress": {
    "name": "Samantha Booth",
    "address": "samanthab@contoso.com"
  },
  "id": "98f5bdef-576a-404d-a2ea-07a3cf11a9b9"
}