openapi: 3.1.0 info: version: 1.0.0 title: The Mighty Networks Admin AbuseReports Collections API description: An API for managing your Mighty Networks network servers: - url: https://api.mn.co description: Production security: - bearerAuth: [] tags: - name: Collections description: Manage collections in your network paths: /admin/v1/networks/{network_id}/collections: get: summary: Return all collections in the network operationId: list_collections tags: - Collections parameters: - name: page in: query required: false description: Page number for pagination schema: type: integer format: uint64 - name: per_page in: query required: false description: Items per page (max 100) schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' responses: '200': description: A paginated set of collection objects content: application/json: schema: $ref: '#/components/schemas/CollectionResponsePaged' post: summary: Create a new collection operationId: create_collections tags: - Collections parameters: - $ref: '#/components/parameters/networkId' requestBody: description: Submit results as JSON required: true content: application/json: schema: $ref: '#/components/schemas/CollectionCreateRequest' responses: '201': description: The created collection object content: application/json: schema: $ref: '#/components/schemas/CollectionResponse' '400': description: Invalid request body content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - e.g., max collections reached, name conflict content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /admin/v1/networks/{network_id}/collections/{id}/: get: summary: Return a single collection by ID operationId: show_collection tags: - Collections parameters: - name: id in: path required: true description: ID of the collection schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' responses: '200': description: A collection object content: application/json: schema: $ref: '#/components/schemas/CollectionResponse' '404': description: Collection not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' patch: summary: Update a collection by its ID operationId: update_collections tags: - Collections parameters: - name: id in: path required: true description: The ID of the collection to update schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' requestBody: description: Submit results as JSON required: true content: application/json: schema: description: Request to update a collection type: object properties: name: type: string description: The collection's name example: Updated Collection description: type: string description: The collection's description example: Updated description visible_to_members: type: boolean description: Whether the collection is visible to members responses: '200': description: The updated collection object content: application/json: schema: $ref: '#/components/schemas/CollectionResponse' '400': description: Invalid request body content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Collection not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - e.g., cannot update system collections, name conflict content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' put: summary: Update a collection by its ID operationId: replace_collections tags: - Collections parameters: - name: id in: path required: true description: The ID of the collection to update schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' requestBody: description: Submit results as JSON required: true content: application/json: schema: $ref: '#/components/schemas/CollectionUpdateRequest' responses: '200': description: The updated collection object content: application/json: schema: $ref: '#/components/schemas/CollectionResponse' '400': description: Invalid request body content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Collection not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - e.g., cannot update system collections, name conflict content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' delete: summary: Delete a collection operationId: delete_collections tags: - Collections parameters: - name: id in: path required: true description: ID of the collection schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' responses: '204': description: Collection successfully deleted '404': description: Collection not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Cannot delete collection (e.g., collection still contains spaces) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /admin/v1/networks/{network_id}/collections/{id}/order: put: summary: Reorder spaces within a collection operationId: replace_collections tags: - Collections parameters: - name: id in: path required: true description: ID of the collection schema: type: integer format: uint64 - name: page in: query required: false description: Page number for pagination schema: type: integer format: uint64 - name: per_page in: query required: false description: Items per page (max 100) schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' requestBody: description: Submit results as JSON required: true content: application/json: schema: $ref: '#/components/schemas/CollectionOrderRequest' responses: '200': description: The updated list of spaces with their positions content: application/json: schema: $ref: '#/components/schemas/CollectionOrderItemResponsePaged' '400': description: Invalid request body content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Collection not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - e.g., space not in collection, invalid position content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' components: schemas: CollectionCreateRequest: description: Request to create a new collection type: object required: - name properties: name: type: string description: The collection's name example: Featured Courses description: type: string description: The collection's description example: Our most popular courses visible_to_members: type: boolean description: Whether the collection is visible to members example: true CollectionResponse: description: A collection of spaces within a network type: object required: - created_at - explorable - id - name - position - updated_at - visible_to_members properties: id: type: integer format: uint64 description: The record's integer ID example: '1234' created_at: type: string format: date-time description: The date and time the record was created example: '2026-07-05T21:11:41+00:00' updated_at: type: string format: date-time description: The date and time the record was last modified example: '2026-07-05T21:11:41+00:00' name: type: string description: The collection's name description: type: string description: The collection's description visible_to_members: type: boolean description: Whether the collection is visible to members position: type: integer format: uint64 description: The display position of the collection explorable: type: boolean description: Whether the collection contains discoverable spaces or promoted plan ErrorResponse: type: object required: - error properties: error: type: string description: An error message explaining the problem encountered CollectionSpacePosition: description: A space position assignment within a collection type: object required: - position - space_id properties: space_id: type: integer format: uint64 description: The ID of the space to reposition example: 123 position: type: integer format: uint64 description: The target position for the space (1-based) example: 1 CollectionOrderRequest: description: Request to reorder spaces within a collection type: object required: - spaces properties: spaces: type: array description: Array of space position assignments items: $ref: '#/components/schemas/CollectionSpacePosition' CollectionUpdateRequest: description: Request to update a collection type: object required: [] properties: name: type: string description: The collection's name example: Updated Collection description: type: string description: The collection's description example: Updated description visible_to_members: type: boolean description: Whether the collection is visible to members parameters: networkId: name: network_id in: path description: The Network's unique integer ID, or subdomain required: true schema: oneOf: - type: integer description: Unique numeric network ID format: uint64 - type: string description: Network subdomain format: /^[a-z][a-z0-9-]+$/ securitySchemes: bearerAuth: type: http scheme: bearer