openapi: 3.0.3 info: version: 1.66.0 title: FusionAuth Api Key Group API description: This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls. license: name: Apache2 servers: - url: http://localhost:9011 - url: https://sandbox.fusionauth.io security: - ApiKeyAuth: [] tags: - name: Group paths: /api/group: post: description: Creates a group. You can optionally specify an Id for the group, if not provided one will be generated. operationId: createGroup parameters: - in: header name: X-FusionAuth-TenantId description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped. required: false schema: type: string format: UUID requestBody: content: application/json: schema: $ref: '#/components/schemas/GroupRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GroupResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group /api/group/member: post: description: Creates a member in a group. operationId: createGroupMembersWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/MemberRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MemberResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group delete: description: Removes users as members of a group. operationId: deleteGroupMembersWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/MemberDeleteRequest' responses: '200': description: Success default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group put: description: Creates a member in a group. operationId: updateGroupMembersWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/MemberRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MemberResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group /api/group/member/search: post: description: Searches group members with the specified criteria and pagination. operationId: searchGroupMembersWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/GroupMemberSearchRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GroupMemberSearchResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group /api/group/search: post: description: Searches groups with the specified criteria and pagination. operationId: searchGroupsWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/GroupSearchRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GroupSearchResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group /api/group/{groupId}: post: description: Creates a group. You can optionally specify an Id for the group, if not provided one will be generated. operationId: createGroupWithId parameters: - name: groupId in: path schema: type: string required: true description: The Id for the group. If not provided a secure random UUID will be generated. - in: header name: X-FusionAuth-TenantId description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped. required: false schema: type: string format: UUID requestBody: content: application/json: schema: $ref: '#/components/schemas/GroupRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GroupResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group delete: description: Deletes the group for the given Id. operationId: deleteGroupWithId parameters: - name: groupId in: path schema: type: string required: true description: The Id of the group to delete. - in: header name: X-FusionAuth-TenantId description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped. required: false schema: type: string format: UUID responses: '200': description: Success default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group patch: description: Updates, via PATCH, the group with the given Id. operationId: patchGroupWithId parameters: - name: groupId in: path schema: type: string required: true description: The Id of the group to update. - in: header name: X-FusionAuth-TenantId description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped. required: false schema: type: string format: UUID requestBody: content: application/json: schema: $ref: '#/components/schemas/GroupRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GroupResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group get: description: Retrieves the group for the given Id. operationId: retrieveGroupWithId parameters: - name: groupId in: path schema: type: string required: true description: The Id of the group. - in: header name: X-FusionAuth-TenantId description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped. required: false schema: type: string format: UUID responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GroupResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group put: description: Updates the group with the given Id. operationId: updateGroupWithId parameters: - name: groupId in: path schema: type: string required: true description: The Id of the group to update. - in: header name: X-FusionAuth-TenantId description: The unique Id of the tenant used to scope this API request. Only required when there is more than one tenant and the API key is not tenant-scoped. required: false schema: type: string format: UUID requestBody: content: application/json: schema: $ref: '#/components/schemas/GroupRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GroupResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - Group components: schemas: Errors: description: Standard error domain object that can also be used as the response from an API call. type: object properties: fieldErrors: type: array items: $ref: '#/components/schemas/Error' generalErrors: type: array items: $ref: '#/components/schemas/Error' ZonedDateTime: description: 'The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.' example: '1659380719000' type: integer format: int64 GroupMember: description: A User's membership into a Group type: object properties: data: type: object additionalProperties: type: object groupId: type: string format: uuid id: type: string format: uuid insertInstant: $ref: '#/components/schemas/ZonedDateTime' userId: type: string format: uuid MemberDeleteRequest: description: Group Member Delete Request type: object properties: memberIds: type: array items: type: string format: uuid members: type: array items: type: string format: uuid GroupMemberSearchResponse: description: Search response for Group Members type: object properties: members: type: array items: $ref: '#/components/schemas/GroupMember' total: type: integer format: int64 MemberResponse: description: Group Member Response type: object properties: members: type: array items: $ref: '#/components/schemas/GroupMember' Error: description: Defines an error. type: object properties: code: type: string data: type: object additionalProperties: type: object message: type: string ApplicationRole: description: A role given to a user for a specific application. type: object properties: description: type: string id: type: string format: uuid insertInstant: $ref: '#/components/schemas/ZonedDateTime' isDefault: type: boolean isSuperRole: type: boolean lastUpdateInstant: $ref: '#/components/schemas/ZonedDateTime' name: type: string Group: description: '' type: object properties: data: type: object additionalProperties: type: object id: type: string format: uuid insertInstant: $ref: '#/components/schemas/ZonedDateTime' lastUpdateInstant: $ref: '#/components/schemas/ZonedDateTime' name: type: string roles: type: array items: $ref: '#/components/schemas/ApplicationRole' tenantId: type: string format: uuid GroupSearchCriteria: description: Search criteria for Groups type: object properties: name: type: string tenantId: type: string format: uuid numberOfResults: type: integer orderBy: type: string startRow: type: integer GroupMemberSearchCriteria: description: Search criteria for Group Members type: object properties: groupId: type: string format: uuid tenantId: type: string format: uuid userId: type: string format: uuid numberOfResults: type: integer orderBy: type: string startRow: type: integer GroupSearchResponse: description: Search response for Groups type: object properties: groups: type: array items: $ref: '#/components/schemas/Group' total: type: integer format: int64 GroupRequest: description: Group API request object. type: object properties: group: $ref: '#/components/schemas/Group' roleIds: type: array items: type: string format: uuid MemberRequest: description: Group Member Request type: object properties: members: type: array items: $ref: '#/components/schemas/GroupMember' GroupResponse: description: Group API response object. type: object properties: group: $ref: '#/components/schemas/Group' groups: type: array items: $ref: '#/components/schemas/Group' GroupMemberSearchRequest: description: Search request for Group Members. type: object properties: search: $ref: '#/components/schemas/GroupMemberSearchCriteria' GroupSearchRequest: description: Search request for Groups. type: object properties: search: $ref: '#/components/schemas/GroupSearchCriteria' securitySchemes: ApiKeyAuth: type: apiKey name: Authorization in: header BearerAuth: type: http scheme: bearer bearerFormat: JWT