Newsletter · API reference

Sender API

Start newsletter sendings from your own system and register webhooks for their events. Uses its own API key.

Sender API uses a separate api key. If you don’t have one, head over to our support section.

Base URLhttps://sender.dialogapi.noOpenAPI spec

Webhooks

/public/v1/webhooks
GET/public/v1/webhooks

List all webhooks

Webhooks get delivered as JSON, with current fields: ua_browser, ua_version, ua_platform, ua_device, ip, sending_id, external_id, subscriber_id, client_id, link_id

Responses
200Success
Request · curl
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://sender.dialogapi.no/public/v1/webhooks'
Example response 200
[
  {
    "id": 1,
    "url": "url",
    "event": "event",
    "created_at": "created_at"
  }
]
POST/public/v1/webhooks

Create new webhook

Webhooks get delivered as JSON, with current fields: ua_browser, ua_version, ua_platform, ua_device, ip, sending_id, external_id, subscriber_id, client_id, link_id

Parameters
urlrequired
body · string
eventrequired
body · string
Responses
200Success422Error
Request · curl
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "url": "url", "event": "delivered" }' \
  --url 'https://sender.dialogapi.no/public/v1/webhooks'
Example response 200
{
  "id": 1,
  "url": "url",
  "event": "event",
  "created_at": "created_at"
}
DELETE/public/v1/webhooks/{id}

Delete webhook

Parameters
idrequired
path · integer
Webhook ID
Responses
200Success404Webhook not found
Request · curl
curl --request DELETE \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://sender.dialogapi.no/public/v1/webhooks/{id}'

Sendings

/public/v1/sendings
POST/public/v1/sendings

Create new sending

Use either recipient_pickup_url or list_ids or recipients(max 3000 recipients) <a href="https://sender.dialogapi.no/sample.json" target=_blank>View sample file(max 1MB)</a>

Parameters
recipient_pickup_urlrequired
body · string
recipientsrequired
body · object[]
recipients[].id
body · string
recipients[].email
body · string
recipients[].custom_fields
body · object
list_idsrequired
body · integer[]
tags
body · string[]
external_id
body · string
client_id
body · string
subjectrequired
body · string
from_namerequired
body · string
from_emailrequired
body · string
replyto_emailrequired
body · string
mailbody_textrequired
body · string
mailbodyrequired
body · string
tracking_mode
body · string
anonymize_after
body · integer
Responses
200Success, returns sending_id422Error
Request · curl
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "recipient_pickup_url": "recipient_pickup_url", "recipients": [ { "id": "id", "email": "user@example.com", "custom_fields": {} } ], "list_ids": [ 1 ], "tags": [ "tags" ], "external_id": "external_id", "client_id": "client_id", "subject": "subject", "from_name": "from_name", "from_email": "user@example.com", "replyto_email": "user@example.com", "mailbody_text": "mailbody_text", "mailbody": "mailbody", "tracking_mode": "standard", "anonymize_after": 1 }' \
  --url 'https://sender.dialogapi.no/public/v1/sendings'
Example response 200
1
GET/public/v1/sendings/{id}

Get sending stats

Parameters
idrequired
path · integer
Sending ID
Responses
200Success404Sending not found
Request · curl
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://sender.dialogapi.no/public/v1/sendings/{id}'
Example response 200
{
  "id": 1,
  "unique_clicks": 1,
  "clicks": 1,
  "opens": 1,
  "bounce": 1,
  "unsubscribes": 1,
  "sent": 1
}