Skip to main content

Board User Mutations

Add Team User

Add a list of users to the board with specified roles.

Mutation Structure

mutation AddTeamUser($emails: [String!]!, $type: BoardUserType!) {
addTeamUser(emails: $emails, type: $type) {
id
team {
id
role
isInvitationPending
ssoId
}
}
}

Input Fields

FieldTypeDescription
emails[String!]!List of emails to add to the board
typeBoardUserType!Role of the users in the board

BoardUserType Enum

ValueDescription
ADMINAdmins can do everything
MEMBERMembers can create posts and comments
MODERATORModerators can moderate posts and comments
OWNEROwners is the creator of the board

Example

mutation {
addTeamUser(
emails: ["user@example.com"]
type: MEMBER
) {
id
team {
id
role
isInvitationPending
}
}
}

Change Team User Role

Change the role of a user in the board.

Mutation Structure

mutation ChangeTeamUserRole($ssoId: String!, $role: BoardUserType!) {
changeTeamUserRole(ssoId: $ssoId, role: $role) {
id
team {
id
role
ssoId
}
}
}

Input Fields

FieldTypeDescription
ssoIdString!User's external id
roleBoardUserType!User's new role in the board

Example

mutation {
changeTeamUserRole(
ssoId: "external_user_123"
role: MODERATOR
) {
id
team {
id
role
ssoId
}
}
}

Remove Team User

Remove a user from the board.

Mutation Structure

mutation RemoveTeamUser($ssoId: String!) {
removeTeamUser(ssoId: $ssoId)
}

Input Fields

FieldTypeDescription
ssoIdString!User's external id

Example

mutation {
removeTeamUser(ssoId: "external_user_123")
}

Example Response:

{
"data": {
"removeTeamUser": true
}
}

Authentication

All board user mutations require authentication. You must include your API key and SSO information in the HTTP headers:

{
"apikey": "YOUR_API_KEY",
"ssotype": "YOUR_SSO_TYPE"
}

For mutations that modify specific users (changeTeamUserRole and removeTeamUser), you must also include the user's SSO ID:

{
"apikey": "YOUR_API_KEY",
"ssotype": "YOUR_SSO_TYPE",
"ssoid": "EXTERNAL_USER_ID"
}

You can also make requests using curl:

curl -X POST \
-H "Content-Type: application/json" \
-H "apikey: YOUR_API_KEY" \
-H "ssotype: YOUR_SSO_TYPE" \
-H "ssoid: EXTERNAL_USER_ID" \
-d "query" \
https://api.nolt.io/api/v1/graphql

Error Handling

The mutations may return errors in the following cases:

  • Invalid API key or missing authentication
  • Missing SSO type in headers
  • Missing SSO ID in headers (for user-specific operations)
  • User not found
  • Write access required
  • Invalid role type

Example error responses:

{
"errors": [
{
"message": "ssotype is required in headers",
"path": ["changeTeamUserRole"]
}
]
}
{
"errors": [
{
"message": "User not found",
"path": ["removeTeamUser"]
}
]
}