Skip to main content
POST
https://{tenantDomain}/api/v2
/
jobs
/
users-imports
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Jobs;
using System.IO;
using System.Text;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Jobs.UsersImports.CreateAsync(
            new CreateImportUsersRequestContent {
                Users = new FileParameter(){
                    Stream = new MemoryStream(Encoding.UTF8.GetBytes("[bytes]"))
                },
                ConnectionId = "connection_id"
            }
        );
    }

}
{
  "status": "pending",
  "type": "users_import",
  "created_at": "<string>",
  "id": "job_0000000000000001",
  "connection_id": "con_0000000000000001",
  "external_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
users
string
required
connection_id
string
default:con_0000000000000001
required

connection_id of the connection to which users will be imported.

Pattern: ^con_[A-Za-z0-9]{16}$
upsert
boolean
default:false

Whether to update users if they already exist (true) or to ignore them (false).

external_id
string

Customer-defined ID.

send_completion_email
boolean
default:true

Whether to send a completion email to all tenant owners when the job is finished (true) or not (false).

Response

Job successfully created.

status
string
default:pending
required

Status of this job.

type
string
default:users_import
required

Type of job this is.

created_at
string
required

When this job was created.

id
string
default:job_0000000000000001
required

ID of this job.

connection_id
string
default:con_0000000000000001
required

connection_id of the connection to which users will be imported.

Pattern: ^con_[A-Za-z0-9]{16}$
external_id
string

Customer-defined ID.