Skip to content
Honen Academy

groups

Add a user to a group.

Add a user to a group.

OpenAPI specification
POST/api/v1/groups/member-add

Authentication

bearerAuth

Request

curl --globoff --request POST \
  --url 'https://honen.com/api/v1/groups/member-add' \
  --header 'Authorization: Bearer <BEARER_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "groupId": "<groupId>",
  "userId": "<userId>"
}'

Replace credential and <field> placeholders with your own values. URL placeholders appear as %3Cfield%3E. Review the example values before sending your request.

Use the sample JSON body as your starting point, and enter values that match the endpoint's schema.

Parameters

Idempotency-Keyheader · string

Unique retry key. Reusing it with the same body replays the original successful response; different input returns 409.

Request body schema or example

{
  "type": "object",
  "properties": {
    "groupId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "systemKey": {
      "type": "string",
      "enum": [
        "ADMIN",
        "INSTRUCTOR",
        "MEMBER"
      ],
      "default": "MEMBER"
    }
  },
  "required": [
    "groupId",
    "userId"
  ]
}

Responses

200Command result.
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "membership": {
          "type": "object",
          "properties": {
            "user": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "avatarUrl": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "avatarUrl"
              ]
            },
            "primaryRole": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "systemKey": {
                  "type": "string",
                  "enum": [
                    "ADMIN",
                    "INSTRUCTOR",
                    "MEMBER",
                    "EXTERNAL"
                  ],
                  "nullable": true
                },
                "color": {
                  "type": "string",
                  "nullable": true
                },
                "scopeGroupId": {
                  "type": "string",
                  "nullable": true
                },
                "scopeGroupName": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "systemKey",
                "color",
                "scopeGroupId"
              ],
              "nullable": true
            },
            "extraRoles": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "systemKey": {
                    "type": "string",
                    "enum": [
                      "ADMIN",
                      "INSTRUCTOR",
                      "MEMBER",
                      "EXTERNAL"
                    ],
                    "nullable": true
                  },
                  "color": {
                    "type": "string",
                    "nullable": true
                  },
                  "scopeGroupId": {
                    "type": "string",
                    "nullable": true
                  },
                  "scopeGroupName": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "systemKey",
                  "color",
                  "scopeGroupId"
                ]
              }
            },
            "status": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "INACTIVE"
              ]
            },
            "joinedAt": {
              "type": "string",
              "nullable": true
            },
            "enrolledAt": {
              "type": "string"
            }
          },
          "required": [
            "user",
            "primaryRole",
            "extraRoles",
            "status",
            "joinedAt",
            "enrolledAt"
          ]
        }
      },
      "required": [
        "membership"
      ]
    }
  },
  "required": [
    "success",
    "data"
  ]
}
400Malformed JSON request body.
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "details": {
          "nullable": true
        }
      },
      "required": [
        "code",
        "message",
        "resolution"
      ]
    }
  },
  "required": [
    "success",
    "error"
  ]
}
401Missing or invalid Connector credentials.
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "details": {
          "nullable": true
        }
      },
      "required": [
        "code",
        "message",
        "resolution"
      ]
    }
  },
  "required": [
    "success",
    "error"
  ]
}
403Connector policy does not permit this command.
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "details": {
          "nullable": true
        }
      },
      "required": [
        "code",
        "message",
        "resolution"
      ]
    }
  },
  "required": [
    "success",
    "error"
  ]
}
404Unknown command.
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "details": {
          "nullable": true
        }
      },
      "required": [
        "code",
        "message",
        "resolution"
      ]
    }
  },
  "required": [
    "success",
    "error"
  ]
}
409Idempotency key is reused, in progress, or belongs to a failed request.
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "details": {
          "nullable": true
        }
      },
      "required": [
        "code",
        "message",
        "resolution"
      ]
    }
  },
  "required": [
    "success",
    "error"
  ]
}
422Input validation error.
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "resolution": {
          "type": "string"
        },
        "errors": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "details": {
          "nullable": true
        }
      },
      "required": [
        "code",
        "message",
        "resolution"
      ]
    }
  },
  "required": [
    "success",
    "error"
  ]
}