メインコンテンツへスキップ

invite-user

dci invite-user

Invites a new user to the organization with specified role and organization.

Request

Content-Type: application/json

Schema

{
"type": "object",
"description": "Request body to invite a new user to the organization.",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"description": "The email address of the user.",
"format": "email"
},
"firstName": {
"type": "string",
"description": "The first name of the user being invited."
},
"lastName": {
"type": "string",
"description": "The last name of the user being invited."
},
"jobTitle": {
"type": "string",
"description": "The job function of the user being invited.",
"enum": [
"Data Engineer / Data Analysts",
"Executive Team",
"Finance / Accounting",
"Founder",
"Legal / Purchasing",
"Management",
"Sales / Marketing",
"Software / Ops Engineer"
]
},
"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",
"description": "Response returned after creating a user invitation.",
"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."
},
"firstName": {
"type": "string",
"description": "The first name of the invited user, if provided during invitation."
},
"lastName": {
"type": "string",
"description": "The last name of the invited user, if provided during invitation."
},
"displayName": {
"type": "string",
"description": "The display name of the invited user, if provided during invitation."
},
"jobTitle": {
"type": "string",
"description": "The job function of the invited user, if provided during invitation."
},
"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",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

401 (application/json)

Unauthorized - Invalid API key.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

403 (application/json)

Forbidden - The client is not authorized to perform the request.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

500 (application/json)

Internal Server Error - Something went wrong with the DoiT API server.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

Aliases: invite-user, inviteuser