> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Remove team members

DELETE https://api.getpostman.com/teams/{teamId}/bulk-members
Content-Type: application/json

Removes entities, such as users or organizations, from your Postman team. On success, this returns an HTTP `204 No Content` response.

Reference: https://learning.postman.com/api-docs/api-reference/teams/remove-team-members

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /teams/{teamId}/bulk-members:
    delete:
      operationId: removeTeamMembers
      summary: Remove team members
      description: >-
        Removes entities, such as users or organizations, from your Postman
        team. On success, this returns an HTTP `204 No Content` response.
      tags:
        - teams
      parameters:
        - name: teamId
          in: path
          description: The team's ID.
          required: true
          schema:
            $ref: '#/components/schemas/teamId'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
        - name: identifierType
          in: header
          description: Use SCIM user and group IDs instead of Postman user IDs.
          required: false
          schema:
            $ref: '#/components/schemas/identifierType'
      responses:
        '204':
          description: Remove Team Member
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveTeamMembersRequestBadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatusInstance'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/teamsError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/teamsError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/removeTeamMembers'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    teamId:
      type: integer
      title: teamId
    identifierType:
      type: string
      title: identifierType
    TeamEntityInfoEntityType:
      type: string
      enum:
        - user
        - group
        - team
        - organization
      description: The entity type.
      title: TeamEntityInfoEntityType
    TeamEntityInfoEntityId:
      oneOf:
        - type: integer
        - type: string
      description: The entity's ID.
      title: TeamEntityInfoEntityId
    teamEntityInfo:
      type: object
      properties:
        entityType:
          $ref: '#/components/schemas/TeamEntityInfoEntityType'
          description: The entity type.
        entityId:
          $ref: '#/components/schemas/TeamEntityInfoEntityId'
          description: The entity's ID.
      required:
        - entityType
        - entityId
      title: teamEntityInfo
    removeTeamMembers:
      type: object
      properties:
        entities:
          type: array
          items:
            $ref: '#/components/schemas/teamEntityInfo'
          description: A list of entities to remove.
      title: removeTeamMembers
    TeamsErrorDetailError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: TeamsErrorDetailError
    teamsErrorDetail:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TeamsErrorDetailError'
          description: Information about the error.
      description: An explanation about the problem.
      title: teamsErrorDetail
    TeamsErrorDetailInvalidEntriesResultItemsEntityId:
      oneOf:
        - type: integer
        - type: string
      description: The entity ID.
      title: TeamsErrorDetailInvalidEntriesResultItemsEntityId
    TeamsErrorDetailInvalidEntriesResultItems:
      type: object
      properties:
        entityType:
          type: string
          description: The entity type.
        entityId:
          $ref: >-
            #/components/schemas/TeamsErrorDetailInvalidEntriesResultItemsEntityId
          description: The entity ID.
        role:
          type:
            - string
            - 'null'
          description: The assigned role.
        status:
          type: string
          description: The `Invalid` response status.
        reason:
          type: string
          description: The reason for the error.
      title: TeamsErrorDetailInvalidEntriesResultItems
    teamsErrorDetailInvalidEntries:
      type: object
      properties:
        error:
          type: string
          description: The error message.
        result:
          type: array
          items:
            $ref: '#/components/schemas/TeamsErrorDetailInvalidEntriesResultItems'
          description: A list of invalid entities.
      description: An explanation about the problem.
      title: teamsErrorDetailInvalidEntries
    TeamsErrorDetail:
      oneOf:
        - $ref: '#/components/schemas/teamsErrorDetail'
        - $ref: '#/components/schemas/teamsErrorDetailInvalidEntries'
      title: TeamsErrorDetail
    teamsError:
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: >-
            The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that
            identifies the type of problem.
        status:
          type: integer
          description: The HTTP status code generated by the origin server.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/TeamsErrorDetail'
        instance:
          type: string
          description: >-
            The URI reference that identifies the specific occurrence of the
            problem.
      title: teamsError
    commonErrorTypeTitleDetailStatusInstance:
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: >-
            The [URI reference](https://www.rfc-editor.org/rfc/rfc3986) that
            identifies the type of problem.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: An explanation about the problem.
        status:
          type: integer
          description: The HTTP status code generated by the origin server.
        instance:
          type: string
          description: >-
            The URI reference that identifies the specific occurrence of the
            problem.
      title: commonErrorTypeTitleDetailStatusInstance
    RemoveTeamMembersRequestBadRequestError:
      oneOf:
        - $ref: '#/components/schemas/teamsError'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatusInstance'
      title: RemoveTeamMembersRequestBadRequestError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### Remove Team Members



**Request**

```json
{
  "entities": [
    {
      "entityType": "user",
      "entityId": "87654321"
    },
    {
      "entityType": "user",
      "entityId": "56781234"
    }
  ]
}
```

**SDK Code**

```python Remove Team Members
import requests

url = "https://api.getpostman.com/teams/123/bulk-members"

payload = { "entities": [
        {
            "entityType": "user",
            "entityId": "87654321"
        },
        {
            "entityType": "user",
            "entityId": "56781234"
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript Remove Team Members
const url = 'https://api.getpostman.com/teams/123/bulk-members';
const options = {
  method: 'DELETE',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"entities":[{"entityType":"user","entityId":"87654321"},{"entityType":"user","entityId":"56781234"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Remove Team Members
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/teams/123/bulk-members"

	payload := strings.NewReader("{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"87654321\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"56781234\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Remove Team Members
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/teams/123/bulk-members")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"87654321\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"56781234\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Remove Team Members
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.getpostman.com/teams/123/bulk-members")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"87654321\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"56781234\"\n    }\n  ]\n}")
  .asString();
```

```php Remove Team Members
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.getpostman.com/teams/123/bulk-members', [
  'body' => '{
  "entities": [
    {
      "entityType": "user",
      "entityId": "87654321"
    },
    {
      "entityType": "user",
      "entityId": "56781234"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Remove Team Members
using RestSharp;

var client = new RestClient("https://api.getpostman.com/teams/123/bulk-members");
var request = new RestRequest(Method.DELETE);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"87654321\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"56781234\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Remove Team Members
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["entities": [
    [
      "entityType": "user",
      "entityId": "87654321"
    ],
    [
      "entityType": "user",
      "entityId": "56781234"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/teams/123/bulk-members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Remove Organization



**Request**

```json
{
  "entities": [
    {
      "entityType": "organization",
      "entityId": "456"
    }
  ]
}
```

**SDK Code**

```python Remove Organization
import requests

url = "https://api.getpostman.com/teams/123/bulk-members"

payload = { "entities": [
        {
            "entityType": "organization",
            "entityId": "456"
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript Remove Organization
const url = 'https://api.getpostman.com/teams/123/bulk-members';
const options = {
  method: 'DELETE',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"entities":[{"entityType":"organization","entityId":"456"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Remove Organization
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/teams/123/bulk-members"

	payload := strings.NewReader("{\n  \"entities\": [\n    {\n      \"entityType\": \"organization\",\n      \"entityId\": \"456\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Remove Organization
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/teams/123/bulk-members")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entities\": [\n    {\n      \"entityType\": \"organization\",\n      \"entityId\": \"456\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Remove Organization
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.getpostman.com/teams/123/bulk-members")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entities\": [\n    {\n      \"entityType\": \"organization\",\n      \"entityId\": \"456\"\n    }\n  ]\n}")
  .asString();
```

```php Remove Organization
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.getpostman.com/teams/123/bulk-members', [
  'body' => '{
  "entities": [
    {
      "entityType": "organization",
      "entityId": "456"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Remove Organization
using RestSharp;

var client = new RestClient("https://api.getpostman.com/teams/123/bulk-members");
var request = new RestRequest(Method.DELETE);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entities\": [\n    {\n      \"entityType\": \"organization\",\n      \"entityId\": \"456\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Remove Organization
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["entities": [
    [
      "entityType": "organization",
      "entityId": "456"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/teams/123/bulk-members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Remove Team



**Request**

```json
{
  "entities": [
    {
      "entityType": "team",
      "entityId": "432"
    }
  ]
}
```

**SDK Code**

```python Remove Team
import requests

url = "https://api.getpostman.com/teams/123/bulk-members"

payload = { "entities": [
        {
            "entityType": "team",
            "entityId": "432"
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript Remove Team
const url = 'https://api.getpostman.com/teams/123/bulk-members';
const options = {
  method: 'DELETE',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"entities":[{"entityType":"team","entityId":"432"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Remove Team
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/teams/123/bulk-members"

	payload := strings.NewReader("{\n  \"entities\": [\n    {\n      \"entityType\": \"team\",\n      \"entityId\": \"432\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Remove Team
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/teams/123/bulk-members")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entities\": [\n    {\n      \"entityType\": \"team\",\n      \"entityId\": \"432\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Remove Team
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.getpostman.com/teams/123/bulk-members")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entities\": [\n    {\n      \"entityType\": \"team\",\n      \"entityId\": \"432\"\n    }\n  ]\n}")
  .asString();
```

```php Remove Team
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.getpostman.com/teams/123/bulk-members', [
  'body' => '{
  "entities": [
    {
      "entityType": "team",
      "entityId": "432"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Remove Team
using RestSharp;

var client = new RestClient("https://api.getpostman.com/teams/123/bulk-members");
var request = new RestRequest(Method.DELETE);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entities\": [\n    {\n      \"entityType\": \"team\",\n      \"entityId\": \"432\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Remove Team
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["entities": [
    [
      "entityType": "team",
      "entityId": "432"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/teams/123/bulk-members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Remove Team Member with SCIM IDs



**Request**

```json
{
  "entities": [
    {
      "entityType": "user",
      "entityId": "f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86"
    },
    {
      "entityType": "user",
      "entityId": "696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13"
    }
  ]
}
```

**SDK Code**

```python Remove Team Member with SCIM IDs
import requests

url = "https://api.getpostman.com/teams/123/bulk-members"

payload = { "entities": [
        {
            "entityType": "user",
            "entityId": "f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86"
        },
        {
            "entityType": "user",
            "entityId": "696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13"
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript Remove Team Member with SCIM IDs
const url = 'https://api.getpostman.com/teams/123/bulk-members';
const options = {
  method: 'DELETE',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"entities":[{"entityType":"user","entityId":"f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86"},{"entityType":"user","entityId":"696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Remove Team Member with SCIM IDs
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/teams/123/bulk-members"

	payload := strings.NewReader("{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Remove Team Member with SCIM IDs
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/teams/123/bulk-members")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Remove Team Member with SCIM IDs
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.getpostman.com/teams/123/bulk-members")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13\"\n    }\n  ]\n}")
  .asString();
```

```php Remove Team Member with SCIM IDs
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.getpostman.com/teams/123/bulk-members', [
  'body' => '{
  "entities": [
    {
      "entityType": "user",
      "entityId": "f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86"
    },
    {
      "entityType": "user",
      "entityId": "696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Remove Team Member with SCIM IDs
using RestSharp;

var client = new RestClient("https://api.getpostman.com/teams/123/bulk-members");
var request = new RestRequest(Method.DELETE);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86\"\n    },\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Remove Team Member with SCIM IDs
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["entities": [
    [
      "entityType": "user",
      "entityId": "f10ba7a8dac248e8fd9769163dc63aef920f3897c7ea2c86"
    ],
    [
      "entityType": "user",
      "entityId": "696e7061fe5aa0e7abb54851cdb0e3b21eed4f8daef24d13"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/teams/123/bulk-members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Remove User and Group Team Members



**Request**

```json
{
  "entities": [
    {
      "entityType": "user",
      "entityId": "12345678"
    },
    {
      "entityType": "group",
      "entityId": "1234"
    }
  ]
}
```

**SDK Code**

```python Remove User and Group Team Members
import requests

url = "https://api.getpostman.com/teams/123/bulk-members"

payload = { "entities": [
        {
            "entityType": "user",
            "entityId": "12345678"
        },
        {
            "entityType": "group",
            "entityId": "1234"
        }
    ] }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.json())
```

```javascript Remove User and Group Team Members
const url = 'https://api.getpostman.com/teams/123/bulk-members';
const options = {
  method: 'DELETE',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"entities":[{"entityType":"user","entityId":"12345678"},{"entityType":"group","entityId":"1234"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Remove User and Group Team Members
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/teams/123/bulk-members"

	payload := strings.NewReader("{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"12345678\"\n    },\n    {\n      \"entityType\": \"group\",\n      \"entityId\": \"1234\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Remove User and Group Team Members
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/teams/123/bulk-members")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"12345678\"\n    },\n    {\n      \"entityType\": \"group\",\n      \"entityId\": \"1234\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Remove User and Group Team Members
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.getpostman.com/teams/123/bulk-members")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"12345678\"\n    },\n    {\n      \"entityType\": \"group\",\n      \"entityId\": \"1234\"\n    }\n  ]\n}")
  .asString();
```

```php Remove User and Group Team Members
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.getpostman.com/teams/123/bulk-members', [
  'body' => '{
  "entities": [
    {
      "entityType": "user",
      "entityId": "12345678"
    },
    {
      "entityType": "group",
      "entityId": "1234"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Remove User and Group Team Members
using RestSharp;

var client = new RestClient("https://api.getpostman.com/teams/123/bulk-members");
var request = new RestRequest(Method.DELETE);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"entities\": [\n    {\n      \"entityType\": \"user\",\n      \"entityId\": \"12345678\"\n    },\n    {\n      \"entityType\": \"group\",\n      \"entityId\": \"1234\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Remove User and Group Team Members
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["entities": [
    [
      "entityType": "user",
      "entityId": "12345678"
    ],
    [
      "entityType": "group",
      "entityId": "1234"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/teams/123/bulk-members")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```