Subscribe one or more users (or every active member of one team) to a holiday category in a single request.
Provide exactly one of users or team:
users: subscribe each resolved user. Inside users, provide exactly one identifier type — emails, slugs, or uuids — with up to 10 entries.
team: subscribe every active member of a team. Identify the team by either team.uuid (the team’s UUID) or team.slug. Teams with more than 200 active members cannot be processed in a single request.
Idempotency: if a target user is already subscribed to the same category, the entry is reported as skipped (not an error). When excludedHolidayKeys is supplied alongside a skipped entry, the new keys are added to that user’s overrides without removing pre-existing ones.
Authorization: the token’s owner must be allowed to edit schedules for each resolved user, otherwise that entry is reported as failed. The HTTP response is 200 if at least one entry succeeded; 422 when none succeeded.
Every result entry always includes the target’s email, slug and uuid when the user resolves. For unresolved identifiers, only the field matching the lookup type is populated.
curl --request POST \
--url https://api.zeeg.me/v2/holidays/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": {
"emails": [
"lena.meier@horizondigital.de"
]
},
"subscription": {
"categoryType": "country",
"categoryKey": "DE"
}
}
'{
"users": [
{
"email": "lena.meier@horizondigital.de",
"slug": "lena-meier",
"uuid": "Lena6mK2QwR9XPv",
"status": "created"
},
{
"email": "tom.schmidt@horizondigital.de",
"slug": "tom-schmidt",
"uuid": "TomXk3J8YqB1ZPN",
"status": "skipped"
}
]
}Hide child attributes
country, region Country or region key from /holidays/categories (e.g. DE, DE-BY).
30Holiday keys (from /holidays/preview) to exclude from each target's availability.
100User-based target. Mutually exclusive with team. Provide exactly one of emails, slugs or uuids.
At least one target was created or skipped.
Hide child attributes
Target user's email, or the lookup key when resolution failed for an emails request.
Target user's slug, or the lookup key when resolution failed for a slugs request.
Target user's public UUID, or the lookup key when resolution failed for a uuids request.
created — new subscription added. skipped — user was already subscribed to the same category (any new excludedHolidayKeys were merged in). failed — see reason.
created, skipped, failed Human-readable failure reason. Present only when status is failed.
curl --request POST \
--url https://api.zeeg.me/v2/holidays/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"users": {
"emails": [
"lena.meier@horizondigital.de"
]
},
"subscription": {
"categoryType": "country",
"categoryKey": "DE"
}
}
'{
"users": [
{
"email": "lena.meier@horizondigital.de",
"slug": "lena-meier",
"uuid": "Lena6mK2QwR9XPv",
"status": "created"
},
{
"email": "tom.schmidt@horizondigital.de",
"slug": "tom-schmidt",
"uuid": "TomXk3J8YqB1ZPN",
"status": "skipped"
}
]
}