Skip to content

Update a distribution list

POST
/groups/distribution-list/update
curl --request POST \
--url https://calendar.work.optidata.cloud/api/groups/distribution-list/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "zid": "5a1c1f7e-9f2d-4a6b-8a30-1c0d9d2f4b11", "email": "engineering-team@acme.example", "users": [ { "uuid": "9e926fb1-e1ff-4fc9-81a1-5740f10ba57f", "email": "jane.doe@acme.example" } ] }'

Renames a distribution list and replaces its membership.

users is the complete list of who should be on it afterwards: the server compares it with the current membership and adds or removes people so the two match. Sending an empty users empties the list.

Media typeapplication/json
object
zid
required

Identifier of the list to update.

string
<= 255 characters
email
required

Address the list should answer at after the update.

string format: email
<= 255 characters
users

The complete membership after the update.

Array<object>
object
uuid
required

Optiwork UUID of the user.

string
email
required
string format: email
Examples
Exampleupdate
{
"zid": "5a1c1f7e-9f2d-4a6b-8a30-1c0d9d2f4b11",
"email": "engineering-team@acme.example",
"users": [
{
"uuid": "9e926fb1-e1ff-4fc9-81a1-5740f10ba57f",
"email": "jane.doe@acme.example"
}
]
}

The distribution list was updated.

Media typeapplication/json

Acknowledgement returned by several write operations.

object
message
required
string
Examples
Exampleupdated
{
"message": "Distribution list updated 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"
}

No distribution list has that identifier.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "Distribution list not found"
}

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."
}