POST api/Contacts/{id}/Mailouts/OptOut

Opts a contact out of the specified mailout.

Request

Parameters

Name Description Default
id Contact number (unique ID).

Body

Content Type: application/xml or application/json
Mailout details.

XML JSON
<Request>                            
  <MailoutID>long</MailoutID>        <!--Unique mailout ID--> 
  <AllMailouts>bool</AllMailouts>    <!--Whether to opt out of all current and future mailouts--> 
</Request>                           
{                          
   "MailoutID": "long",    // Unique mailout ID
   "AllMailouts": "bool"   // Whether to opt out of all current and future mailouts
}                          
                           

Response

Body

Content Type: application/xml or application/json
Opt-out status or an error message.

XML JSON
<Response>                     
  <Result>string</Result>      <!--'Success', 'AlreadyOptedOut' or 'NotEnrolled'--> 
  <Message>string</Message>    <!--Error message--> 
</Response>                    
{                         
   "Result": "string",    // 'Success', 'AlreadyOptedOut' or 'NotEnrolled'
   "Message": "string"    // Error message
}                         
                          

Status Codes

Code Condition
200 OK The operation completed successfully.
400 Bad RequestInvalid contact or mailout.
401 Unauthorized Access token is invalid, expired or not specified.
406 Not Acceptable Content type specified in the Accept header isn't supported.
500 Internal Server Error An internal error occurred.