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

Enrols a contact in the specified mailout.

Request

Parameters

Name Description Default
id Contact number (unique ID).

Body

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

XML JSON
<Request>                              
  <MailoutID>long</MailoutID>          <!--Unique mailout ID--> 
  <Restart>bool</Restart>              <!--Whether to restart the mailout if already enrolled--> 
  <IgnoreOptOut>bool</IgnoreOptOut>    <!--Whether to enrol the contact even if they previously opted out--> 
</Request>                             
{                           
   "MailoutID": "long",     // Unique mailout ID
   "Restart": "bool",       // Whether to restart the mailout if already enrolled
   "IgnoreOptOut": "bool"   // Whether to enrol the contact even if they previously opted out
}                           
                            

Response

Body

Content Type: application/xml or application/json
Enrolment status or an error message.

XML JSON
<Response>                     
  <Result>string</Result>      <!--'Success', 'AlreadyOptedIn' or 'OptedOut'--> 
  <Message>string</Message>    <!--Error message--> 
</Response>                    
{                         
   "Result": "string",    // 'Success', 'AlreadyOptedIn' or 'OptedOut'
   "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.