# Remove Project Members Remove project members from a project. If no person ID is provided, all members are removed. If a person ID is provided, only that member is removed. If the person ID is not a member of the project, the request is a no-op. Subprojects can't have members. Trying to remove members from a subproject will fail with a 422 response. # OpenAPI definition ```json { "openapi": "3.0.0", "info": { "title": "Attendances API", "version": "2.0.0", "description": "Endpoints to manage attendance periods, projects and their members." }, "servers": [ { "url": "https://api.personio.de" } ], "security": [ { "BearerAuth": [] } ], "tags": [ { "name": "Project Members", "description": "Endpoints relating to project members." } ], "paths": { "/v2/projects/{id}/members": { "parameters": [ { "$ref": "#/components/parameters/projectIdParam" } ], "delete": { "x-path-examples": { "204 DELETE Valid request multiple members": { "value": "/papi/v2/projects/1234/members?person_id=5678,91011" }, "403 Forbidden response": { "value": "/papi/v2/projects/1234/members?person_id=5678" }, "404 Resource Not Found": { "value": "/papi/v2/projects/9999/members?person_id=5678" }, "422 Can't manage members with subproject": { "value": "/papi/v2/projects/1234/members" } }, "tags": [ "Project Members" ], "summary": "Remove Project Members", "description": "Remove project members from a project.\nIf no person ID is provided, all members are removed.\nIf a person ID is provided, only that member is removed. If the person ID is not a member of the project, the request is a no-op.\nSubprojects can't have members. Trying to remove members from a subproject will fail with a 422 response.\n", "parameters": [ { "in": "query", "name": "person_id", "description": "Person ID to remove from the project.", "required": false, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "204": { "description": "Project member removed successfully.", "x-response-example": "204 DELETE Valid request multiple members" }, "403": { "$ref": "#/components/responses/ForbiddenResponse" }, "404": { "$ref": "#/components/responses/NotFoundResponse" }, "422": { "$ref": "#/components/responses/ManageProjectMembersUnprocessableContentErrorResponse" } } } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }, "responses": { "ForbiddenResponse": { "description": "Forbidden", "content": { "application/problem+json": { "schema": { "$ref": "#/components/responses/NotFoundResponse/content/application~1problem%2Bjson/schema" }, "examples": { "403 Forbidden response": { "$ref": "#/components/examples/ForbiddenResponse" } } } } }, "NotFoundResponse": { "description": "The resource could not be found.", "content": { "application/problem+json": { "schema": { "type": "object", "description": "This object represents an error response.", "properties": { "personio_trace_id": { "type": "string", "example": "aswo3f-a202lfso-312123sld-1230ddd", "description": "A unique ID that was created for this error." }, "timestamp": { "type": "string", "format": "date-time", "example": "2021-05-28T11:17:30.000Z", "description": "The timestamp of when the error occurred." }, "errors": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "example": "Not found", "description": "The title of the error." }, "detail": { "type": "string", "example": "The requested resource was not found.", "description": "A short description about the error." }, "type": { "type": "string", "format": "uri", "example": "https://developer.personio.de/reference/errors#common.requested_resource_not_found", "description": "A link to the developer hub where more information can be found for the encountered error." }, "_meta": { "type": "object", "additionalProperties": { "type": "string" } } } } } } }, "examples": { "404 Resource Not Found": { "$ref": "#/components/examples/NotFoundResponse" } } } } }, "ManageProjectMembersUnprocessableContentErrorResponse": { "description": "Unprocessable content", "content": { "application/problem+json": { "schema": { "$ref": "#/components/responses/NotFoundResponse/content/application~1problem%2Bjson/schema" }, "examples": { "422 Person not found": { "$ref": "#/components/examples/PersonNotFoundResponse" }, "422 Can't manage members with subproject": { "$ref": "#/components/examples/CantManageMembersWithSubprojectResponse" } } } } } }, "examples": { "ForbiddenResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30+00:00", "errors": [ { "title": "Access denied", "detail": "Access denied to perform attendance period operations.", "type": "https://developer.personio.de/reference/errors#common.forbidden_response" } ] } }, "NotFoundResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30+00:00", "errors": [ { "title": "Resource not found", "detail": "The requested resource is not found.", "type": "https://developer.personio.de/reference/errors#common.resource_not_found" } ] } }, "PersonNotFoundResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Person not found.", "detail": "The provided person ID `1234` does not exist. Please ensure that the person ID is correct." } ] } }, "CantManageMembersWithSubprojectResponse": { "value": { "personio_trace_id": "aswo3f-a202lfso-312123sld-1230ddd", "timestamp": "2021-05-28T11:17:30Z", "errors": [ { "title": "Can't manage members with subproject.", "detail": "Members cannot be managed on subprojects." } ] } } } } } ```