Communications
Endpoints for Communications
Endpoints for Communications
GET/api/v1/communications/sms-short-links/{code}
Looks up the short code, verifies it has not expired, and returns a freshly minted HMAC unsubscribe token, the link expiry timestamp, and the owning tenant hostname. Called by the public short-link resolver page (e.g. subr.no/u/{code}) to redirect into the tenant unsubscribe page.
Authentication: Bearer token (JWT)
codestringRequiredpattern: /^[A-Za-z0-9]{8}$/tokenstringRequiredexpiresAtstring (date-time)RequiredtenantHostNamestringRequiredtestContextTestContextDto5 fieldstestContextenvironmentstringRequired when parent is presentField path: testContext.environmentadminEmailstringRequired when parent is presentField path: testContext.adminEmailrecipientstringRequired when parent is presentField path: testContext.recipientsentAtstring (date-time)Required when parent is presentField path: testContext.sentAtmessageIdstringRequired when parent is presentField path: testContext.messageId{
"token": "<token>",
"expiresAt": "2019-08-24T14:15:22Z",
"tenantHostName": "string",
"testContext": {
"environment": "string",
"adminEmail": "string",
"recipient": "string",
"sentAt": "2019-08-24T14:15:22Z",
"messageId": "string"
}
}unauthorized
messageCodestringRequiredmessagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}smsShortLinkNotFound
messageCodestringRequired"smsShortLinkNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "smsShortLinkNotFound",
"message": "string",
"errors": [
{}
]
}smsShortLinkExpired
messageCodestringRequired"smsShortLinkExpired"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "smsShortLinkExpired",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/sms-short-links/{code}' \
--header 'Authorization: Bearer <token>'GET/api/v1/communications
Authentication: Bearer token (JWT)
pagenumberOptional1minimum: 1takenumberOptional10minimum: 1maximum: 50orderDirectionstringOptional"desc"Allowed values: "asc", "desc"orderBystringOptional"sendDate"sendDate sorts a sent communication by when it was sent, a scheduled one by when it is scheduled to go out, and any other (draft, ready, processing, failed) by when it was last updated.Allowed values: "sendDate", "createdAt", "id", "updatedAt"communicationChannelstringRequireditemsarray of CommunicationRequired36 fieldsitemsnamestringRequired when parent is presentField path: items[].namestatusstringRequired when parent is presentField path: items[].status"draft", "ready", "scheduled", "completed", "failed", "processing"smsContentstringRequired when parent is presentField path: items[].smsContentsubjectstringRequired when parent is presentField path: items[].subjectemailEditorRawContentobjectRequired when parent is presentField path: items[].emailEditorRawContentcommunicationTypestringRequired when parent is presentField path: items[].communicationType"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringRequired when parent is presentField path: items[].communicationChannel"sms", "email"scheduledAtstring (date-time)Required when parent is presentField path: items[].scheduledAtcompletedAtstring (date-time)Required when parent is presentField path: items[].completedAtadminUserIdnumberRequired when parent is presentField path: items[].adminUserIdtenantIdnumberRequired when parent is presentField path: items[].tenantIdconsentIdnumberRequired when parent is presentField path: items[].consentIdsegmentIdnumberRequired when parent is presentField path: items[].segmentIdtemplateIdnumberRequired when parent is presentField path: items[].templateIdemailPreviewTextstringRequired when parent is presentField path: items[].emailPreviewTextdeliveryMethodstringRequired when parent is presentField path: items[].deliveryMethodexternalEmailBodystringRequired when parent is presentField path: items[].externalEmailBodyemailHtmlPreviewstringRequired when parent is presentField path: items[].emailHtmlPreviewhostNamestringRequired when parent is presentField path: items[].hostNamesenderIdnumberRequired when parent is presentField path: items[].senderIdtotalRecipientsnumberRequired when parent is presentField path: items[].totalRecipientstotalPagesnumberRequired when parent is presentField path: items[].totalPagesaudienceBasisstringRequired when parent is presentField path: items[].audienceBasiscustomerWindowMonthsnumberRequired when parent is presentField path: items[].customerWindowMonthssenderCommunicationSenderRequired when parent is presentField path: items[].sender14 fieldsitems[].sendersenderNamestringRequired when parent is presentField path: items[].sender.senderNamesenderEmailstringRequired when parent is presentField path: items[].sender.senderEmailreplyTostringRequired when parent is presentField path: items[].sender.replyTocommunicationChannelstringRequired when parent is presentField path: items[].sender.communicationChannel"sms", "email"providerRegionstringRequired when parent is presentField path: items[].sender.providerRegion"global", "eu"statusstringRequired when parent is presentField path: items[].sender.status"pending", "approved", "archived"requestSentAtstring (date-time)Required when parent is presentField path: items[].sender.requestSentAttenantIdnumberRequired when parent is presentField path: items[].sender.tenantIdtenantTenantRequired when parent is presentField path: items[].sender.tenantNested fields omitted: depth limit.idnumberRequired when parent is presentField path: items[].sender.idcreatedAtstring (date-time)Required when parent is presentField path: items[].sender.createdAtupdatedAtstring (date-time)Required when parent is presentField path: items[].sender.updatedAtdeletedAtstring (date-time)Required when parent is presentField path: items[].sender.deletedAtmetaDataobjectRequired when parent is presentField path: items[].sender.metaDataadminUserUserRequired when parent is presentField path: items[].adminUserNested fields omitted: field limit.tenantTenantRequired when parent is presentField path: items[].tenantNested fields omitted: field limit.consentConsentRequired when parent is presentField path: items[].consent22 fieldsitems[].consentintegrationIdstringRequired when parent is presentField path: items[].consent.integrationIdtitlestringRequired when parent is presentField path: items[].consent.titledescriptionstringRequired when parent is presentField path: items[].consent.descriptionimagestringRequired when parent is presentField path: items[].consent.imageshowOnCheckoutPagebooleanRequired when parent is presentField path: items[].consent.showOnCheckoutPageshowOnMyPagebooleanRequired when parent is presentField path: items[].consent.showOnMyPagestatusbooleanRequired when parent is presentField path: items[].consent.statuspurposestringRequired when parent is presentField path: items[].consent.purpose"marketing_and_newsletter", "consent"frequencystringRequired when parent is presentField path: items[].consent.frequencydefaultSubscribedbooleanRequired when parent is presentField path: items[].consent.defaultSubscribedsortOrdernumberRequired when parent is presentField path: items[].consent.sortOrdervisibilitystringRequired when parent is presentField path: items[].consent.visibility"subscriber", "nonSubscriber", "all"newsletterProviderConfigNewsletterProviderConfigRequired when parent is presentField path: items[].consent.newsletterProviderConfigNested fields omitted: depth limit.newsletterProviderConfigIdnumberRequired when parent is presentField path: items[].consent.newsletterProviderConfigIdtenantIdnumberRequired when parent is presentField path: items[].consent.tenantIdtenantTenantRequired when parent is presentField path: items[].consent.tenantNested fields omitted: depth limit.communicationsarray of CommunicationRequired when parent is presentField path: items[].consent.communicationsRecursive schema; nested fields are not repeated.idnumberRequired when parent is presentField path: items[].consent.idcreatedAtstring (date-time)Required when parent is presentField path: items[].consent.createdAtupdatedAtstring (date-time)Required when parent is presentField path: items[].consent.updatedAtdeletedAtstring (date-time)Required when parent is presentField path: items[].consent.deletedAtmetaDataobjectRequired when parent is presentField path: items[].consent.metaDatasegmentSegmentRequired when parent is presentField path: items[].segmentNested fields omitted: field limit.templateCommunicationTemplateRequired when parent is presentField path: items[].templateNested fields omitted: field limit.communicationLogsarray of CommunicationLogRequired when parent is presentField path: items[].communicationLogsNested fields omitted: field limit.idnumberRequired when parent is presentField path: items[].idcreatedAtstring (date-time)Required when parent is presentField path: items[].createdAtupdatedAtstring (date-time)Required when parent is presentField path: items[].updatedAtdeletedAtstring (date-time)Required when parent is presentField path: items[].deletedAtmetaDataobjectRequired when parent is presentField path: items[].metaDatametaPageMetaRequired6 fieldsmetapagenumberRequiredField path: meta.pagetakenumberRequiredField path: meta.takecountnumberRequiredField path: meta.countpageCountnumberRequiredField path: meta.pageCounthasPreviousPagebooleanRequiredField path: meta.hasPreviousPagehasNextPagebooleanRequiredField path: meta.hasNextPage{
"items": [
{
"emailEditorRawContent": {},
"communicationLogs": [],
"metaData": {}
}
],
"meta": {
"page": 0,
"take": 0,
"count": 0,
"pageCount": 0,
"hasPreviousPage": true,
"hasNextPage": true
}
}badRequest
messageCodestringRequired"badRequest"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications?communicationChannel=%3CcommunicationChannel%3E' \
--header 'Authorization: Bearer <token>'POST/api/v1/communications
Authentication: Bearer token (JWT)
application/jsoncommunicationTypestringOptional"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringRequired"sms", "email"namestringRequiredsenderIdnumberOptionalconsentIdnumberOptionalsegmentIdnumberOptionalsmsContentstringOptionalsubjectstringOptionalemailEditorRawContentobjectOptionaltemplateIdnumberOptionalemailPreviewTextstringOptionaldeliveryMethodstringOptionalexternalEmailBodystringOptionalhostNamestringOptionalmaxLength: 255{
"communicationType": "automation",
"communicationChannel": "sms",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}idnumberRequirednamestringRequiredcommunicationTypestringRequired"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"smsContentstringRequiredsubjectstringRequiredemailEditorRawContentobjectRequiredemailPreviewTextstringRequiredstatusstringRequired"draft", "ready", "scheduled", "completed", "failed", "processing"communicationChannelstringRequired"sms", "email"createdAtstring (date-time)RequiredupdatedAtstring (date-time)RequiredsenderIdnumberRequiredsenderstringRequiredsegmentIdnumberRequiredsegmentNamestringRequiredconsentIdnumberRequiredconsentNamestringRequiredtenantIdnumberRequiredadminUserIdnumberRequiredadminUserNamestringRequiredemailHtmlPreviewstringRequiredtemplateCommunicationTemplateRequiredCan be null12 fieldstemplatenamestringRequired when parent is presentField path: template.nametemplateTypestringRequired when parent is presentField path: template.templateType"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringRequired when parent is presentField path: template.communicationChannel"sms", "email"localestringRequired when parent is presentField path: template.locale"en", "no", "sv", "da"templatestringRequired when parent is presentField path: template.templatetenantIdnumberRequired when parent is presentField path: template.tenantIdtenantTenantRequired when parent is presentField path: template.tenantNested fields omitted: field limit.idnumberRequired when parent is presentField path: template.idcreatedAtstring (date-time)Required when parent is presentField path: template.createdAtupdatedAtstring (date-time)Required when parent is presentField path: template.updatedAtdeletedAtstring (date-time)Required when parent is presentField path: template.deletedAtmetaDataobjectRequired when parent is presentField path: template.metaDatascheduledAtstring (date-time)RequiredcompletedAtstring (date-time)RequireddeliveryMethodstringRequiredexternalEmailBodystringRequiredsenderEmailstringRequired{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"communicationType": "automation",
"communicationChannel": "sms",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}'GET/api/v1/communications/{id}
Authentication: Bearer token (JWT)
idnumberRequiredSame fields as Create a communication set up (201).
{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
messageCodestringRequired"communicationNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}' \
--header 'Authorization: Bearer <token>'POST/api/v1/communications/{id}
Authentication: Bearer token (JWT)
idnumberRequiredThis response has no body.
badRequest, communicationIsNotReady, senderEmailUnapproved
messageCodestringRequired"badRequest", "communicationIsNotReady", "senderEmailUnapproved"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}' \
--request POST \
--header 'Authorization: Bearer <token>'DELETE/api/v1/communications/{id}
Authentication: Bearer token (JWT)
idnumberRequiredNo named fields are defined for this schema.
{}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}' \
--request DELETE \
--header 'Authorization: Bearer <token>'PATCH/api/v1/communications/{id}
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsoncommunicationTypestringOptional"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringOptional"sms", "email"emailContentstringOptionalnamestringOptionalsenderIdnumberOptionalconsentIdnumberOptionalsegmentIdnumberOptionalsmsContentstringOptionalsubjectstringOptionalemailEditorRawContentobjectOptionaltemplateIdnumberOptionalemailPreviewTextstringOptionaldeliveryMethodstringOptionalexternalEmailBodystringOptionalhostNamestringOptionalmaxLength: 255{
"communicationType": "automation",
"communicationChannel": "sms",
"emailContent": "<p>Hello {{name}},</p><p>Your email content here...</p>",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}Same fields as Create a communication set up (201).
{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}badRequest, communicationCannotBeUpdated, scheduledTimeMustBeInTheFuture
messageCodestringRequired"badRequest", "communicationCannotBeUpdated", "scheduledTimeMustBeInTheFuture"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}' \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"communicationType": "automation",
"communicationChannel": "sms",
"emailContent": "<p>Hello {{name}},</p><p>Your email content here...</p>",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}'GET/api/v1/communications/by-status
Authentication: Bearer token (JWT)
statusstringOptional"draft", "ready", "scheduled", "completed", "failed", "processing"idnumberRequired when parent is presentnamestringRequired when parent is present[
{
"id": 0,
"name": "string"
}
]unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/by-status \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/email/list
Authentication: Bearer token (JWT)
pagenumberOptional1minimum: 1takenumberOptional10minimum: 1maximum: 50orderBystringOptional"createdAt"Allowed values: "createdAt", "id", "updatedAt"orderDirectionstringOptional"desc"Allowed values: "asc", "desc"Same fields as Get all communication set ups (200).
{
"items": [
{
"emailEditorRawContent": {},
"communicationLogs": [],
"metaData": {}
}
],
"meta": {
"page": 0,
"take": 0,
"count": 0,
"pageCount": 0,
"hasPreviousPage": true,
"hasNextPage": true
}
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/email/list \
--header 'Authorization: Bearer <token>'POST/api/v1/communications/one-off/email
Authentication: Bearer token (JWT)
application/jsonemailstring (email)OptionalmemberIdstringOptionalsubjectstringRequiredmessagestringRequired{
"email": "user@example.com",
"memberId": "string",
"subject": "string",
"message": {
"summary": "Plain text message",
"value": "Hello, this is a plain text message with line breaks.\n\nThis is a new paragraph."
}
}This response has no body.
recipientEmailMissing, failedToSendOneOffEmail, or badRequest with errors[] = invalidMessageContent on message
messageCodestringRequired"badRequest", "recipientEmailMissing", "failedToSendOneOffEmail"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}memberNotFound
messageCodestringRequired"memberNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "memberNotFound",
"message": "string",
"errors": [
{}
]
}emailProviderRequestInvalid
messageCodestringRequired"emailProviderRequestInvalid"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "emailProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}emailProviderUnavailable
messageCodestringRequired"emailProviderUnavailable"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "emailProviderUnavailable",
"message": "string",
"errors": [
{}
]
}emailProviderRateLimited
messageCodestringRequired"emailProviderRateLimited"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "emailProviderRateLimited",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/one-off/email \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "user@example.com",
"memberId": "string",
"subject": "string",
"message": {
"summary": "Plain text message",
"value": "Hello, this is a plain text message with line breaks.\n\nThis is a new paragraph."
}
}'POST/api/v1/communications/email/send
Allows authenticated tenants to send emails using the platform email service
Authentication: Bearer token (JWT)
application/jsonnamestringRequiredsenderIdnumberRequiredminimum: 1communicationTypestringRequired"marketing", "information"consentIdnumberOptionalminimum: 1segmentIdnumberRequiredminimum: 1subjectstringRequiredemailPreviewTextstringOptionaltemplateIdnumberOptionalminimum: 1emailContentstringRequiredhostNamestringOptionalmaxLength: 255{
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"subject": "string",
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string",
"hostName": "string"
}successbooleanRequiredmessagestringRequiredidnumberRequired{
"success": true,
"message": "Email sent successfully",
"id": 123
}communicationIsNotReady, senderEmailUnapproved
messageCodestringRequired"communicationIsNotReady", "senderEmailUnapproved"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "communicationIsNotReady",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/email/send \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"subject": "string",
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string",
"hostName": "string"
}'POST/api/v1/communications/otp/send
Delivers a finished HTML OTP email over the tenant email provider. M2M only; the frontend uses it so Next.js never holds a SendGrid key.
Authentication: Bearer token (JWT)
application/jsonrecipientEmailSenderReceiverDtoRequired2 fieldsrecipientemailstring (email)RequiredField path: recipient.emailnamestringOptionalField path: recipient.namesenderEmailSenderReceiverDtoRequired2 fieldssenderemailstring (email)RequiredField path: sender.emailnamestringOptionalField path: sender.namereplyToEmailSenderReceiverDtoOptional1 required when the containing object is present2 fieldsreplyToemailstring (email)Required when parent is presentField path: replyTo.emailnamestringOptionalField path: replyTo.namesubjectstringRequiredhtmlContentstringRequiredproviderRegionSENDER_PROVIDER_REGIONRequired"global", "eu"tagsarray of stringOptionalminItems: 1{
"recipient": {
"email": "user@example.com",
"name": "string"
},
"sender": {
"email": "user@example.com",
"name": "string"
},
"replyTo": {
"email": "user@example.com",
"name": "string"
},
"subject": "string",
"htmlContent": "string",
"providerRegion": "global",
"tags": [
"string"
]
}OTP email accepted for delivery.
This response has no body.
unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}tenantNotFound
messageCodestringRequired"tenantNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "tenantNotFound",
"message": "string",
"errors": [
{}
]
}otpRecipientHardBounced
messageCodestringRequired"otpRecipientHardBounced"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "otpRecipientHardBounced",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/otp/send \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"recipient": {
"email": "user@example.com",
"name": "string"
},
"sender": {
"email": "user@example.com",
"name": "string"
},
"replyTo": {
"email": "user@example.com",
"name": "string"
},
"subject": "string",
"htmlContent": "string",
"providerRegion": "global",
"tags": [
"string"
]
}'POST/api/v1/communications/send-single-sms
Allows authenticated tenants to send sms using the platform email service
Authentication: Bearer token (JWT)
application/jsoncommunicationTypeCOMMUNICATION_TYPERequired"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"phoneNumberstringRequiredmessagestringRequiredsenderIdnumberRequiredmemberIdstringRequired{
"communicationType": "automation",
"phoneNumber": "<phoneNumber>",
"message": "string",
"senderId": 0,
"memberId": "string"
}This response has no body.
unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}senderNotFound
messageCodestringRequired"senderNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "senderNotFound",
"message": "string",
"errors": [
{}
]
}smsProviderRequestInvalid
messageCodestringRequired"smsProviderRequestInvalid"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "smsProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}smsProviderUnavailable
messageCodestringRequired"smsProviderUnavailable"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "smsProviderUnavailable",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/send-single-sms \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"communicationType": "automation",
"phoneNumber": "<phoneNumber>",
"message": "string",
"senderId": 0,
"memberId": "string"
}'POST/api/v1/communications/email/test
Allows authenticated tenants to send test email using the platform email service
Authentication: Bearer token (JWT)
application/jsonnamestringRequiredsenderIdnumberRequiredminimum: 1communicationTypestringRequired"marketing", "information"consentIdnumberOptionalminimum: 1segmentIdnumberRequiredminimum: 1emailPreviewTextstringOptionaltemplateIdnumberOptionalminimum: 1emailContentstringRequiredhostNamestringOptionalmaxLength: 255subjectstringOptionalrecipientsarray of string (email)RequiredminItems: 1maxItems: 5idnumberOptionalminimum: 1{
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string",
"hostName": "string",
"subject": "string",
"recipients": [
"recipient1@example.com",
"recipient2@example.com"
],
"id": 1
}successbooleanRequiredmessagestringRequiredidnumberRequired{
"success": true,
"message": "Email sent successfully",
"id": 123
}communicationChannelNotSupported
messageCodestringRequired"communicationChannelNotSupported"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "communicationChannelNotSupported",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}notFound
messageCodestringRequired"notFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "notFound",
"message": "string",
"errors": [
{}
]
}emailProviderRequestInvalid
Same fields as Send a one off email (422).
{
"messageCode": "emailProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}emailProviderUnavailable
Same fields as Send a one off email (502).
{
"messageCode": "emailProviderUnavailable",
"message": "string",
"errors": [
{}
]
}emailProviderRateLimited
Same fields as Send a one off email (503).
{
"messageCode": "emailProviderRateLimited",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/email/test \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string",
"hostName": "string",
"subject": "string",
"recipients": [
"recipient1@example.com",
"recipient2@example.com"
],
"id": 1
}'GET/api/v1/communications/email/preview-html/{id}
Authentication: Bearer token (JWT)
idnumberRequiredhtmlPreviewstringRequired{
"htmlPreview": "string"
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/email/preview-html/{id}' \
--header 'Authorization: Bearer <token>'POST/api/v1/communications/email/schedule
Authentication: Bearer token (JWT)
application/jsonnamestringRequiredsenderIdnumberRequiredminimum: 1communicationTypestringRequired"marketing", "information"consentIdnumberOptionalminimum: 1segmentIdnumberRequiredminimum: 1emailPreviewTextstringOptionaltemplateIdnumberOptionalminimum: 1emailContentstringRequiredhostNamestringOptionalmaxLength: 255subjectstringOptionalscheduledAtstring (date-time)RequiredtimeZonestringRequired{
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string",
"hostName": "string",
"subject": "string",
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo"
}Same fields as Email Service API (201).
{
"success": true,
"message": "Email sent successfully",
"id": 123
}scheduledTimeMustBeInTheFuture
messageCodestringRequired"scheduledTimeMustBeInTheFuture"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "scheduledTimeMustBeInTheFuture",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/email/schedule \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string",
"hostName": "string",
"subject": "string",
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo"
}'POST/api/v1/communications/{id}/email/schedule
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsonscheduledAtstring (date-time)RequiredtimeZonestringOptionalnamestringOptionalsenderIdnumberOptionalminimum: 1communicationTypestringOptional"marketing", "information"consentIdnumberOptionalminimum: 1segmentIdnumberOptionalminimum: 1subjectstringOptionalemailPreviewTextstringOptionaltemplateIdnumberOptionalminimum: 1emailContentstringOptional{
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo",
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"subject": "string",
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string"
}successbooleanRequiredmessagestringRequiredidnumberRequiredcommunicationCommunicationResponseDtoRequired27 fieldscommunicationidnumberRequiredField path: communication.idnamestringRequiredField path: communication.namecommunicationTypestringRequiredField path: communication.communicationType"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"smsContentstringRequiredField path: communication.smsContentsubjectstringRequiredField path: communication.subjectemailEditorRawContentobjectRequiredField path: communication.emailEditorRawContentemailPreviewTextstringRequiredField path: communication.emailPreviewTextstatusstringRequiredField path: communication.status"draft", "ready", "scheduled", "completed", "failed", "processing"communicationChannelstringRequiredField path: communication.communicationChannel"sms", "email"createdAtstring (date-time)RequiredField path: communication.createdAtupdatedAtstring (date-time)RequiredField path: communication.updatedAtsenderIdnumberRequiredField path: communication.senderIdsenderstringRequiredField path: communication.sendersegmentIdnumberRequiredField path: communication.segmentIdsegmentNamestringRequiredField path: communication.segmentNameconsentIdnumberRequiredField path: communication.consentIdconsentNamestringRequiredField path: communication.consentNametenantIdnumberRequiredField path: communication.tenantIdadminUserIdnumberRequiredField path: communication.adminUserIdadminUserNamestringRequiredField path: communication.adminUserNameemailHtmlPreviewstringRequiredField path: communication.emailHtmlPreviewtemplateCommunicationTemplateRequiredCan be nullField path: communication.template12 fieldscommunication.templatenamestringRequired when parent is presentField path: communication.template.nametemplateTypestringRequired when parent is presentField path: communication.template.templateType"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringRequired when parent is presentField path: communication.template.communicationChannel"sms", "email"localestringRequired when parent is presentField path: communication.template.locale"en", "no", "sv", "da"templatestringRequired when parent is presentField path: communication.template.templatetenantIdnumberRequired when parent is presentField path: communication.template.tenantIdtenantTenantRequired when parent is presentField path: communication.template.tenantNested fields omitted: depth limit.idnumberRequired when parent is presentField path: communication.template.idcreatedAtstring (date-time)Required when parent is presentField path: communication.template.createdAtupdatedAtstring (date-time)Required when parent is presentField path: communication.template.updatedAtdeletedAtstring (date-time)Required when parent is presentField path: communication.template.deletedAtmetaDataobjectRequired when parent is presentField path: communication.template.metaDatascheduledAtstring (date-time)RequiredField path: communication.scheduledAtcompletedAtstring (date-time)RequiredField path: communication.completedAtdeliveryMethodstringRequiredField path: communication.deliveryMethodexternalEmailBodystringRequiredField path: communication.externalEmailBodysenderEmailstringRequiredField path: communication.senderEmail{
"success": true,
"message": "Email sent successfully",
"id": 123,
"communication": "Communication"
}badRequest, scheduledTimeMustBeInTheFuture, scheduledFailed
messageCodestringRequired"badRequest", "scheduledTimeMustBeInTheFuture", "scheduledFailed"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/email/schedule' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo",
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"subject": "string",
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string"
}'GET/api/v1/communications/email/tokens
Authentication: Bearer token (JWT)
memberInfoarray of stringRequiredmyPageLinkarray of stringRequired{
"memberInfo": [
"string"
],
"myPageLink": [
"string"
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/email/tokens \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/email/templates
Authentication: Bearer token (JWT)
namestringRequired when parent is presenttemplateTypestringRequired when parent is present"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringRequired when parent is present"sms", "email"localestringRequired when parent is present"en", "no", "sv", "da"templatestringRequired when parent is presenttenantIdnumberRequired when parent is presenttenantTenantRequired when parent is present65 fields[].tenantmarketstringRequired when parent is presentField path: [].tenant.market"NO", "SE", "DK"productNamestringField path: [].tenant.productName"enterprise", "communication", "custom"additionalFeaturesarray of stringField path: [].tenant.additionalFeatures"email", "sms", "push", "podcasts", "subscription", "insights", "dashboard", "automation", "export", "accounting", "invoices", "ai"disabledFeaturesarray of stringField path: [].tenant.disabledFeatures"email", "sms", "push", "podcasts", "subscription", "insights", "dashboard", "automation", "export", "accounting", "invoices", "ai"namestringRequired when parent is presentField path: [].tenant.nameisActivebooleanRequired when parent is presentField path: [].tenant.isActivedefaultLanguagestringRequired when parent is presentField path: [].tenant.defaultLanguage"en", "no", "sv", "da"hostNamestringRequired when parent is presentField path: [].tenant.hostNamelogostringRequired when parent is presentField path: [].tenant.logofaviconstringRequired when parent is presentField path: [].tenant.faviconauthLogostringRequired when parent is presentField path: [].tenant.authLogoauthLogoHeightnumberRequired when parent is presentField path: [].tenant.authLogoHeightsiteUrlstringRequired when parent is presentField path: [].tenant.siteUrltermsUrlstringRequired when parent is presentField path: [].tenant.termsUrlprivacyUrlstringRequired when parent is presentField path: [].tenant.privacyUrlgtmstringRequired when parent is presentField path: [].tenant.gtmtaxRatesarray of numberField path: [].tenant.taxRatessmsOtpbooleanRequired when parent is presentField path: [].tenant.smsOtpemailProviderstringRequired when parent is presentField path: [].tenant.emailProvider"brevo", "sendgrid"tenantContactstringRequired when parent is presentField path: [].tenant.tenantContactregisteredBusinessNostringRequired when parent is presentField path: [].tenant.registeredBusinessNobankAccountNostringRequired when parent is presentField path: [].tenant.bankAccountNoswiftCodestringRequired when parent is presentField path: [].tenant.swiftCodeibanstringRequired when parent is presentField path: [].tenant.ibandefaultLogoutURLstringRequired when parent is presentField path: [].tenant.defaultLogoutURLpostalAddressstringRequired when parent is presentField path: [].tenant.postalAddressotpTemplateIdTranslationField path: [].tenant.otpTemplateIdNested fields omitted: field limit.smsSenderIdnumberRequired when parent is presentField path: [].tenant.smsSenderIdemailSenderIdnumberRequired when parent is presentField path: [].tenant.emailSenderIdsmsSenderCommunicationSenderRequired when parent is presentField path: [].tenant.smsSenderNested fields omitted: field limit.emailSenderCommunicationSenderRequired when parent is presentField path: [].tenant.emailSenderNested fields omitted: field limit.productsarray of ProductRequired when parent is presentField path: [].tenant.productsNested fields omitted: field limit.usersarray of UserRequired when parent is presentField path: [].tenant.usersNested fields omitted: field limit.membersarray of MemberRequired when parent is presentField path: [].tenant.membersNested fields omitted: field limit.rolesarray of RoleRequired when parent is presentField path: [].tenant.rolesNested fields omitted: field limit.subscriptionPlansarray of SubscriptionPlanRequired when parent is presentField path: [].tenant.subscriptionPlansNested fields omitted: field limit.packagesarray of PackageRequired when parent is presentField path: [].tenant.packagesNested fields omitted: field limit.invoicesarray of InvoiceRequired when parent is presentField path: [].tenant.invoicesNested fields omitted: field limit.ordersarray of OrderRequired when parent is presentField path: [].tenant.ordersNested fields omitted: field limit.paymentProvidersarray of PaymentProviderConfigRequired when parent is presentField path: [].tenant.paymentProvidersNested fields omitted: field limit.newslettersProviderConfigarray of NewsletterProviderConfigRequired when parent is presentField path: [].tenant.newslettersProviderConfigNested fields omitted: field limit.paymentProviderConfigsarray of PaymentProviderConfigRequired when parent is presentField path: [].tenant.paymentProviderConfigsNested fields omitted: field limit.oidcClientsarray of OidcClientRequired when parent is presentField path: [].tenant.oidcClientsNested fields omitted: field limit.oauthProvidersarray of OauthProviderRequired when parent is presentField path: [].tenant.oauthProvidersNested fields omitted: field limit.activityLogsarray of ActivityLogRequired when parent is presentField path: [].tenant.activityLogsNested fields omitted: field limit.m2m_api_clientsarray of M2MApiClientRequired when parent is presentField path: [].tenant.m2m_api_clientsNested fields omitted: field limit.customPropertiesarray of CustomPropertyRequired when parent is presentField path: [].tenant.customPropertiesNested fields omitted: field limit.consentsarray of ConsentRequired when parent is presentField path: [].tenant.consentsNested fields omitted: field limit.preferencePreferenceRequired when parent is presentField path: [].tenant.preferenceNested fields omitted: field limit.settingsTenantSettingsRequired when parent is presentField path: [].tenant.settingsNested fields omitted: field limit.communicationTemplatesarray of CommunicationTemplateRequired when parent is presentField path: [].tenant.communicationTemplatesRecursive schema; nested fields are not repeated.additionalHostnamesarray of TenantHostnameRequired when parent is presentField path: [].tenant.additionalHostnamesNested fields omitted: field limit.exportHistoryarray of ExportHistoryRequired when parent is presentField path: [].tenant.exportHistoryNested fields omitted: field limit.arReportHistoryarray of ArReportHistoryRequired when parent is presentField path: [].tenant.arReportHistoryNested fields omitted: field limit.mypageCardsSettingsarray of MypageCardsSettingsRequired when parent is presentField path: [].tenant.mypageCardsSettingsNested fields omitted: field limit.webhooksarray of WebhookRequired when parent is presentField path: [].tenant.webhooksNested fields omitted: field limit.customOrdersarray of CustomOrderRequired when parent is presentField path: [].tenant.customOrdersNested fields omitted: field limit.customOrderSourcesarray of CustomOrderSourceRequired when parent is presentField path: [].tenant.customOrderSourcesNested fields omitted: field limit.brandKitsarray of BrandKitRequired when parent is presentField path: [].tenant.brandKitsNested fields omitted: field limit.communicationReceiversarray of CommunicationReceiverRequired when parent is presentField path: [].tenant.communicationReceiversNested fields omitted: field limit.idnumberRequired when parent is presentField path: [].tenant.idcreatedAtstring (date-time)Required when parent is presentField path: [].tenant.createdAtupdatedAtstring (date-time)Required when parent is presentField path: [].tenant.updatedAtdeletedAtstring (date-time)Required when parent is presentField path: [].tenant.deletedAtmetaDataobjectRequired when parent is presentField path: [].tenant.metaDataidnumberRequired when parent is presentcreatedAtstring (date-time)Required when parent is presentupdatedAtstring (date-time)Required when parent is presentdeletedAtstring (date-time)Required when parent is presentmetaDataobjectRequired when parent is present[
{
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
}
]unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/email/templates \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/email/senders
Authentication: Bearer token (JWT)
senderNamestringRequired when parent is presentsenderEmailstringRequired when parent is presentreplyTostringRequired when parent is presentcommunicationChannelstringRequired when parent is present"sms", "email"providerRegionstringRequired when parent is present"global", "eu"statusstringRequired when parent is present"pending", "approved", "archived"requestSentAtstring (date-time)Required when parent is presenttenantIdnumberRequired when parent is presenttenantTenantRequired when parent is present65 fields[].tenantmarketstringRequired when parent is presentField path: [].tenant.market"NO", "SE", "DK"productNamestringField path: [].tenant.productName"enterprise", "communication", "custom"additionalFeaturesarray of stringField path: [].tenant.additionalFeatures"email", "sms", "push", "podcasts", "subscription", "insights", "dashboard", "automation", "export", "accounting", "invoices", "ai"disabledFeaturesarray of stringField path: [].tenant.disabledFeatures"email", "sms", "push", "podcasts", "subscription", "insights", "dashboard", "automation", "export", "accounting", "invoices", "ai"namestringRequired when parent is presentField path: [].tenant.nameisActivebooleanRequired when parent is presentField path: [].tenant.isActivedefaultLanguagestringRequired when parent is presentField path: [].tenant.defaultLanguage"en", "no", "sv", "da"hostNamestringRequired when parent is presentField path: [].tenant.hostNamelogostringRequired when parent is presentField path: [].tenant.logofaviconstringRequired when parent is presentField path: [].tenant.faviconauthLogostringRequired when parent is presentField path: [].tenant.authLogoauthLogoHeightnumberRequired when parent is presentField path: [].tenant.authLogoHeightsiteUrlstringRequired when parent is presentField path: [].tenant.siteUrltermsUrlstringRequired when parent is presentField path: [].tenant.termsUrlprivacyUrlstringRequired when parent is presentField path: [].tenant.privacyUrlgtmstringRequired when parent is presentField path: [].tenant.gtmtaxRatesarray of numberField path: [].tenant.taxRatessmsOtpbooleanRequired when parent is presentField path: [].tenant.smsOtpemailProviderstringRequired when parent is presentField path: [].tenant.emailProvider"brevo", "sendgrid"tenantContactstringRequired when parent is presentField path: [].tenant.tenantContactregisteredBusinessNostringRequired when parent is presentField path: [].tenant.registeredBusinessNobankAccountNostringRequired when parent is presentField path: [].tenant.bankAccountNoswiftCodestringRequired when parent is presentField path: [].tenant.swiftCodeibanstringRequired when parent is presentField path: [].tenant.ibandefaultLogoutURLstringRequired when parent is presentField path: [].tenant.defaultLogoutURLpostalAddressstringRequired when parent is presentField path: [].tenant.postalAddressotpTemplateIdTranslationField path: [].tenant.otpTemplateIdNested fields omitted: field limit.smsSenderIdnumberRequired when parent is presentField path: [].tenant.smsSenderIdemailSenderIdnumberRequired when parent is presentField path: [].tenant.emailSenderIdsmsSenderCommunicationSenderRequired when parent is presentField path: [].tenant.smsSenderRecursive schema; nested fields are not repeated.emailSenderCommunicationSenderRequired when parent is presentField path: [].tenant.emailSenderRecursive schema; nested fields are not repeated.productsarray of ProductRequired when parent is presentField path: [].tenant.productsNested fields omitted: field limit.usersarray of UserRequired when parent is presentField path: [].tenant.usersNested fields omitted: field limit.membersarray of MemberRequired when parent is presentField path: [].tenant.membersNested fields omitted: field limit.rolesarray of RoleRequired when parent is presentField path: [].tenant.rolesNested fields omitted: field limit.subscriptionPlansarray of SubscriptionPlanRequired when parent is presentField path: [].tenant.subscriptionPlansNested fields omitted: field limit.packagesarray of PackageRequired when parent is presentField path: [].tenant.packagesNested fields omitted: field limit.invoicesarray of InvoiceRequired when parent is presentField path: [].tenant.invoicesNested fields omitted: field limit.ordersarray of OrderRequired when parent is presentField path: [].tenant.ordersNested fields omitted: field limit.paymentProvidersarray of PaymentProviderConfigRequired when parent is presentField path: [].tenant.paymentProvidersNested fields omitted: field limit.newslettersProviderConfigarray of NewsletterProviderConfigRequired when parent is presentField path: [].tenant.newslettersProviderConfigNested fields omitted: field limit.paymentProviderConfigsarray of PaymentProviderConfigRequired when parent is presentField path: [].tenant.paymentProviderConfigsNested fields omitted: field limit.oidcClientsarray of OidcClientRequired when parent is presentField path: [].tenant.oidcClientsNested fields omitted: field limit.oauthProvidersarray of OauthProviderRequired when parent is presentField path: [].tenant.oauthProvidersNested fields omitted: field limit.activityLogsarray of ActivityLogRequired when parent is presentField path: [].tenant.activityLogsNested fields omitted: field limit.m2m_api_clientsarray of M2MApiClientRequired when parent is presentField path: [].tenant.m2m_api_clientsNested fields omitted: field limit.customPropertiesarray of CustomPropertyRequired when parent is presentField path: [].tenant.customPropertiesNested fields omitted: field limit.consentsarray of ConsentRequired when parent is presentField path: [].tenant.consentsNested fields omitted: field limit.preferencePreferenceRequired when parent is presentField path: [].tenant.preferenceNested fields omitted: field limit.settingsTenantSettingsRequired when parent is presentField path: [].tenant.settingsNested fields omitted: field limit.communicationTemplatesarray of CommunicationTemplateRequired when parent is presentField path: [].tenant.communicationTemplatesNested fields omitted: field limit.additionalHostnamesarray of TenantHostnameRequired when parent is presentField path: [].tenant.additionalHostnamesNested fields omitted: field limit.exportHistoryarray of ExportHistoryRequired when parent is presentField path: [].tenant.exportHistoryNested fields omitted: field limit.arReportHistoryarray of ArReportHistoryRequired when parent is presentField path: [].tenant.arReportHistoryNested fields omitted: field limit.mypageCardsSettingsarray of MypageCardsSettingsRequired when parent is presentField path: [].tenant.mypageCardsSettingsNested fields omitted: field limit.webhooksarray of WebhookRequired when parent is presentField path: [].tenant.webhooksNested fields omitted: field limit.customOrdersarray of CustomOrderRequired when parent is presentField path: [].tenant.customOrdersNested fields omitted: field limit.customOrderSourcesarray of CustomOrderSourceRequired when parent is presentField path: [].tenant.customOrderSourcesNested fields omitted: field limit.brandKitsarray of BrandKitRequired when parent is presentField path: [].tenant.brandKitsNested fields omitted: field limit.communicationReceiversarray of CommunicationReceiverRequired when parent is presentField path: [].tenant.communicationReceiversNested fields omitted: field limit.idnumberRequired when parent is presentField path: [].tenant.idcreatedAtstring (date-time)Required when parent is presentField path: [].tenant.createdAtupdatedAtstring (date-time)Required when parent is presentField path: [].tenant.updatedAtdeletedAtstring (date-time)Required when parent is presentField path: [].tenant.deletedAtmetaDataobjectRequired when parent is presentField path: [].tenant.metaDataidnumberRequired when parent is presentcreatedAtstring (date-time)Required when parent is presentupdatedAtstring (date-time)Required when parent is presentdeletedAtstring (date-time)Required when parent is presentmetaDataobjectRequired when parent is present[
{
"senderName": "<senderName>",
"senderEmail": "string",
"replyTo": "string",
"communicationChannel": "sms",
"providerRegion": "global",
"status": "pending",
"requestSentAt": "2019-08-24T14:15:22Z",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
}
]unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/email/senders \
--header 'Authorization: Bearer <token>'PATCH/api/v1/communications/email/edit/{id}Deprecated
This endpoint is deprecated as of 2025-10-28. Use PATCH /api/v1/communications/:id/email/edit instead.
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsoncommunicationTypestringOptional"automation", "crm", "marketing", "otp", "information", "emailStandard", "jobCompletion", "oneOff"communicationChannelstringOptional"sms", "email"emailContentstringOptionalscheduledAtstring (date-time)RequiredtimeZonestringRequirednamestringOptionalsenderIdnumberOptionalconsentIdnumberOptionalsegmentIdnumberOptionalsmsContentstringOptionalsubjectstringOptionalemailEditorRawContentobjectOptionaltemplateIdnumberOptionalemailPreviewTextstringOptionaldeliveryMethodstringOptionalexternalEmailBodystringOptionalhostNamestringOptionalmaxLength: 255{
"communicationType": "automation",
"communicationChannel": "sms",
"emailContent": "<p>Hello {{name}},</p><p>Your email content here...</p>",
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}Same fields as Create a communication set up (201).
{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}badRequest, communicationCannotBeUpdated, scheduledTimeMustBeInTheFuture
Same fields as Update a communication set up (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/email/edit/{id}' \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"communicationType": "automation",
"communicationChannel": "sms",
"emailContent": "<p>Hello {{name}},</p><p>Your email content here...</p>",
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}'PATCH/api/v1/communications/{id}/email/edit
Authentication: Bearer token (JWT)
idnumberRequiredapplication/json{
"communicationType": "automation",
"communicationChannel": "sms",
"emailContent": "<p>Hello {{name}},</p><p>Your email content here...</p>",
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}Same fields as Create a communication set up (201).
{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}badRequest, communicationCannotBeUpdated, scheduledTimeMustBeInTheFuture
Same fields as Update a communication set up (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/email/edit' \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"communicationType": "automation",
"communicationChannel": "sms",
"emailContent": "<p>Hello {{name}},</p><p>Your email content here...</p>",
"scheduledAt": "2019-08-24T14:15:22Z",
"timeZone": "Europe/Oslo",
"name": "string",
"senderId": 0,
"consentId": 0,
"segmentId": 0,
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"templateId": 0,
"emailPreviewText": "string",
"deliveryMethod": "string",
"externalEmailBody": "string",
"hostName": "string"
}'POST/api/v1/communications/{id}/schedule
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsonscheduledAtstring (date-time)Optional{
"scheduledAt": "2019-08-24T14:15:22Z"
}Same fields as Create a communication set up (201).
{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}badRequest, scheduledTimeMustBeInTheFuture, scheduledFailed, senderEmailUnapproved
messageCodestringRequired"badRequest", "scheduledTimeMustBeInTheFuture", "scheduledFailed", "senderEmailUnapproved"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/schedule' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"scheduledAt": "2019-08-24T14:15:22Z"
}'POST/api/v1/communications/{id}/schedule/cancel
Authentication: Bearer token (JWT)
idnumberRequiredSame fields as Create a communication set up (201).
{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}badRequest, communicationIsNotScheduled
messageCodestringRequired"badRequest", "communicationIsNotScheduled"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/schedule/cancel' \
--request POST \
--header 'Authorization: Bearer <token>'POST/api/v1/communications/{id}/sms/test
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsonphoneNumbersarray of stringRequiredmaxItems: 5{
"phoneNumbers": [
"<phoneNumbers>"
]
}This response has no body.
badRequest, communicationChannelNotSupported
messageCodestringRequired"badRequest", "communicationChannelNotSupported"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}notFound
Same fields as Test a third party email (404).
{
"messageCode": "notFound",
"message": "string",
"errors": [
{}
]
}smsProviderRequestInvalid
Same fields as SMS Service API (422).
{
"messageCode": "smsProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}smsProviderUnavailable
Same fields as SMS Service API (502).
{
"messageCode": "smsProviderUnavailable",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/sms/test' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"phoneNumbers": [
"<phoneNumbers>"
]
}'POST/api/v1/communications/{id}/email/test
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsonrecipientsarray of string (email)RequiredminItems: 1maxItems: 5namestringOptionalsenderIdnumberOptionalminimum: 1communicationTypestringOptional"marketing", "information"consentIdnumberOptionalminimum: 1segmentIdnumberOptionalminimum: 1subjectstringOptionalemailPreviewTextstringOptionaltemplateIdnumberOptionalminimum: 1emailContentstringOptional{
"recipients": [
"recipient1@example.com",
"recipient2@example.com"
],
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"subject": "string",
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string"
}Same fields as Test a third party email (201).
{
"success": true,
"message": "Email sent successfully",
"id": 123
}badRequest, wrongCommunicationChannel, senderEmailUnapproved
messageCodestringRequired"badRequest", "wrongCommunicationChannel", "senderEmailUnapproved"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}notFound
Same fields as Test a third party email (404).
{
"messageCode": "notFound",
"message": "string",
"errors": [
{}
]
}emailProviderRequestInvalid
Same fields as Send a one off email (422).
{
"messageCode": "emailProviderRequestInvalid",
"message": "string",
"errors": [
{}
]
}emailProviderUnavailable
Same fields as Send a one off email (502).
{
"messageCode": "emailProviderUnavailable",
"message": "string",
"errors": [
{}
]
}emailProviderRateLimited
Same fields as Send a one off email (503).
{
"messageCode": "emailProviderRateLimited",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/email/test' \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"recipients": [
"recipient1@example.com",
"recipient2@example.com"
],
"name": "string",
"senderId": 1,
"communicationType": "marketing",
"consentId": 1,
"segmentId": 1,
"subject": "string",
"emailPreviewText": "string",
"templateId": 1,
"emailContent": "string"
}'GET/api/v1/communications/{id}/members/preview
Authentication: Bearer token (JWT)
idnumberRequiredpagenumberOptional1minimum: 1takenumberOptional10minimum: 1maximum: 50orderBystringOptional"createdAt"Allowed values: "createdAt", "id", "updatedAt"orderDirectionstringOptional"desc"Allowed values: "asc", "desc"itemsarray of CommunicationMembersResponseDtoRequired7 fieldsitemsidstringRequired when parent is presentField path: items[].idfullNamestringRequired when parent is presentField path: items[].fullNameemailstringRequired when parent is presentField path: items[].emailphonestringRequired when parent is presentField path: items[].phonestatusstringField path: items[].statusmemberNumbernumberRequired when parent is presentField path: items[].memberNumberuserIdnumberRequired when parent is presentField path: items[].userIdmetaPageMetaRequired6 fieldsmetapagenumberRequiredField path: meta.pagetakenumberRequiredField path: meta.takecountnumberRequiredField path: meta.countpageCountnumberRequiredField path: meta.pageCounthasPreviousPagebooleanRequiredField path: meta.hasPreviousPagehasNextPagebooleanRequiredField path: meta.hasNextPage{
"items": [
{}
],
"meta": {
"page": 0,
"take": 0,
"count": 0,
"pageCount": 0,
"hasPreviousPage": true,
"hasNextPage": true
}
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/members/preview' \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/{id}/members/audience-split
Authentication: Bearer token (JWT)
idnumberRequiredmodestringRequired"none", "consent", "legitimate_interests"customerWindowMonthsnumberRequiredsegmentTotalnumberRequiredexistingCustomersnumberRequiredviaConsentnumberRequiredtotalnumberRequiredexcludednumberRequiredlegalReferencesCommunicationAudienceLegalReferencesDtoRequired3 fieldslegalReferencesexistingCustomersstringRequiredField path: legalReferences.existingCustomersviaConsentstringRequiredField path: legalReferences.viaConsentexcludedstringRequiredField path: legalReferences.excludedmarketingLawShortstringRequired{
"mode": "none",
"customerWindowMonths": 0,
"segmentTotal": 0,
"existingCustomers": 0,
"viaConsent": 0,
"total": 0,
"excluded": 0,
"legalReferences": {
"existingCustomers": "GDPR art. 6(1)(f) · markedsføringsloven § 15(3)",
"viaConsent": "GDPR art. 6(1)(a) · markedsføringsloven § 15(1)",
"excluded": "markedsføringsloven § 15(1) · no consent on record"
},
"marketingLawShort": "mfl. § 15"
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/members/audience-split' \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/{id}/members/communicated
Authentication: Bearer token (JWT)
idnumberRequiredpagenumberOptional1minimum: 1takenumberOptional10minimum: 1maximum: 50orderBystringOptional"createdAt"Allowed values: "createdAt", "id", "updatedAt"orderDirectionstringOptional"desc"Allowed values: "asc", "desc"Same fields as Preview communication members (200).
{
"items": [
{}
],
"meta": {
"page": 0,
"take": 0,
"count": 0,
"pageCount": 0,
"hasPreviousPage": true,
"hasNextPage": true
}
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/members/communicated' \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/{id}/members/communicated/summary
Authentication: Bearer token (JWT)
idnumberRequiredsentnumberRequiredskippedBouncednumberRequired{
"sent": 0,
"skippedBounced": 0
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/members/communicated/summary' \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/{id}/stats
Authentication: Bearer token (JWT)
idnumberRequiredsuccessnumberRequiredprocessednumberRequiredfailednumberRequiredtotalnumberRequired{
"success": 0,
"processed": 0,
"failed": 0,
"total": 0
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/stats' \
--header 'Authorization: Bearer <token>'POST/api/v1/communications/template-image/upload
Authentication: Bearer token (JWT)
multipart/form-dataimagefileRequiredimageUrlstringRequired{
"imageUrl": "string"
}badRequest with errors[] = templateImageRequired on image
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}fileSizeExceeded
This response has no body.
invalidFileType
This response has no body.
curlcurl https://api.subrite.no/api/v1/communications/template-image/upload \
--request POST \
--header 'Authorization: Bearer <token>' \
--form 'image=@<file>'GET/api/v1/communications/{id}/email/statistics
Authentication: Bearer token (JWT)
idnumberRequiredtotalProcessednumberRequiredtotalDeliverednumberRequiredtotalNotDeliverednumberRequiredtotalHardBouncednumberRequiredtotalOpenednumberRequiredtotalUniqueOpenednumberRequiredtotalClickednumberRequiredtotalUniqueClickednumberRequiredtotalDeliveredPercentagenumberRequiredtotalNotDeliveredPercentagenumberRequiredtotalOpenedPercentagenumberRequiredtotalClickedPercentagenumberRequiredtotalNotOpenednumberRequiredurlStatsarray of UrlStatDtoRequired5 fieldsurlStatsurlstringRequired when parent is presentField path: urlStats[].urltotalClicksnumberRequired when parent is presentField path: urlStats[].totalClicksuniqueClicksnumberRequired when parent is presentField path: urlStats[].uniqueClicksshareOfClicksnumberRequired when parent is presentField path: urlStats[].shareOfClicksshareOfUniqueClicksnumberRequired when parent is presentField path: urlStats[].shareOfUniqueClicks{
"totalProcessed": 0,
"totalDelivered": 0,
"totalNotDelivered": 0,
"totalHardBounced": 0,
"totalOpened": 0,
"totalUniqueOpened": 0,
"totalClicked": 0,
"totalUniqueClicked": 0,
"totalDeliveredPercentage": 0,
"totalNotDeliveredPercentage": 0,
"totalOpenedPercentage": 0,
"totalClickedPercentage": 0,
"totalNotOpened": 0,
"urlStats": [
{}
]
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/email/statistics' \
--header 'Authorization: Bearer <token>'POST/api/v1/communications/{id}/copy
Authentication: Bearer token (JWT)
idnumberRequiredSame fields as Create a communication set up (201).
{
"id": 0,
"name": "string",
"communicationType": "automation",
"smsContent": "string",
"subject": "string",
"emailEditorRawContent": {},
"emailPreviewText": "string",
"status": "draft",
"communicationChannel": "sms",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"senderId": 0,
"sender": "string",
"segmentId": 0,
"segmentName": "string",
"consentId": 0,
"consentName": "string",
"tenantId": 0,
"adminUserId": 0,
"adminUserName": "<adminUserName>",
"emailHtmlPreview": "string",
"template": {
"name": "string",
"templateType": "automation",
"communicationChannel": "sms",
"locale": "en",
"template": "string",
"tenantId": 0,
"tenant": {
"additionalFeatures": [],
"disabledFeatures": [],
"taxRates": [],
"products": [],
"users": [],
"members": [],
"roles": [],
"subscriptionPlans": [],
"packages": [],
"invoices": [],
"orders": [],
"paymentProviders": [],
"newslettersProviderConfig": [],
"paymentProviderConfigs": [],
"oidcClients": [],
"oauthProviders": [],
"activityLogs": [],
"m2m_api_clients": [],
"customProperties": [],
"consents": [],
"communicationTemplates": [],
"additionalHostnames": [],
"exportHistory": [],
"arReportHistory": [],
"mypageCardsSettings": [],
"webhooks": [],
"customOrders": [],
"customOrderSources": [],
"brandKits": [],
"communicationReceivers": [],
"metaData": {}
},
"id": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"deletedAt": "2019-08-24T14:15:22Z",
"metaData": {}
},
"scheduledAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"deliveryMethod": "string",
"externalEmailBody": "string",
"senderEmail": "string"
}badRequest
Same fields as Get all communication set ups (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}communicationNotFound
Same fields as Get a communication set up (404).
{
"messageCode": "communicationNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/communications/{id}/copy' \
--request POST \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/newsletter/communication/{id}
Authentication: Bearer token (JWT)
idnumberRequiredbadRequest
unauthorized
forbiddenResource
newsletterNotFound
internalServerError
curlcurl 'https://api.subrite.no/api/v1/communications/newsletter/communication/{id}' \
--header 'Authorization: Bearer <token>'GET/api/v1/communications/newsletter/{id}
Authentication: Bearer token (JWT)
idstringRequiredx-tenant-hoststringRequiredunauthorized
forbiddenResource
newsletterNotFound
internalServerError
curlcurl 'https://api.subrite.no/api/v1/communications/newsletter/{id}' \
--header 'Authorization: Bearer <token>' \
--header 'x-tenant-host: <x-tenant-host>'POST/api/v1/communications/one-off-email-queue/process
Authentication: Bearer token (JWT)
application/jsonpagenumberOptional1Page number for paginationminimum: 1limitnumberOptional10Number of emails to process per pageminimum: 1{
"page": 1,
"limit": 10
}No named fields are defined for this schema.
{}unauthorized
This response has no body.
forbiddenResource
Same fields as Resolve an SMS unsubscribe short code (401).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/communications/one-off-email-queue/process \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"page": 1,
"limit": 10
}'