Import custom list
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | — |
Request
Content type: application/json · required
| Field | Type | Required | Description |
|---|---|---|---|
csv |
string | No | — |
curl -X POST "$MONICHEK_API/custom-lists/{id}:import" \
-H "Authorization: Bearer $MONICHEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"csv": "string"
}'const res = await fetch(`${MONICHEK_API}/custom-lists/{id}:import`, {
method: "POST",
headers: {
Authorization: `Bearer ${MONICHEK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"csv": "string"
}),
});
const data = await res.json();import os
import requests
res = requests.post(
f"{os.environ['MONICHEK_API']}/custom-lists/{id}:import",
headers={"Authorization": f"Bearer {os.environ['MONICHEK_API_KEY']}"},
json={
"csv": "string"
},
)
print(res.json())$ch = curl_init(getenv('MONICHEK_API') . '/custom-lists/{id}:import');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('MONICHEK_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'csv' => 'string',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Replace {id} with the resource id.
Responses
200 OK
imported
application/json
No response example is published for this status.