# deleteProjectMember

```graphql
mutation DeleteProjectMember($projectReference: ID!, $userId: ID!) {
  deleteProjectMember(projectReference: $projectReference, userId: $userId) {
    ok
  }
}
```

Removes a member from the project; the last owner cannot be removed, so transfer ownership first. Requires project.members.manage; API keys also need delete scope.

## Arguments

| Name               | Type | Required | Description                                                                                  |
| ------------------ | ---- | -------- | -------------------------------------------------------------------------------------------- |
| `projectReference` | ID!  | Yes      | Project UUID, slug or domain.                                                                |
| `userId`           | ID!  | Yes      | User ID of the member to remove. The last owner cannot be removed; transfer ownership first. |

## Variables

```json
{
  "projectReference": "string",
  "userId": "string"
}
```

## Responses

| Status | Description                                       |
| ------ | ------------------------------------------------- |
| 200    | The Acknowledgement! in data.deleteProjectMember. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation DeleteProjectMember($projectReference: ID!, $userId: ID!) {\n  deleteProjectMember(projectReference: $projectReference, userId: $userId) {\n    ok\n  }\n}",
  "variables": {
    "projectReference": "string",
    "userId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "deleteProjectMember": {
      "ok": false
    }
  }
}
```
