Skip to content
English
  • There are no suggestions because the search field is empty.

Add user to organization

POST
/api/v1/organizations/{organizationId}/members

       
curl --request POST \
--url https://localhost:8080/api/v1/organizations/example/members \
--header ' Authorization: ' \
--header ' Content-Type: application/json ' \
--data ' { "roles": [ "organization_owner", "project_owner" ], "userId": "example" } '

Add a user to an organization with the specified roles and best-effort sync the membership to the bound IDP organization

organizationId
required
string

Organization ID (integer)

Roles to assign

Media type application/json
object
roles
Array
Example

              
[
" organization_owner " ,
" project_owner "
]
userId
required
string

User added successfully

Media type application/json
object
joinedAt
string
organizationId
integer
roles
Array
status
string
Example generated

          
{
"joinedAt" : " example " ,
"organizationId" : 1 ,
"roles" : [
" example "
],
"status" : " example "
}

Invalid request

Media type application/json
object
error
string
error_description
string
Example

          
{
"error" : " Unauthorized " ,
"error_description" : " Invalid token "
}

Unauthorized

Media type application/json
object
error
string
error_description
string
Example

          
{
"error" : " Unauthorized " ,
"error_description" : " Invalid token "
}

Forbidden - requires Organization Owner role

Media type application/json
object
error
string
error_description
string
Example

          
{
"error" : " Unauthorized " ,
"error_description" : " Invalid token "
}

User is already a member of this organization

Media type application/json
object
error
string
error_description
string
Example

          
{
"error" : " Unauthorized " ,
"error_description" : " Invalid token "
}

Internal server error

Media type application/json
object
error
string
error_description
string
Example

          
{
"error" : " Unauthorized " ,
"error_description" : " Invalid token "
}