Subscription
Subscription DTO
{
"id" [INTEGER],
"status": [ENUM('pending', 'active', 'unsubscribed')],
"verifiedAt": [DATETIME],
"unsubscribedAt": [DATETIME],
"sourceObjectType": [ENUM('user', 'registrationForm', 'import', 'portal')],
"updatedAt": [DATETIME],
"createdAt": [DATETIME],
"subscriber": {
"id" [INTEGER],
"email": [STRING],
"personalSalutation": [STRING],
"academicTitle": [STRING],
"firstName": [STRING],
"lastName": [STRING],
"sex": [ENUM('M', 'F')],
"address": [STRING],
"zip": [STRING],
"city": [STRING],
"country": [STRING(3)],
"company": [STRING],
"department": [STRING],
"telephone": [STRING],
"mobilePhone": [STRING],
"twitterUsername": [STRING],
"instagramUsername": [STRING],
"snapchatUsername": [STRING],
"facebookUrl": [STRING],
"youtubeUrl": [STRING],
"xingUrl": [STRING],
"linkedinUrl": [STRING],
"blogUrl": [STRING],
"status": [ENUM('active', 'hardBounced')],
"hardBouncedAt": [DATETIME],
"updatedAt": [DATETIME],
"createdAt": [DATETIME]
}
}
Requests
PUT /list/:listId/subscription/
Creates a single subscription by sending the object with mime type application/json
in the request body.
Request body
{
"subscriber": {
"email": [STRING],
"personalSalutation": [STRING],
"academicTitle": [STRING],
"firstName": [STRING],
"lastName": [STRING],
"sex": [ENUM('M', 'F')],
"address": [STRING],
"zip": [STRING],
"city": [STRING],
"country": [STRING(3)],
"company": [STRING],
"department": [STRING],
"telephone": [STRING],
"mobilePhone": [STRING],
"twitterUsername": [STRING],
"instagramUsername": [STRING],
"snapchatUsername": [STRING],
"facebookUrl": [STRING],
"youtubeUrl": [STRING],
"xingUrl": [STRING],
"linkedinUrl": [STRING],
"blogUrl": [STRING]
},
"sourceObjectType": [ENUM('registrationForm')],
"sourceObjectId": [INTEGER],
"verifiedAt": [DATETIME],
"verifiedByUserId": [INTEGER],
"unsubscribedAt": [DATETIME],
"unsubscribedByUserId": [INTEGER]
}
Response body
Subscription DTO
Example
Creating a subscription with the following values:
- `email=test@example.com`
clientId=1
(client specific)listId=6
(list specific)sourceObjectId=9
(list specific)sourceObjectType=registrationForm
(static)
curl -X PUT \
-H 'Content-Type: application/json' \
-d '{
"clientId": 1,
"sourceObjectId": 9,
"sourceObjectType": "registrationForm",
"subscriber": {
"email": "test@example.com"
}
}' \
https://api.kulturkurier.de/list/6/subscription/