Upload CSV File

This endpoint allows an admin/super user to upload a CSV file of users for a bulk GDPR job.

/services/v2/users/gdpr/upload.json

- URL (Path/Query) Params
No query params needed; no path param needed.

- Data Params
No data params

- Request Body
{ “content” : }

🚧

For Permissions, Requirements, and More Detailed Information:

Reference the GDPR Plugin Docs in the Non-Reference portion of the documentation.

Sample Request

Upload using only emails:

curl 
-u piero:mypass 
-H "Accept:application/json" 
-H "Content-Type: application/json"
-X POST "https://apidocs.cloud.answerhub.com/services/v2/users/gdpr/upload.json" 
-H "Accept:application/json" 
-d '{ "content" : "email\[email protected]\[email protected]" }'

Upload using only user IDs:

curl 
-u piero:mypass 
-H "Accept:application/json" 
-H "Content-Type: application/json"
-X POST "https://apidocs.cloud.answerhub.com/services/v2/users/gdpr/upload.json" 
-H "Accept:application/json" -d '{ "content" : "userId\n18\n21"}'

Upload using only usernames:

curl  
-u piero:mypass 
-H "Accept:application/json" 
-H "Content-Type: application/json"
-X POST "https://apidocs.cloud.answerhub.com/services/v2/users/gdpr/upload.json" 
-H "Accept:application/json" 
-d '{"content" : "username\npz03\npz08"}' -v

Upload using only usernames and IDs:

curl 
-u piero:mypass 
-H "Accept:application/json" 
-H "Content-Type: application/json"
-X POST "https://apidocs.cloud.answerhub.com/services/v2/users/gdpr/upload.json" 
-H "Accept:application/json" 
-d '{ "content" : "userId,username\n,pz03\n18," }' -v

Expected Responses

- Success Response:
Code: 201 (created)

- Error Response:
All the provided users do not exist: HTTP/1.1 400 Bad Request

Sample Response

Successful Response:

{ "fileId" : <file id> }

Error Response:

{"error": "The provided file does not have a valid user."}
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!