Import an external IDP user into the platform
POST /api/v1/external-users/import Select code sample Fetch cURL
List external users from IDP Next
Add user to organization
const url = 'https://localhost:8080/api/v1/external-users/import';const options = { method: 'POST', headers: {Authorization: '
', 'Content-Type': 'application/json'}, body: '{"externalUserId":"example","organizationId":1,"role":"example"}'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}
curl --request POST \ --url https://localhost:8080/api/v1/external-users/import \ --header 'Authorization:
' \ --header 'Content-Type: application/json' \ --data '{ "externalUserId": "example", "organizationId": 1, "role": "example" }'
Import an IDP user into the platform database and optionally add them to an organization with a specified role
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”Import user request
Media type application/json object externalUserId required string organizationId integer role stringExample generated
{ "externalUserId": "example", "organizationId": 1, "role": "example"}
Responses
Section titled “ Responses ”200
Section titled “200 ”User imported successfully
Media type application/json object addedToOrganization integer displayName string email string importedAt string importedFrom string organizationRole string userId stringExample generated
{ "addedToOrganization": 1, "displayName": "example", "email": "example", "importedAt": "example", "importedFrom": "example", "organizationRole": "example", "userId": "example"}
400
Section titled “400 ”Bad Request - Invalid input
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
401
Section titled “401 ”Unauthorized
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
403
Section titled “403 ”Forbidden - requires Organization Owner role
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
404
Section titled “404 ”User not found in IDP
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
409
Section titled “409 ”Conflict - User already exists in platform
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
500
Section titled “500 ”Internal server error
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
Previous List external users from IDP Next
Add user to organization