invite-user
restish dci invite-user
Invites a new user to the organization with specified role and organization.
Request
Content-Type: application/json
Schema
{
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"description": "The email address of the user to invite",
"format": "email"
},
"roleId": {
"type": "string",
"description": "The id of the role to assign to the user"
},
"organizationId": {
"type": "string",
"description": "The id of the organization to assign the user to"
}
}
}
Responses
201 (application/json)
Created - User invitation created successfully.
{
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Success message"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique id of the invited user"
},
"email": {
"type": "string",
"description": "The email address of the invited user"
},
"roleId": {
"type": "string",
"description": "The id of the role assigned to the user"
},
"organizationId": {
"type": "string",
"description": "The id of the organization assigned to the user"
},
"status": {
"type": "string",
"description": "The status of the user (invited)",
"enum": [
"invited"
]
}
}
}
}
}
400 (application/json)
Bad Request - The server cannot process the request, often due to a malformed request.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
401 (application/json)
Unauthorized - Invalid API key.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
403 (application/json)
Forbidden - The client is not authorized to perform the request.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
500 (application/json)
Internal Server Error - Something went wrong with the DoiT API server.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
Aliases: invite-user, inviteuser