Get User Groups
To get the list of user groups, we can use the Passthrough Request.
A cURL request could look like this:
curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"method": "GET",
"path": "v2/users/<userId>/groups"
}
'
and the response could look like the following:
{
"success": true,
"data": {
"response": {
"body": "{\"data\":[{\"group\":{\"branch\":{\"id\":\"da62f694-9ff8-411e-9a46-05e22beef04e\",\"name\":\"Knit API\",\"refId\":null},\"id\":\"b8c0d7c2-8a04-4847-8961-0ffc5af44b0a\",\"name\":\"Default group\",\"refId\":null},\"startDate\":null,\"endDate\":null}],\"links\":{}}",
"headers": {
"Date": "Mon, 18 Aug 2025 10:07:35 GMT",
"Content-Type": "application/json; charset=utf-8",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive",
"CF-RAY": "97109ae32ec23a51-BOM",
"vary": "Accept-Encoding",
"request-context": "appId=cid-v1:af41c256-93e5-4ddc-8024-8374a329ec9f",
"cf-cache-status": "DYNAMIC",
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload",
"X-Content-Type-Options": "nosniff",
"Server": "cloudflare"
}
}
}
}
Updated about 23 hours ago