Creates one extraction code for each entry in ecCodeData, on its caseId with the given custodian email, configuration and requested sources, marks those sources pending on the case and returns each case id with its new code. While the Plaid integration is on, a financial source needs the case's organization to have accepted the Plaid terms and have an active Plaid customer (400 or 404 otherwise); this check runs after the codes are saved. Super admin only.
POST
/admin/case/create-extraction-codes
curl \
--request POST 'http://api.example.com/admin/case/create-extraction-codes' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"ecCodeData": [
{
"custodianEmail": "string",
"custodianName": "string",
"custodianPhone": "string",
"sendEmail": true,
"label": "string",
"allowShareAll": true,
"config": {
"type": "allow_client",
"ignoreMediaPermissionAndroid": false,
"origin": "string",
"enableFileUpload": false,
"enableLocalExport": {
"formats": [],
"defaultConfig": {
"chunkType": "none",
"includeAttachments": true
}
},
"allowClient": {
"allowSocialApps": [],
"allowShareAll": false
},
"autoShare": {
"allowClientApproval": true,
"allowAdditionalShare": true,
"searches": [
{
"type": "name",
"values": [
"string"
],
"apps": [],
"dateRange": {
"start": "string",
"end": "string"
},
"exactMatch": false,
"include": true,
"conversationType": "all"
}
]
},
"shareAll": {
"apps": [
"string"
],
"includeAttachments": true,
"dateRange": {
"start": "string",
"end": "string"
},
"searchesExclude": [
{
"type": "name",
"values": [
"string"
],
"apps": [
"string"
],
"exactMatch": true,
"conversationType": "all"
}
]
},
"dateRange": {
"start": "string",
"end": "string"
},
"appConfig": {
"conversionConcurrency": {
"mediaType": "images",
"concurrency": [
42.0
]
},
"compressionConcurrency": {
"mediaType": "images",
"concurrency": [
42.0
]
},
"enableLocalMediaConversion": false,
"enableLocalMediaCompression": false,
"enableIosEncryptedBackupExtraction": false,
"allowOnlyEncryptedIosBackup": false,
"autoIncludeSafariData": false,
"autoIncludeNotesData": false,
"autoIncludeContacts": false,
"shareAction": "share"
}
},
"requestedSources": [
"string"
],
"dueDate": "string",
"sendReminders": {
"dueIn2Weeks": false,
"dueIn1Week": false,
"dueIn3Days": false,
"dueIn1Day": false,
"after1Week": false,
"after2Weeks": false,
"after1Month": false
},
"metadata": {},
"watchlist": false,
"ocRequired": true,
"paymentRequired": true,
"paymentAmount": 42.0,
"paymentCurrency": "usd",
"paymentSuccessRedirectUrl": "string",
"productName": "string",
"prepaidItems": [
{
"productKey": "prepaid.device",
"quantity": 1,
"unitAmountCents": 42.0
}
],
"caseId": "string"
}
]
}'
Request examples
{
"ecCodeData": [
{
"custodianEmail": "string",
"custodianName": "string",
"custodianPhone": "string",
"sendEmail": true,
"label": "string",
"allowShareAll": true,
"config": {
"type": "allow_client",
"ignoreMediaPermissionAndroid": false,
"origin": "string",
"enableFileUpload": false,
"enableLocalExport": {
"formats": [],
"defaultConfig": {
"chunkType": "none",
"includeAttachments": true
}
},
"allowClient": {
"allowSocialApps": [],
"allowShareAll": false
},
"autoShare": {
"allowClientApproval": true,
"allowAdditionalShare": true,
"searches": [
{
"type": "name",
"values": [
"string"
],
"apps": [],
"dateRange": {
"start": "string",
"end": "string"
},
"exactMatch": false,
"include": true,
"conversationType": "all"
}
]
},
"shareAll": {
"apps": [
"string"
],
"includeAttachments": true,
"dateRange": {
"start": "string",
"end": "string"
},
"searchesExclude": [
{
"type": "name",
"values": [
"string"
],
"apps": [
"string"
],
"exactMatch": true,
"conversationType": "all"
}
]
},
"dateRange": {
"start": "string",
"end": "string"
},
"appConfig": {
"conversionConcurrency": {
"mediaType": "images",
"concurrency": [
42.0
]
},
"compressionConcurrency": {
"mediaType": "images",
"concurrency": [
42.0
]
},
"enableLocalMediaConversion": false,
"enableLocalMediaCompression": false,
"enableIosEncryptedBackupExtraction": false,
"allowOnlyEncryptedIosBackup": false,
"autoIncludeSafariData": false,
"autoIncludeNotesData": false,
"autoIncludeContacts": false,
"shareAction": "share"
}
},
"requestedSources": [
"string"
],
"dueDate": "string",
"sendReminders": {
"dueIn2Weeks": false,
"dueIn1Week": false,
"dueIn3Days": false,
"dueIn1Day": false,
"after1Week": false,
"after2Weeks": false,
"after1Month": false
},
"metadata": {},
"watchlist": false,
"ocRequired": true,
"paymentRequired": true,
"paymentAmount": 42.0,
"paymentCurrency": "usd",
"paymentSuccessRedirectUrl": "string",
"productName": "string",
"prepaidItems": [
{
"productKey": "prepaid.device",
"quantity": 1,
"unitAmountCents": 42.0
}
],
"caseId": "string"
}
]
}
Response examples (201)
{
"data": {
"data": [
{
"caseId": "65a1b2c3d4e5f6a7b8c9d0e2",
"code": "K7Q2MZ"
}
]
},
"statusCode": 201,
"timestamp": "2026-01-15T10:15:00.000Z"
}