Skip to content

Sending files through the import API

In order to send a file to ahead, a field needs to be specified in the people profile definition to accept a certain kind of file.

{
"name": "salary",
"fieldType": "File",
"source": "Api",
"isList": true
}

In this example, files of type salary can be sent to ahead. The filename of the file(s) being sent via a multipart/form-data request needs to follow a certain structure:

{userIdentifier}__{fieldName}__{fileName}.pdf

Note the 2 underscores between the pieces of information. Following the example, the following would be a valid file name:

joe@company.com__salary__March 2023.pdf

It would upload a new file named March 2023.pdf under the salary category for the user with the UPN joe@company.com

You can send up to 50 files per multipart request.