> Calendly developer docs. For page Markdown, append .md to any URL.
> Index: https://developer.calendly.com/llms.txt
> API catalog: https://developer.calendly.com/.well-known/api-catalog
> OpenAPI: https://developer.calendly.com/openapi/calendly-api.yaml
> OAuth authorization server: https://calendly.com/.well-known/oauth-authorization-server
> MCP protected resource: https://mcp.calendly.com/.well-known/oauth-protected-resource
> Scheduling MCP endpoint: https://mcp.calendly.com
> Docs search MCP: https://developer.calendly.com/_mcp/server

# Remove Contacts from Static List

POST https://api.calendly.com/contact_lists/{uuid}/memberships/removal
Content-Type: application/json

Removes contacts from a List. The contacts are not deleted. Maximum 500 contacts in each request. This operation uses POST because it has a request body. It is idempotent: a contact that is not on the List does not change, and you can safely retry failed contacts.

Contacts that do not exist or that the user cannot access are counted in `invalid`. The other contacts are still processed. URIs are listed only for contacts that were not removed.

A View returns 409, because the saved filters of a View decide its contacts.

> `contacts:write`

Reference: https://developer.calendly.com/api-docs/calendly-api/contacts/remove-contacts-from-static-list

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0
- `Authorization` header (bearer token, required) — Personal Access Token

## Request

### Path parameters

- `uuid` (string, required) — The UUID of the contact list, from the end of its `uri`.

### Body (application/json)

This endpoint expects a ContactListMembershipsRequest.

- `contacts` (list of string, required) — Contact URIs. Minimum 1, maximum 500. A contact that appears more than once is processed once.

## Response

### 200

OK

- `resource` (ContactListMembershipRemoveResult, required) — The result of removing contacts from a List. This is a result payload, not an addressable resource. URIs are listed only for contacts that were not removed.

## Errors

### 400 Bad Request Error

Request is not valid

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 401 Unauthorized Error

Cannot authenticate caller

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 403 Forbidden Error

Permission Denied or insufficient scope

- `Remove-contacts-from-static-listRequestForbiddenError`
  - ContactListsError: ContactListsError
  - InsufficientScopeError: InsufficientScopeError

### 404 Not Found Error

Requested resource not found

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 409 Conflict Error

The contact list is a View, so its contacts cannot be changed

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 429 Too Many Requests Error

Too Many Requests

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

### 500 Internal Server Error

An error has occurred on the server

- `title` (enum, required)
  - Allowed values: `Internal Server Error`
- `message` (enum, required)
  - Allowed values: `The server encountered an unexpected condition that prevented it from fulfilling the request.`
- `details` (list of ErrorResponseDetailsItem, optional)

## Types

### ContactListMembershipRemoveResult

The result of removing contacts from a List. This is a result payload, not an addressable resource. URIs are listed only for contacts that were not removed.

- `removed` (integer, required) — The number of contacts that were removed.
- `not_present` (integer, required) — The number of contacts that were not on the List. Nothing changed for them.
- `invalid` (integer, required) — The number of contacts that do not exist or that the user cannot access. The other contacts were still processed.
- `failed` (integer, required) — The number of contacts whose write failed. You can safely retry them.
- `not_present_contacts` (list of string, required) — The URIs of the contacts that were not on the List.
- `invalid_contacts` (list of string, required) — The URIs of the invalid contacts.
- `failed_contacts` (list of string, required) — The URIs of the contacts whose write failed. Send them again to retry.

### ErrorResponseDetailsItem

- `message` (string, required)
- `parameter` (string, optional)
- `code` (string, optional)

### ContactListsError

Permission Denied

- `title` (enum, required)
  - Allowed values: `Permission Denied`
- `message` (enum, required)
  - Allowed values: `Please upgrade to a paid Calendly account.`, `You do not have permission to access this resource.`

### InsufficientScopeError

Caller does not have required oauth scopes

- `title` (enum, required)
  - Allowed values: `Insufficient scope`
- `message` (enum, required)
  - Allowed values: `This operation requires the scopes listed in the 'required_scopes' array.`
- `required_scopes` (list of string, required)

## Examples

### One removed, one not on the List

**Response**

```json
{
  "resource": {
    "removed": 1,
    "not_present": 1,
    "invalid": 0,
    "failed": 0,
    "not_present_contacts": [
      "https://api.calendly.com/contacts/BBBBBBBBBBBBBBBB"
    ],
    "invalid_contacts": [],
    "failed_contacts": []
  }
}
```

**SDK Code**

```python One removed, one not on the List
import requests

url = "https://api.calendly.com/contact_lists/uuid/memberships/removal"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript One removed, one not on the List
const url = 'https://api.calendly.com/contact_lists/uuid/memberships/removal';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

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

```go One removed, one not on the List
package main

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

func main() {

	url := "https://api.calendly.com/contact_lists/uuid/memberships/removal"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

```ruby One removed, one not on the List
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/contact_lists/uuid/memberships/removal")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

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

```java One removed, one not on the List
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.calendly.com/contact_lists/uuid/memberships/removal")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php One removed, one not on the List
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.calendly.com/contact_lists/uuid/memberships/removal', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp One removed, one not on the List
using RestSharp;

var client = new RestClient("https://api.calendly.com/contact_lists/uuid/memberships/removal");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift One removed, one not on the List
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/contact_lists/uuid/memberships/removal")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```

### One contact

**Request**

```json
{
  "contacts": [
    "https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA"
  ]
}
```

**Response**

```json
{
  "resource": {
    "removed": 1,
    "not_present": 1,
    "invalid": 0,
    "failed": 0,
    "not_present_contacts": [
      "https://api.calendly.com/contacts/BBBBBBBBBBBBBBBB"
    ],
    "invalid_contacts": [],
    "failed_contacts": []
  }
}
```

**SDK Code**

```python One contact
import requests

url = "https://api.calendly.com/contact_lists/uuid/memberships/removal"

payload = { "contacts": ["https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA"] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript One contact
const url = 'https://api.calendly.com/contact_lists/uuid/memberships/removal';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"contacts":["https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA"]}'
};

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

```go One contact
package main

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

func main() {

	url := "https://api.calendly.com/contact_lists/uuid/memberships/removal"

	payload := strings.NewReader("{\n  \"contacts\": [\n    \"https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA\"\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 One contact
require 'uri'
require 'net/http'

url = URI("https://api.calendly.com/contact_lists/uuid/memberships/removal")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"contacts\": [\n    \"https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA\"\n  ]\n}"

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

```java One contact
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.calendly.com/contact_lists/uuid/memberships/removal")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"contacts\": [\n    \"https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA\"\n  ]\n}")
  .asString();
```

```php One contact
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.calendly.com/contact_lists/uuid/memberships/removal', [
  'body' => '{
  "contacts": [
    "https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp One contact
using RestSharp;

var client = new RestClient("https://api.calendly.com/contact_lists/uuid/memberships/removal");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"contacts\": [\n    \"https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift One contact
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["contacts": ["https://api.calendly.com/contacts/AAAAAAAAAAAAAAAA"]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.calendly.com/contact_lists/uuid/memberships/removal")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```