openapi: 3.1.0 info: version: 1.0.0 title: The Mighty Networks Admin AbuseReports Spaces API description: An API for managing your Mighty Networks network servers: - url: https://api.mn.co description: Production security: - bearerAuth: [] tags: - name: Spaces description: Spaces are the organizational units within a Network where content and members are organized paths: /admin/v1/networks/{network_id}/members/{member_id}/spaces: get: summary: Return spaces for a given member operationId: list_spaces tags: - Spaces parameters: - name: member_id in: path required: true description: ID of the member 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' responses: '200': description: A paginated set of spaces content: application/json: schema: $ref: '#/components/schemas/SpaceResponsePaged' '404': description: Member not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /admin/v1/networks/{network_id}/spaces: get: summary: Returns a list of spaces for the current network operationId: list_spaces tags: - Spaces 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 spaces content: application/json: schema: $ref: '#/components/schemas/SpaceResponsePaged' post: summary: Create a new space in the network operationId: create_spaces tags: - Spaces parameters: - $ref: '#/components/parameters/networkId' requestBody: description: Submit results as JSON required: true content: application/json: schema: $ref: '#/components/schemas/SpaceRequest' responses: '201': description: Space successfully created content: application/json: schema: $ref: '#/components/schemas/SpaceResponse' '400': description: Invalid request parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - space cannot be created content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /admin/v1/networks/{network_id}/spaces/{id}: get: summary: Query details of a specific space by its ID operationId: show_space tags: - Spaces parameters: - name: id in: path required: true description: The ID of the space to fetch schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' responses: '200': description: Details about the requested space content: application/json: schema: $ref: '#/components/schemas/SpaceResponse' patch: summary: Update a space by its ID operationId: update_spaces tags: - Spaces parameters: - name: id in: path required: true description: The ID of the space 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 space type: object properties: name: type: string description: The name of the space example: Updated Space Name collection_id: type: integer format: uint64 description: The ID of the collection to move the space to example: 123 responses: '200': description: Space successfully updated content: application/json: schema: $ref: '#/components/schemas/SpaceResponse' '400': description: Invalid request parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Space not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - space cannot be updated content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' put: summary: Update a space by its ID operationId: replace_spaces tags: - Spaces parameters: - name: id in: path required: true description: The ID of the space 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/SpaceUpdateRequest' responses: '200': description: Space successfully updated content: application/json: schema: $ref: '#/components/schemas/SpaceResponse' '400': description: Invalid request parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Space not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - space cannot be updated content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' delete: summary: Delete a space by its ID operationId: delete_spaces tags: - Spaces parameters: - name: id in: path required: true description: The ID of the space to delete schema: type: integer format: uint64 - $ref: '#/components/parameters/networkId' responses: '204': description: Space successfully deleted '404': description: Space not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '422': description: Validation error - space cannot be deleted due to business constraints content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' components: schemas: SpaceResponse: type: object required: - created_at - id - name - updated_at 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 Space's name collection_id: type: integer format: uint64 description: The ID of the collection this space belongs to ErrorResponse: type: object required: - error properties: error: type: string description: An error message explaining the problem encountered SpaceRequest: description: Request to create or update a space type: object required: - name properties: name: type: string description: The name of the space SpaceUpdateRequest: description: Request to update a space type: object required: [] properties: name: type: string description: The name of the space example: Updated Space Name collection_id: type: integer format: uint64 description: The ID of the collection to move the space to example: 123 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