# Get all user's groups with comprehensive sorting Returns user's groups in order: 1) pinned by pin number, 2) owned unpinned by creation date, 3) member unpinned by creation date Endpoint: GET /api/v1/groups/my-groups Version: 1.0 Security: header ## Query parameters: - `lastId` (string,null) Get older records (records with IDs less than this value) Alias maxId/max_id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `limit` (integer,null) - `offset` (integer,null) - `sortBy` (string,null) - `sortOrder` (string,null) - `untilId` (string,null) Get newer records (records with IDs greater than this value) Alias minId/min_id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" ## Response 200 fields (application/json): - `groupId` (string, required) ID of the group Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `name` (string, required) Name of the group - `displayName` (string, required) Display name of the group - `summary` (string, required) Description of the group - `avatar` (object,null) Avatar upload for the group - `avatar.uploadId` (string, required) Internal id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `avatar.userId` (string, required) User id this upload belongs to Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `avatar.uploadType` (string, required) Type of the upload Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER" - `avatar.meta` (object, required) Meta data - `avatar.meta.blurhash` (string,null) - `avatar.meta.name` (string,null) - `avatar.meta.altText` (string,null) - `avatar.size` (integer, required) Size in bytes of all the files in this upload - `avatar.files` (array, required) List of all the files this upload has - `avatar.files.uri` (string,null, required) Full url of the file - `avatar.files.fileId` (string, required) File id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `avatar.files.extension` (string, required) File extension Example: "mp4" - `avatar.files.original` (boolean, required) true if this file is original, false if it is a derivative - `avatar.files.meta` (object, required) File metadata. Contains optional values for width, height etc. - `avatar.files.meta.duration` (number,null) Video duration in seconds - `avatar.files.meta.width` (integer,null) Media width - `avatar.files.meta.height` (integer,null) Media height - `avatar.files.meta.codec` (string,null) Video codec - `avatar.files.meta.rotate` (integer,null) Rotation in degrees - `avatar.files.size` (integer, required) File size in bytes - `avatar.files.createdAt` (string, required) Example: "2022-03-10T16:15:50Z" - `avatar.files.updatedAt` (string, required) Example: "2022-03-10T16:15:50Z" - `avatar.files.type` (string, required) File type Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER" - `avatar.tags` (array, required) List of tags attached to upload Enum: "Post", "Avatar", "Header", "Album", "Emoji", "Event" - `avatar.error` (string,null) Upload processing error - `avatar.cached` (boolean) true if cached - `avatar.logs` (string,null) Logs - `avatar.remote` (boolean) true if this upload is remote - `header` (object,null) Header/banner upload for the group - `meta` (object, required) Group metadata including color - `meta.color` (string, required) Group color in HEX format - `pin` (integer,null) Pin order number if pinned (null if not pinned) - `isOwner` (boolean, required) Whether user is the owner of this group - `canManage` (boolean, required) Whether user can manage this group (OWNER, ADMIN, or MODERATOR) - `role` (string,null) User's role in this group (owner, admin, moderator, member, viewer) - `createdAt` (string, required) When the group was created (for sorting) Example: "2022-03-10T16:15:50Z" ## Response 401 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation ## Response 403 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation