Add to a list
const url = 'https://api.optizmo.com/optout-list/prepare-upload';const options = { method: 'POST', headers: {api_key: '<api_key>', 'Content-Type': 'application/json'}, body: '{"optoutListId":"901fad4c46a1e723","fileContentLength":536870912}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.optizmo.com/optout-list/prepare-upload \ --header 'Content-Type: application/json' \ --header 'api_key: <api_key>' \ --data '{ "optoutListId": "901fad4c46a1e723", "fileContentLength": 536870912 }'Generates a URL that a file of Opt-Outs can be uploaded to, in order to add them to an existing Opt-Out list
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Details of what should be included in the list upload file.
object
The Opt-Out list id, which can be found on the Opt-Out list page under Opt-Out List Details
Example
901fad4c46a1e723The size of the Opt-Out file in bytes. The size cannot exceed 5gb.
Example
536870912Responses
Section titled “ Responses ”Optout upload has been prepared and a file containing Opt-Outs can now be uploaded to the returned URL.
object
A pre-signed S3 URL for uploading the Opt-Outs file. Read more about the expected request/response when using this URL.
The URL will be valid for 15 minutes from generation time. An upload started before expiry will be allowed to complete, but new uploads will fail.
The uploaded Opt-Outs file should consist of plain text or MD5 hashed email addresses, one per line.
A unique import reference required for calls to /optout-list/upload-status.
Example
{ "uploadUrl": "https://storage.optizmo.com/1/65454/import/123123123123?AWSAccessKeyId=foobar&Expires=1639632005&Signature=awWMFz%3jfQJF&&x-amz-meta-ip=\"", "importReference": "a405108f-284c-4059-8817-459bfcbcdd9a"}Invalid request payload sent. Further details will be available in the response payload.
Authorization not sent or failed.