Create inferenceClassificationOverride

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 STMP 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.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Mail.ReadWrite
Delegated (personal Microsoft account) Mail.ReadWrite
Application Mail.ReadWrite

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

Here is an example of the request.

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

{
  "classifyAs": "focused",
  "senderEmailAddress": {
    "name": "Fanny Downs",
    "address": "fannyd@adatum.onmicrosoft.com"
  }
}
Response

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

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

{
  "classifyAs": "focused",
  "senderEmailAddress": {
    "name": "Fanny Downs",
    "address": "fannyd@adatum.onmicrosoft.com"
  },
  "id": "98f5bdef-576a-404d-a2ea-07a3cf11a9b9"
}