Delete a distribution list
DELETE
/groups/distribution-list
const url = 'https://calendar.work.optidata.cloud/api/groups/distribution-list';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"zid":"5a1c1f7e-9f2d-4a6b-8a30-1c0d9d2f4b11","email":"engineering@acme.example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://calendar.work.optidata.cloud/api/groups/distribution-list \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "zid": "5a1c1f7e-9f2d-4a6b-8a30-1c0d9d2f4b11", "email": "engineering@acme.example" }'Removes a distribution list. Both zid and email are required and must
identify the same list.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
zid
required
Identifier of the list.
string
email
required
Address of the list.
string format: email
Examples
Exampledelete
{ "zid": "5a1c1f7e-9f2d-4a6b-8a30-1c0d9d2f4b11", "email": "engineering@acme.example"}Responses
Section titled “ Responses ”The distribution list was deleted.
Media typeapplication/json
Acknowledgement returned by several write operations.
object
message
required
string
Examples
Exampledeleted
{ "message": "Distribution list deleted successfully"}Missing, malformed or expired authentication key.
Media typeapplication/json
Authentication failures use an error key rather than message.
object
error
required
string
Examples
Examplemissing
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The request body or query string failed validation.
Media typeapplication/json
object
message
required
The first validation message.
string
errors
required
Validation messages keyed by field name.
object
key
additional properties
Array<string>
Examples
Exampleinvalid
{ "message": "The event title field is required.", "errors": { "title": [ "The event title field is required." ] }}Rate limit exceeded. Retry after the window resets.
Media typeapplication/json
Generic error envelope used by policy, binding and framework failures.
object
message
required
Human-readable description of the failure.
string
Examples
Examplethrottled
{ "message": "Too Many Attempts."}