Skip to content

Add to a list

POST
/optout-list/prepare-upload
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

Details of what should be included in the list upload file.

Media type application/json
object
optoutListId
required

The Opt-Out list id, which can be found on the Opt-Out list page under Opt-Out List Details

string
Example
901fad4c46a1e723
fileContentLength
required

The size of the Opt-Out file in bytes. The size cannot exceed 5gb.

number
Example
536870912

Optout upload has been prepared and a file containing Opt-Outs can now be uploaded to the returned URL.

Media type application/json
object
uploadUrl

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.

string
importReference

A unique import reference required for calls to /optout-list/upload-status.

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