Cancel an import awaiting field setup
DELETE
/api/v3/contacts/imports/{importUniqueId}/field-setup
const url = 'https://api.tryletterhead.com/api/v3/contacts/imports/example/field-setup?api=true';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://api.tryletterhead.com/api/v3/contacts/imports/example/field-setup?api=true' \ --header 'Authorization: Bearer <token>'Cancels an import whose status is needsFieldSetup. Its status becomes cancelled. Nothing from the file had been imported, so nothing is undone. Works even when the upload has expired.
Returns 409 when the import is no longer waiting on field setup.
This is a company-level (v3) write. Authenticate with a company API key as a Bearer token.
Authorizations
Section titled βAuthorizations βParameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters β importUniqueId
required
string
The importβs unique identifier, from List subscriber imports.
Query Parameters
Section titled βQuery Parameters β api
required
boolean
Required. Set to true to authenticate with an API key.
Responses
Section titled β Responses βImport cancelled.
Media type application/json
object
items
message
string
total
integer
Example
{ "items": null, "message": "Import cancelled.", "total": 1}Still can’t find what you need? Contact support.