Import an external IDP user into the platform
const url = 'https://localhost:8080/api/v1/external-users/import';const options = { method: 'POST', headers: {Authorization: '<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: <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
object
Omit to import without membership
Only applies with organizationId
Example generated
{ "externalUserId": "example", "organizationId": 1, "role": "example"}Responses
Section titled “ Responses ”User imported successfully
The platform user created from an IDP user, and whether the import created or matched it
object
Example generated
{ "addedToOrganization": 1, "displayName": "example", "email": "example", "importedAt": "2026-04-15T12:00:00Z", "importedFrom": "example", "organizationRole": "example", "userId": "example"}Bad Request - Invalid input
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Unauthorized
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Forbidden - requires Organization Owner role
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}User not found in IDP
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Conflict - User already exists in platform
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Internal server error
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}