Skip to content

Create a distribution list

POST
/groups/distribution-list
curl --request POST \
--url https://calendar.work.optidata.cloud/api/groups/distribution-list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "engineering@acme.example", "users": [ { "uuid": "9e926fb1-e1ff-4fc9-81a1-5740f10ba57f", "email": "jane.doe@acme.example" }, { "uuid": "9ef34ce3-3b69-4762-b5e8-045499390ce6", "email": "john.smith@acme.example" } ] }'

Creates a distribution list at the given address and puts the listed users on it. The response carries the new list’s zid, which the update and delete operations use.

Media typeapplication/json
object
email
required

Address the list will answer at.

string format: email
<= 255 characters
users

Initial members.

Array<object>
object
uuid
required

Optiwork UUID of the user.

string
email
required
string format: email
Examples
Examplecreate
{
"email": "engineering@acme.example",
"users": [
{
"uuid": "9e926fb1-e1ff-4fc9-81a1-5740f10ba57f",
"email": "jane.doe@acme.example"
},
{
"uuid": "9ef34ce3-3b69-4762-b5e8-045499390ce6",
"email": "john.smith@acme.example"
}
]
}

The distribution list was created.

Media typeapplication/json
object
zid
required

Identifier of the list.

string
email
required
string format: email
message
required
string
Examples
Examplecreated
{
"message": "Distribution list created successfully",
"zid": "5a1c1f7e-9f2d-4a6b-8a30-1c0d9d2f4b11",
"email": "engineering@acme.example"
}

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 failed validation, or the list could not be created at that address.

Media typeapplication/json
One of:
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples

The list could not be created

{
"message": "Failed to create distribution list"
}

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