Skip to content

Change newsletter settings

PATCH
/api/v1/newsletter/settings
curl --request PATCH \
--url https://digize.com/api/v1/newsletter/settings \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "provider": "resend", "fromAddressId": "example", "doubleOptIn": true, "address": "example", "postUrl": "example", "tracking": { "opens": true, "clicks": true } }'

Saves some of the Newsletter module’s settings; what’s left out stays as it is. Open tracking covers conversation and automation emails too.

Needs the newsletter:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
provider
Any of:
string
Allowed values: resend sendgrid mailjet
fromAddressId
Any of:
string
>= 1 characters <= 64 characters
doubleOptIn

Whether people who sign up on a form, at checkout or through the API confirm by email first.

boolean
address

The business’s postal address, in every post’s footer as anti-spam laws ask. A post can’t be sent without it.

string
<= 300 characters
postUrl

Where a post is on the workspace’s own site, with {slug} for its slug, such as https://example.com/blog/{slug}; empty for none. The view online and web links use it.

string
<= 500 characters
tracking

Whether the workspace’s email says when it’s opened and clicked.

object
opens
required

The open pixel in posts, conversation emails and automations’ emails.

boolean
clicks
required

Posts’ links go through Digize first.

boolean

Done

Media typeapplication/json
object
provider
required
Any of:
string
Allowed values: resend sendgrid mailjet
fromAddressId
required
Any of:
string
>= 1 characters <= 64 characters
doubleOptIn
required

Whether people who sign up on a form, at checkout or through the API confirm by email first.

boolean
address
required

The business’s postal address, in every post’s footer as anti-spam laws ask. A post can’t be sent without it.

string
<= 300 characters
postUrl
required

Where a post is on the workspace’s own site, with {slug} for its slug, such as https://example.com/blog/{slug}; empty for none. The view online and web links use it.

string
<= 500 characters
tracking
required

Whether the workspace’s email says when it’s opened and clicked.

object
opens
required

The open pixel in posts, conversation emails and automations’ emails.

boolean
clicks
required

Posts’ links go through Digize first.

boolean

Example

{
"provider": "resend"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}