# Subscribers API

Keep your contacts in sync with Make. Create and update subscribers, organise them in lists and tags, and read their opens, clicks and unsubscribes.

- Base URL: `https://subscribers.dialogapi.no`
- OpenAPI spec: https://apidocs.make.as/api-docs/public/subscribers

## Custom Fields

### Find all custom fields

`GET /api/public/v2/custom_fields`

Responses:

- `200` Return all fields
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields'
```

Example response (200):

```json
[
  {
    "id": 1,
    "label": "Field 1 from table",
    "value": "EXTRA1",
    "datatype": "string"
  },
  {
    "id": 2,
    "label": "Field 2",
    "value": "EXTRA2",
    "datatype": "dropdown",
    "choices": [
      "option 1",
      "option 2"
    ]
  }
]
```

### Create custom field

`POST /api/public/v2/custom_fields`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `label` | body | string | yes |  |
| `datatype` | body | string | yes |  |
| `choices` | body | string[] |  |  |

Responses:

- `200` Field created
- `401` Unathorized
- `422` Field params invalid

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "label": "label", "datatype": "datatype", "choices": [ "choices" ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields'
```

Example response (200):

```json
{
  "id": 7,
  "label": "Consent",
  "value": "EXTRA3",
  "datatype": "gdpr_optin",
  "choices": [
    "option 1",
    "option 2"
  ]
}
```

### Show custom field

`GET /api/public/v2/custom_fields/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Field ID |

Responses:

- `200` Field found
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}'
```

Example response (200):

```json
{
  "id": 1,
  "label": "Field 1 from table",
  "value": "EXTRA1",
  "datatype": "string"
}
```

### Update custom field

`PATCH /api/public/v2/custom_fields/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Field ID |
| `label` | body | string | yes |  |
| `datatype` | body | string | yes |  |
| `choices` | body | string[] |  |  |

Responses:

- `200` Field updated
- `401` Unathorized
- `404` Not Found
- `422` Field params invalid

Request:

```bash
curl --request PATCH \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "label": "label", "datatype": "datatype", "choices": [ "choices" ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}'
```

Example response (200):

```json
{
  "id": 1,
  "label": "New label",
  "value": "EXTRA1",
  "datatype": "string"
}
```

### Delete custom field

`DELETE /api/public/v2/custom_fields/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Field ID |

Responses:

- `200` Field deleted
- `401` Unathorized
- `404` Not Found
- `422` Field is used in Signup or Profile form

Request:

```bash
curl --request DELETE \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/custom_fields/{id}'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

## Events

### Find bounce events

`GET /api/public/v2/events/bounces`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sending_id` | query | string |  | Limit events to sending IDs. Can be a comma delimited list, i.e. "101,102,103" |
| `from_date` | query | string |  | First day of the period to get events for |
| `to_date` | query | string |  | Last day of the period to get events for (inclusive) |

Responses:

- `200` Return all not deleted bounce events
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/events/bounces'
```

Example response (200):

```json
[
  {
    "subscriber_email_id": 95,
    "reason": null,
    "reasoncode": 0,
    "bounce_message": null,
    "created_at": "2020-08-26T02:00:00.000+02:00",
    "sending_id": 43,
    "bounce_source": "make.4.0.",
    "email": "test21@test.com",
    "external_id": null
  }
]
```

### Find click events

`GET /api/public/v2/events/clicks`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sending_id` | query | string |  | Limit events to sending IDs. Can be a comma delimited list, i.e. "101,102,103" |
| `from_date` | query | string |  | First day of the period to get events for |
| `to_date` | query | string |  | Last day of the period to get events for (inclusive) |

Responses:

- `200` Return all not deleted click events
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/events/clicks'
```

Example response (200):

```json
[
  {
    "subscriber_email_id": 109,
    "ua_browser": null,
    "ua_version": null,
    "ua_platform": null,
    "ua_device": null,
    "sending_id": 43,
    "link_id": null,
    "original_link": "",
    "created_at": "2020-08-26T02:00:00.000+02:00",
    "email": "test35@test.com",
    "external_id": null
  }
]
```

### Find open events

`GET /api/public/v2/events/opens`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sending_id` | query | string |  | Limit events to sending IDs. Can be a comma delimited list, i.e. "101,102,103" |
| `from_date` | query | string |  | First day of the period to get events for |
| `to_date` | query | string |  | Last day of the period to get events for (inclusive) |

Responses:

- `200` Return all not deleted open events
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/events/opens'
```

Example response (200):

```json
[
  {
    "subscriber_email_id": 123,
    "ua_browser": null,
    "ua_version": null,
    "ua_platform": null,
    "ua_device": null,
    "sending_id": 43,
    "created_at": "2020-08-26T02:00:00.000+02:00",
    "email": "test49@test.com",
    "external_id": null
  }
]
```

### Find sending events

`GET /api/public/v2/events/sendings`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sending_id` | query | string |  | Limit events to sending IDs. Can be a comma delimited list, i.e. "101,102,103" |
| `from_date` | query | string |  | First day of the period to get events for |
| `to_date` | query | string |  | Last day of the period to get events for (inclusive) |

Responses:

- `200` Return all not deleted sending events
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/events/sendings'
```

Example response (200):

```json
[
  {
    "subscriber_email_id": 137,
    "sending_id": 43,
    "created_at": "2020-08-26T02:00:00.000+02:00",
    "email": "test63@test.com",
    "external_id": null
  }
]
```

### Find unsubscribe events

`GET /api/public/v2/events/unsubscribes`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sending_id` | query | string |  | Limit events to sending IDs. Can be a comma delimited list, i.e. "101,102,103" |
| `from_date` | query | string |  | First day of the period to get events for |
| `to_date` | query | string |  | Last day of the period to get events for (inclusive) |

Responses:

- `200` Return all not deleted unsubscribe events
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/events/unsubscribes'
```

Example response (200):

```json
[
  {
    "unsubscribable_type": "SubscriberEmail",
    "unsubscribable_id": 181,
    "reason": null,
    "reasoncode": 0,
    "ua_browser": null,
    "ua_version": null,
    "ua_platform": null,
    "ua_device": null,
    "created_at": "2020-08-26T02:00:00.000+02:00",
    "sending_id": 43,
    "email": "test107@test.com",
    "external_id": null
  }
]
```

## Newsletters

### List newsletters for the subscriber

`GET /api/public/v2/newsletters/by_subscribers_email`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `email` | query | string | yes | Subscriber email |
| `include_deleted` | query | boolean |  | Include deleted newsletters |

Responses:

- `200` Newsletters listed successfully
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/newsletters/by_subscribers_email'
```

Example response (200):

```json
[
  {
    "id": 29,
    "openrate": 100,
    "subscriber_list_ids": [
      "14"
    ],
    "subscriber_segment_ids": [],
    "send_at": "2024-01-16T12:19:00.000+01:00",
    "sent_at": "2024-01-16T12:31:41.227+01:00",
    "unique_clicks": 20,
    "clicks": 24,
    "complaints": 0,
    "opens": 20,
    "bounce": 0,
    "unsubscribes": 0,
    "scheduled": 1,
    "sent": 20,
    "created_at": "2024-01-16T12:14:50.402+01:00",
    "updated_at": "2024-01-16T12:33:59.398+01:00",
    "tracking_mode": "standard",
    "external_guid": 9,
    "webversion_url": "http://test.host/",
    "preheader": "Newsletter preheader",
    "subject": "Newsletter subject",
    "from_email": "sender@email.com",
    "newsletter_screenshot_url": "http://newsletter.screenshot/",
    "opened_at": "2026-01-01T12:00:00+01:00",
    "clicked_at": null,
    "opened": true,
    "clicked": false,
    "subscriber_id": 216,
    "external_id": "a5e6f3ec-1942-49d6-8d6b-2f1248985f56"
  },
  {
    "id": 30,
    "openrate": 100,
    "subscriber_list_ids": [
      "15"
    ],
    "subscriber_segment_ids": [],
    "send_at": "2024-01-16T12:19:00.000+01:00",
    "sent_at": "2024-01-16T12:31:41.227+01:00",
    "unique_clicks": 20,
    "clicks": 24,
    "complaints": 0,
    "opens": 20,
    "bounce": 0,
    "unsubscribes": 0,
    "scheduled": 1,
    "sent": 20,
    "created_at": "2024-01-16T12:14:50.402+01:00",
    "updated_at": "2024-01-16T12:33:59.398+01:00",
    "tracking_mode": "standard",
    "external_guid": 10,
    "webversion_url": "http://test.host/",
    "preheader": "Newsletter preheader",
    "subject": "Newsletter subject",
    "from_email": "sender@email.com",
    "newsletter_screenshot_url": "http://newsletter.screenshot/",
    "opened_at": null,
    "clicked_at": "2026-01-01T12:00:00+01:00",
    "opened": false,
    "clicked": true,
    "subscriber_id": 216,
    "external_id": "a5e6f3ec-1942-49d6-8d6b-2f1248985f56"
  }
]
```

### List newsletters for the subscriber

`GET /api/public/v2/newsletters/by_subscribers_external_id`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `external_id` | query | string | yes | Subscriber external ID |
| `include_deleted` | query | boolean |  | Include deleted newsletters |

Responses:

- `200` Newsletters listed successfully
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/newsletters/by_subscribers_external_id'
```

Example response (200):

```json
[
  {
    "id": 37,
    "openrate": 100,
    "subscriber_list_ids": [
      "22"
    ],
    "subscriber_segment_ids": [],
    "send_at": "2024-01-16T12:19:00.000+01:00",
    "sent_at": "2024-01-16T12:31:41.227+01:00",
    "unique_clicks": 20,
    "clicks": 24,
    "complaints": 0,
    "opens": 20,
    "bounce": 0,
    "unsubscribes": 0,
    "scheduled": 1,
    "sent": 20,
    "created_at": "2024-01-16T12:14:50.402+01:00",
    "updated_at": "2024-01-16T12:33:59.398+01:00",
    "tracking_mode": "standard",
    "external_guid": 17,
    "webversion_url": "http://test.host/",
    "preheader": "Newsletter preheader",
    "subject": "Newsletter subject",
    "from_email": "sender@email.com",
    "newsletter_screenshot_url": "http://newsletter.screenshot/",
    "opened_at": "2026-01-01T12:00:00+01:00",
    "clicked_at": null,
    "opened": true,
    "clicked": false,
    "subscriber_id": 220,
    "external_id": "a5e6f3ec-1942-49d6-8d6b-2f1248985f56"
  },
  {
    "id": 38,
    "openrate": 100,
    "subscriber_list_ids": [
      "23"
    ],
    "subscriber_segment_ids": [],
    "send_at": "2024-01-16T12:19:00.000+01:00",
    "sent_at": "2024-01-16T12:31:41.227+01:00",
    "unique_clicks": 20,
    "clicks": 24,
    "complaints": 0,
    "opens": 20,
    "bounce": 0,
    "unsubscribes": 0,
    "scheduled": 1,
    "sent": 20,
    "created_at": "2024-01-16T12:14:50.402+01:00",
    "updated_at": "2024-01-16T12:33:59.398+01:00",
    "tracking_mode": "standard",
    "external_guid": 18,
    "webversion_url": "http://test.host/",
    "preheader": "Newsletter preheader",
    "subject": "Newsletter subject",
    "from_email": "sender@email.com",
    "newsletter_screenshot_url": "http://newsletter.screenshot/",
    "opened_at": null,
    "clicked_at": "2026-01-01T12:00:00+01:00",
    "opened": false,
    "clicked": true,
    "subscriber_id": 220,
    "external_id": "a5e6f3ec-1942-49d6-8d6b-2f1248985f56"
  }
]
```

## Signup forms

### Sign up subscriber

`POST /api/public/v2/signup_forms/{id}/signup`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Signup form ID or token |
| `email` | body | string | yes |  |
| `firstname` | body | string |  |  |
| `lastname` | body | string |  |  |
| `address` | body | string |  |  |
| `zip` | body | string |  |  |
| `city` | body | string |  |  |
| `phone` | body | string |  |  |
| `company` | body | string |  |  |
| `birthday` | body | string |  |  |
| `tags` | body | string[] |  |  |
| `external_id` | body | string |  |  |
| `gender` | body | string |  |  |

Responses:

- `200` Uses form-level country code prefix for local phone numbers
- `401` Unathorized
- `422` Subscriber params invalid

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "email": "user@example.com", "firstname": "firstname", "lastname": "lastname", "address": "address", "zip": "zip", "city": "city", "phone": "phone", "company": "company", "birthday": "2026-01-01", "tags": [ "tags" ], "external_id": "external_id", "gender": "gender" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/signup_forms/{id}/signup'
```

Example response (200):

```json
{
  "status": "200 Success",
  "id": 225
}
```

## Subscriber Tags

### Find all subscriber tags

`GET /api/public/v2/subscriber_tags`

Responses:

- `200` Return all subscriber tags
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriber_tags'
```

Example response (200):

```json
[
  {
    "id": 18,
    "title": "tag1",
    "created_at": "2026-01-01T12:00:00.000+01:00",
    "updated_at": "2026-01-01T12:00:00.000+01:00",
    "subscribers_with_tag": 0
  },
  {
    "id": 19,
    "title": "tag2",
    "created_at": "2026-01-01T12:00:00.000+01:00",
    "updated_at": "2026-01-01T12:00:00.000+01:00",
    "subscribers_with_tag": 0
  }
]
```

### Create subscriber tag

`POST /api/public/v2/subscriber_tags`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `title` | body | string | yes |  |

Responses:

- `200` Tag created
- `401` Unathorized
- `422` Tag params invalid

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "title": "title" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriber_tags'
```

Example response (200):

```json
{
  "id": 24,
  "title": "new tag",
  "created_at": "2026-01-01T12:00:00.000+01:00",
  "updated_at": "2026-01-01T12:00:00.000+01:00",
  "subscribers_with_tag": 0
}
```

### Show subscriber tag

`GET /api/public/v2/subscriber_tags/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Tag ID |

Responses:

- `200` Tag found
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriber_tags/{id}'
```

Example response (200):

```json
{
  "id": 29,
  "title": "tag1",
  "created_at": "2026-01-01T12:00:00.000+01:00",
  "updated_at": "2026-01-01T12:00:00.000+01:00",
  "subscribers_with_tag": 0
}
```

### Update subscriber tag

`PATCH /api/public/v2/subscriber_tags/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Tag ID |
| `title` | body | string | yes |  |

Responses:

- `200` Tag updated
- `401` Unathorized
- `404` Not Found
- `422` Tag params invalid

Request:

```bash
curl --request PATCH \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "title": "title" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriber_tags/{id}'
```

Example response (200):

```json
{
  "id": 35,
  "title": "mollitia",
  "created_at": "2026-01-01T12:00:00.000+01:00",
  "updated_at": "2026-01-01T12:00:00.000+01:00",
  "subscribers_with_tag": 0
}
```

### Delete subscriber tag

`DELETE /api/public/v2/subscriber_tags/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Tag ID |

Responses:

- `200` Tag deleted

Request:

```bash
curl --request DELETE \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriber_tags/{id}'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

## Subscriberlists

### Find all lists

`GET /api/public/v2/subscriberlists`

Responses:

- `200` Return all lists
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists'
```

Example response (200):

```json
[
  {
    "id": 548,
    "title": "My contacts (test list)",
    "date_created": "2026-01-01T11:00:00.000Z",
    "date_updated": "2026-01-01T11:00:00.000Z",
    "subscriber_emails": 0,
    "subscriber_sms": 0
  }
]
```

### Create list

`POST /api/public/v2/subscriberlists`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `title` | body | string | yes |  |

Responses:

- `200` List created
- `401` Unathorized
- `422` List params invalid

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "title": "title" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists'
```

Example response (200):

```json
{
  "id": 550,
  "title": "New list",
  "date_created": "2026-01-01T11:00:00.000Z",
  "date_updated": "2026-01-01T11:00:00.000Z",
  "subscriber_emails": 0,
  "subscriber_sms": 0
}
```

### Show list

`GET /api/public/v2/subscriberlists/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | List ID |

Responses:

- `200` List found
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{id}'
```

Example response (200):

```json
{
  "id": 552,
  "title": "My contacts (test list)",
  "date_created": "2026-01-01T11:00:00.000Z",
  "date_updated": "2026-01-01T11:00:00.000Z",
  "subscriber_emails": 0,
  "subscriber_sms": 0
}
```

### Update list

`PATCH /api/public/v2/subscriberlists/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | List ID |
| `title` | body | string | yes |  |

Responses:

- `200` List updated
- `401` Unathorized
- `404` Not Found
- `422` List params invalid

Request:

```bash
curl --request PATCH \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "title": "title" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{id}'
```

Example response (200):

```json
{
  "id": 555,
  "title": "New title",
  "date_created": "2026-01-01T11:00:00.000Z",
  "date_updated": "2026-01-01T11:00:00.000Z",
  "subscriber_emails": 0,
  "subscriber_sms": 0
}
```

### Delete list

`DELETE /api/public/v2/subscriberlists/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | List ID |

Responses:

- `200` List deleted
- `401` Unathorized
- `404` Not Found
- `422` List has Signup Form linked

Request:

```bash
curl --request DELETE \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriberlists/{id}'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

## Subscribers

### Find all lists with subscriber

`GET /api/public/v2/subscribers/{subscriber_id}/subscriberlists`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_id` | path | integer | yes | Subscriber ID |

Responses:

- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{subscriber_id}/subscriberlists'
```

### Add subscriber to the list

`POST /api/public/v2/subscribers/{subscriber_id}/subscriberlists`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_id` | path | integer | yes | Subscriber ID |
| `list_id` | body | integer | yes |  |

Responses:

- `200` Subscriber added to the list
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "list_id": 1 }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{subscriber_id}/subscriberlists'
```

Example response (200):

```json
{
  "list_id": 569
}
```

### Remove subscriber from the list

`DELETE /api/public/v2/subscribers/{subscriber_id}/subscriberlists/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_id` | path | integer | yes | Subscriber ID |
| `id` | path | integer | yes | List ID |

Responses:

- `200` Subscriber removed from the list
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request DELETE \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{subscriber_id}/subscriberlists/{id}'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Create or update subscriber

`POST /api/public/v2/subscribers`

NOTE: Please use captcha to prevent false signups from bots.

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_list_id[]` | query | integer[] | yes | Subscriberlist ID |
| `status` | query | string |  | Status of email. Possible value: active\|unsubscribed\|bounce |
| `status_mobile` | query | string |  | Status of mobile. Possible value: active\|unsubscribed\|bounce |
| `tag` | query | string |  | Tags handling mode. Possible values: replace \| merge. Default: replace |
| `email` | body | string | yes |  |
| `firstname` | body | string |  |  |
| `lastname` | body | string |  |  |
| `address` | body | string |  |  |
| `zip` | body | string |  |  |
| `city` | body | string |  |  |
| `phone` | body | string |  |  |
| `company` | body | string |  |  |
| `birthday` | body | string |  |  |
| `tags` | body | string[] |  |  |
| `external_id` | body | string |  |  |
| `gender` | body | string |  |  |

Responses:

- `200` Automation triggered
- `401` Unathorized
- `404` List(s) not found
- `422` Subscriber params invalid

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "email": "user@example.com", "firstname": "firstname", "lastname": "lastname", "address": "address", "zip": "zip", "city": "city", "phone": "phone", "company": "company", "birthday": "2026-01-01", "tags": [ "tags" ], "external_id": "external_id", "gender": "gender" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers'
```

Example response (200):

```json
{
  "status": "200 Success",
  "id": 313
}
```

### Show subscriber email stats

`GET /api/public/v2/subscribers/stats`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `email` | query | string |  | Subscriber email |

Responses:

- `200` Subscriber email found
- `404` Not Found

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/stats'
```

Example response (200):

```json
{
  "clicks": 4,
  "opens": 2,
  "newsletters_clicked": [
    2,
    3
  ],
  "newsletters_opened": [
    2,
    3
  ],
  "received": 3,
  "newsletters_received": [
    2,
    3,
    4
  ]
}
```

### Show subscriber by external id

`GET /api/public/v2/subscribers/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Subscriber ID |
| `external_id` | query | string |  | External Subscriber ID |

Responses:

- `200` Subscriber found
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}'
```

Example response (200):

```json
{
  "id": 341,
  "email": "test239@test.com",
  "firstname": "Firstname",
  "lastname": "Lastname",
  "address": null,
  "zip": null,
  "city": null,
  "phone": "4710000048",
  "company": null,
  "birthday": null,
  "gender": null,
  "tags": [
    "tagname",
    "tagname2"
  ],
  "external_id": "10",
  "date_created": "2026-01-01T11:00:00.000Z",
  "date_updated": "2026-01-01T11:00:00.000Z",
  "email_status": "active",
  "phone_status": "active",
  "EXTRA1": "value1",
  "EXTRA2": null,
  "EXTRA3": null,
  "EXTRA4": null,
  "OPTINEMAIL": null,
  "OPTINSMS": null,
  "OPTINEMAILSMS": null,
  "PRIVACYPOLICY": null,
  "lists": []
}
```

### Update subscriber

`PATCH /api/public/v2/subscribers/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Subscriber ID |
| `external_id` | query | string |  | External Subscriber ID |
| `status` | query | string |  | Status of email. Possible value: active \| unsubscribed \| bounce |
| `status_mobile` | query | string |  | Status of mobile. Possible value: active \| unsubscribed \| bounce |
| `tag` | query | string |  | Tags handling mode. Possible values: replace \| merge. Default: replace |
| `subscriber_list_id[]` | query | integer[] |  | Subscriberlist ID |
| `email` | body | string | yes |  |
| `firstname` | body | string |  |  |
| `lastname` | body | string |  |  |
| `address` | body | string |  |  |
| `zip` | body | string |  |  |
| `city` | body | string |  |  |
| `phone` | body | string |  |  |
| `company` | body | string |  |  |
| `birthday` | body | string |  |  |
| `tags` | body | string[] |  |  |
| `external_id` | body | string |  |  |
| `gender` | body | string |  |  |

Responses:

- `200` Subscriber is updated
- `401` Unathorized
- `404` List(s) not found
- `422` Subscriber params invalid

Request:

```bash
curl --request PATCH \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "email": "user@example.com", "firstname": "firstname", "lastname": "lastname", "address": "address", "zip": "zip", "city": "city", "phone": "phone", "company": "company", "birthday": "2026-01-01", "tags": [ "tags" ], "external_id": "external_id", "gender": "gender" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}'
```

Example response (200):

```json
{
  "status": "200 Success",
  "id": 333
}
```

### Delete subscriber

`DELETE /api/public/v2/subscribers/{id}`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Subscriber ID |
| `external_id` | query | string |  | External Subscriber ID |
| `email` | query | string |  | Subscriber email |

Responses:

- `200` Subscribers deleted
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request DELETE \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Unsubscribe email

`POST /api/public/v2/subscribers/{id}/unsubscribe_email`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Subscriber ID |

Responses:

- `200` Unsubscribed successfully
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}/unsubscribe_email'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Unsubscribe email by external id

`POST /api/public/v2/subscribers/unsubscribe_email`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `external_id` | query | string | yes | External Subscriber ID |

Responses:

- `200` Unsubscribed successfully
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/unsubscribe_email'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Unsubscribe phone

`POST /api/public/v2/subscribers/{id}/unsubscribe_phone`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Subscriber ID |

Responses:

- `200` Unsubscribed successfully
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/{id}/unsubscribe_phone'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Unsubscribe phone by external_id

`POST /api/public/v2/subscribers/unsubscribe_phone`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `external_id` | query | string | yes | External Subscriber ID |

Responses:

- `200` Unsubscribed successfully
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/unsubscribe_phone'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Create and/or update batch of subscribers. 1000 subscribers max.

`POST /api/public/v2/subscribers/bulkinsert`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_list_id[]` | query | integer[] | yes | Subscriberlist ID |
| `status` | query | string |  | Status of email. Possible value: active \| unsubscribed \| bounce \| reactivate |
| `status_mobile` | query | string |  | Status of mobile. Possible value: active \| unsubscribed \| bounce \| reactivate |
| `tag` | query | string |  | Tags handling mode. Possible values: replace \| merge. Default: replace |
| `(array)` | body | object[] | yes | Subscriber params. 1000 subscribers max. |
| `[].email` | body | string |  |  |
| `[].phone` | body | string |  |  |
| `[].firstname` | body | string |  |  |
| `[].lastname` | body | string |  |  |
| `[].address` | body | string |  |  |
| `[].zip` | body | string |  |  |
| `[].city` | body | string |  |  |
| `[].company` | body | string |  |  |
| `[].birthday` | body | string |  |  |
| `[].gender` | body | string |  |  |
| `[].external_id` | body | string |  |  |
| `[].bounce_source` | body | string |  |  |
| `[].bounce_reason` | body | string |  |  |
| `[].tags` | body | string[] |  |  |

Responses:

- `200` Custom field absent from first record is saved for subsequent records
- `401` Unathorized
- `404` List(s) not found
- `422` Subscriber params invalid

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '[ { "email": "user@example.com", "phone": "phone", "firstname": "firstname", "lastname": "lastname", "address": "address", "zip": "zip", "city": "city", "company": "company", "birthday": "2026-01-01", "gender": "gender", "external_id": "external_id", "bounce_source": "bounce_source", "bounce_reason": "bounce_reason", "tags": [ "tags" ] } ]' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkinsert'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Update batch of subscribers. 1000 subscribers max.

`PUT /api/public/v2/subscribers/bulkupdate`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_list_id[]` | query | integer[] | yes | Subscriberlist ID |
| `status` | query | string |  | Status of email. Possible value: active \| unsubscribed \| bounce \| reactivate |
| `status_mobile` | query | string |  | Status of mobile. Possible value: active \| unsubscribed \| bounce \| reactivate |
| `tag` | query | string |  | Tags handling mode. Possible values: replace \| merge. Default: replace |
| `(array)` | body | object[] | yes | Subscriber params. 1000 subscribers max. |
| `[].email` | body | string |  |  |
| `[].phone` | body | string |  |  |
| `[].firstname` | body | string |  |  |
| `[].lastname` | body | string |  |  |
| `[].address` | body | string |  |  |
| `[].zip` | body | string |  |  |
| `[].city` | body | string |  |  |
| `[].company` | body | string |  |  |
| `[].birthday` | body | string |  |  |
| `[].gender` | body | string |  |  |
| `[].external_id` | body | string |  |  |
| `[].bounce_source` | body | string |  |  |
| `[].bounce_reason` | body | string |  |  |
| `[].tags` | body | string[] |  |  |

Responses:

- `200` Custom field absent from first record is saved for subsequent records
- `401` Unathorized
- `404` List(s) not found

Request:

```bash
curl --request PUT \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '[ { "email": "user@example.com", "phone": "phone", "firstname": "firstname", "lastname": "lastname", "address": "address", "zip": "zip", "city": "city", "company": "company", "birthday": "2026-01-01", "gender": "gender", "external_id": "external_id", "bounce_source": "bounce_source", "bounce_reason": "bounce_reason", "tags": [ "tags" ] } ]' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkupdate'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Update batch of subscribers. 1000 subscribers max.

`PUT /api/public/v2/subscribers/bulkupdate_by_external_id`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_list_id[]` | query | integer[] |  | Subscriberlist ID |
| `tag` | query | string |  | Tags handling mode. Possible values: replace \| merge. Default: replace |
| `(array)` | body | object[] | yes | Subscriber params. 1000 subscribers max. |
| `[].external_id` | body | string | yes |  |
| `[].email` | body | string |  |  |
| `[].phone` | body | string |  |  |
| `[].firstname` | body | string |  |  |
| `[].lastname` | body | string |  |  |
| `[].address` | body | string |  |  |
| `[].zip` | body | string |  |  |
| `[].city` | body | string |  |  |
| `[].company` | body | string |  |  |
| `[].birthday` | body | string |  |  |
| `[].gender` | body | string |  |  |
| `[].tags` | body | string[] |  |  |

Responses:

- `200` Subscriber birthday cleared
- `401` Unathorized

Request:

```bash
curl --request PUT \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '[ { "external_id": "external_id", "email": "user@example.com", "phone": "phone", "firstname": "firstname", "lastname": "lastname", "address": "address", "zip": "zip", "city": "city", "company": "company", "birthday": "2026-01-01", "gender": "gender", "tags": [ "tags" ] } ]' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkupdate_by_external_id'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Create batch of subscribers by external_id (insert-only). 1000 subscribers max.

`POST /api/public/v2/subscribers/bulkinsert_by_external_id`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_list_id[]` | query | integer[] | yes | Subscriberlist ID |
| `status` | query | string |  | Status of email. Possible value: active \| unsubscribed \| bounce |
| `status_mobile` | query | string |  | Status of mobile. Possible value: active \| unsubscribed \| bounce |
| `tag` | query | string |  | Tags handling mode. Possible values: replace \| merge. Default: replace |
| `(array)` | body | object[] | yes | Subscriber params. 1000 subscribers max. |
| `[].external_id` | body | string | yes |  |
| `[].email` | body | string |  |  |
| `[].phone` | body | string |  |  |
| `[].firstname` | body | string |  |  |
| `[].lastname` | body | string |  |  |
| `[].address` | body | string |  |  |
| `[].zip` | body | string |  |  |
| `[].city` | body | string |  |  |
| `[].company` | body | string |  |  |
| `[].birthday` | body | string |  |  |
| `[].gender` | body | string |  |  |
| `[].tags` | body | string[] |  |  |
| `[].custom_fields` | body | object |  |  |

Responses:

- `200` Unsubscribed contacts added
- `401` Unathorized
- `404` List(s) not found
- `422` Email conflict - email belongs to subscriber with different external_id (Case 4/5)

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '[ { "external_id": "external_id", "email": "user@example.com", "phone": "phone", "firstname": "firstname", "lastname": "lastname", "address": "address", "zip": "zip", "city": "city", "company": "company", "birthday": "2026-01-01", "gender": "gender", "tags": [ "tags" ], "custom_fields": {} } ]' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkinsert_by_external_id'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Remove batch of subscribers from list. 1000 subscribers max.

`POST /api/public/v2/subscribers/bulkremove`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_list_id[]` | query | integer[] | yes | Subscriberlist ID |
| `(array)` | body | object[] | yes | Subscriber email or phone. 1000 entries max. |
| `[].email` | body | string |  |  |
| `[].phone` | body | string |  |  |
| `[].external_id` | body | string |  |  |

Responses:

- `200` Contacts removed from list
- `401` Unathorized

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '[ { "email": "user@example.com", "phone": "phone", "external_id": "external_id" } ]' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/bulkremove'
```

Example response (200):

```json
{
  "status": "200 Success"
}
```

### Show subscriber based on email

`POST /api/public/v2/subscribers/by_email`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `email` | body | string |  |  |

Responses:

- `200` Subscriber found
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "email": "user@example.com" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/by_email'
```

Example response (200):

```json
{
  "id": 419,
  "email": "test284@test.com",
  "firstname": "Firstname",
  "lastname": "Lastname",
  "address": null,
  "zip": null,
  "city": null,
  "phone": "4710000077",
  "company": null,
  "birthday": null,
  "gender": null,
  "tags": [
    "tagname",
    "tagname2"
  ],
  "external_id": "10",
  "date_created": "2026-01-01T11:00:00.000Z",
  "date_updated": "2026-01-01T11:00:00.000Z",
  "status": "active",
  "EXTRA1": "value1",
  "EXTRA2": null,
  "EXTRA3": null,
  "EXTRA4": null,
  "OPTINEMAIL": null,
  "OPTINSMS": null,
  "OPTINEMAILSMS": null,
  "PRIVACYPOLICY": null,
  "lists": [
    {
      "id": 741,
      "title": "List"
    }
  ]
}
```

### Show subscriber based on phone

`POST /api/public/v2/subscribers/by_phone`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `phone` | body | string |  |  |

Responses:

- `200` Subscriber found
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "phone": "phone" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/by_phone'
```

Example response (200):

```json
{
  "id": 422,
  "email": "test287@test.com",
  "firstname": "Firstname",
  "lastname": "Lastname",
  "address": null,
  "zip": null,
  "city": null,
  "phone": "4710000080",
  "company": null,
  "birthday": null,
  "gender": null,
  "tags": [
    "tagname",
    "tagname2"
  ],
  "external_id": "10",
  "date_created": "2026-01-01T11:00:00.000Z",
  "date_updated": "2026-01-01T11:00:00.000Z",
  "status": "active",
  "EXTRA1": "value1",
  "EXTRA2": null,
  "EXTRA3": null,
  "EXTRA4": null,
  "OPTINEMAIL": null,
  "OPTINSMS": null,
  "OPTINEMAILSMS": null,
  "PRIVACYPOLICY": null,
  "lists": [
    {
      "id": 747,
      "title": "List"
    }
  ]
}
```

### Show subscriber based on trackingtoken

`POST /api/public/v2/subscribers/by_trackingtoken`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `trackingtoken` | body | string |  |  |

Responses:

- `200` Subscriber found
- `401` Unathorized
- `404` Not Found

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "trackingtoken": "trackingtoken" }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/by_trackingtoken'
```

Example response (200):

```json
{
  "id": 425,
  "email": "test290@test.com",
  "firstname": "Firstname",
  "lastname": "Lastname",
  "address": null,
  "zip": null,
  "city": null,
  "phone": "4710000083",
  "company": null,
  "birthday": null,
  "gender": null,
  "tags": [
    "tagname",
    "tagname2"
  ],
  "external_id": "10",
  "date_created": "2026-01-01T11:00:00.000Z",
  "date_updated": "2026-01-01T11:00:00.000Z",
  "make_id": 1452,
  "EXTRA1": "value1",
  "EXTRA2": null,
  "EXTRA3": null,
  "EXTRA4": null,
  "OPTINEMAIL": null,
  "OPTINSMS": null,
  "OPTINEMAILSMS": null,
  "PRIVACYPOLICY": null,
  "lists": [
    {
      "id": 753,
      "title": "List"
    }
  ]
}
```

### Show subscribers based on list id

`GET /api/public/v2/subscribers/by_list`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `list_id` | query | integer | yes | Subscriberlist ID |
| `status` | query | string |  | Status of email. Possible value: active\|unsubscribed\|bounce. Default: active |
| `status_mobile` | query | string |  | Status of mobile. Possible value: active\|unsubscribed\|bounce. Default: active |
| `page` | query | integer |  | Page number |
| `per_page` | query | integer |  | Number of entries per page (MAX 1000) |
| `updated_after` | query | string |  | Filter by updated date. Format: YYYY-MM-DDTHH:MM:SSZ (iso8601) |

Responses:

- `200` Unsubscribed email and subscribed phone subscribers found
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/by_list'
```

Example response (200):

```json
[
  {
    "id": 436,
    "email": "test301@test.com",
    "firstname": "Firstname",
    "lastname": "Lastname",
    "address": null,
    "zip": null,
    "city": null,
    "phone": "4710000094",
    "company": null,
    "birthday": null,
    "gender": null,
    "tags": [],
    "external_id": "11",
    "date_created": "2026-01-01T11:00:00.000Z",
    "date_updated": "2026-01-01T11:00:00.000Z",
    "email_status": "unsubscribed",
    "phone_status": "unsubscribed",
    "EXTRA1": "value1",
    "EXTRA2": null,
    "EXTRA3": null,
    "EXTRA4": null,
    "OPTINEMAIL": null,
    "OPTINSMS": null,
    "OPTINEMAILSMS": null,
    "PRIVACYPOLICY": null,
    "lists": [
      {
        "id": 763,
        "title": "List"
      }
    ]
  }
]
```

## Subscriptions

### Bulk insert products for user

`POST /api/public/v2/subscribers/subscriptions/products/bulkinsert`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `products` | body | object[] | yes |  |
| `products[].external_id` | body | string | yes |  |
| `products[].name` | body | string |  |  |
| `products[].price_cents` | body | integer |  |  |

Responses:

- `201` Products inserted successfully

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "products": [ { "external_id": "external_id", "name": "name", "price_cents": 1 } ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/subscriptions/products/bulkinsert'
```

Example response (201):

```json
{
  "message": "products inserted successfully"
}
```

### Bulk insert subscriptions for subscribers

`POST /api/public/v2/subscribers/subscriptions/bulkinsert`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_subscriptions` | body | object[] | yes |  |
| `subscriber_subscriptions[].email` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions` | body | object[] | yes |  |
| `subscriber_subscriptions[].subscriptions[].external_id` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions[].product_external_id` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions[].start_date` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions[].end_date` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].name` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].deliveries` | body | integer |  |  |
| `subscriber_subscriptions[].subscriptions[].interval_days` | body | integer |  |  |
| `subscriber_subscriptions[].subscriptions[].status` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].payment_method_name` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].cancellation_reason` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].cancel_date` | body | string |  |  |

Responses:

- `201` subscriptions inserted with auto-created products

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "subscriber_subscriptions": [ { "email": "user@example.com", "subscriptions": [ {} ] } ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/subscriptions/bulkinsert'
```

Example response (201):

```json
{
  "message": "subscriptions inserted successfully"
}
```

### Bulk insert subscriptions for subscribers

`POST /api/public/v2/subscribers/subscriptions/bulkinsert_by_external_id`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_subscriptions` | body | object[] | yes |  |
| `subscriber_subscriptions[].external_id` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions` | body | object[] | yes |  |
| `subscriber_subscriptions[].subscriptions[].external_id` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions[].product_external_id` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions[].start_date` | body | string | yes |  |
| `subscriber_subscriptions[].subscriptions[].end_date` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].name` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].deliveries` | body | integer |  |  |
| `subscriber_subscriptions[].subscriptions[].interval_days` | body | integer |  |  |
| `subscriber_subscriptions[].subscriptions[].status` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].payment_method_name` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].cancellation_reason` | body | string |  |  |
| `subscriber_subscriptions[].subscriptions[].cancel_date` | body | string |  |  |

Responses:

- `201` subscriptions inserted with auto-created products

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "subscriber_subscriptions": [ { "external_id": "external_id", "subscriptions": [ {} ] } ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/subscriptions/bulkinsert_by_external_id'
```

Example response (201):

```json
{
  "message": "subscriptions inserted successfully"
}
```

## Tickets

### Bulk insert events for subscribers

`POST /api/public/v2/subscribers/tickets/events/bulkinsert`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `events` | body | object[] | yes |  |
| `events[].external_id` | body | string | yes |  |
| `events[].title` | body | string |  |  |
| `events[].category` | body | string |  |  |
| `events[].start_date` | body | string | yes |  |
| `events[].end_date` | body | string |  |  |
| `events[].venue` | body | string |  |  |
| `events[].url` | body | string |  |  |
| `events[].status` | body | string |  |  |

Responses:

- `201` Events inserted successfully

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "events": [ { "external_id": "external_id", "title": "title", "category": "category", "start_date": "2026-01-01", "end_date": "2026-01-01", "venue": "venue", "url": "url", "status": "active" } ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/tickets/events/bulkinsert'
```

Example response (201):

```json
{
  "message": "Events inserted successfully"
}
```

### Bulk insert tickets for subscribers

`POST /api/public/v2/subscribers/tickets/bulkinsert`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_tickets` | body | object[] | yes |  |
| `subscriber_tickets[].email` | body | string | yes |  |
| `subscriber_tickets[].tickets` | body | object[] | yes |  |
| `subscriber_tickets[].tickets[].external_id` | body | string | yes |  |
| `subscriber_tickets[].tickets[].event_external_id` | body | string | yes |  |
| `subscriber_tickets[].tickets[].count` | body | integer |  |  |
| `subscriber_tickets[].tickets[].price_cents` | body | integer |  |  |
| `subscriber_tickets[].tickets[].purchased_at` | body | string |  |  |
| `subscriber_tickets[].tickets[].status` | body | string |  |  |

Responses:

- `201` Tickets inserted successfully
- `422` Invalid ticket payload

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "subscriber_tickets": [ { "email": "user@example.com", "tickets": [ {} ] } ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/tickets/bulkinsert'
```

Example response (201):

```json
{
  "message": "Tickets inserted successfully"
}
```

### Bulk insert tickets for subscribers by external id

`POST /api/public/v2/subscribers/tickets/bulkinsert_by_external_id`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subscriber_tickets` | body | object[] | yes |  |
| `subscriber_tickets[].external_id` | body | string | yes |  |
| `subscriber_tickets[].tickets` | body | object[] | yes |  |
| `subscriber_tickets[].tickets[].external_id` | body | string | yes |  |
| `subscriber_tickets[].tickets[].event_external_id` | body | string | yes |  |
| `subscriber_tickets[].tickets[].count` | body | integer |  |  |
| `subscriber_tickets[].tickets[].price_cents` | body | integer |  |  |
| `subscriber_tickets[].tickets[].status` | body | string |  |  |
| `subscriber_tickets[].tickets[].purchased_at` | body | string |  |  |

Responses:

- `201` Tickets inserted successfully
- `422` Invalid ticket payload

Request:

```bash
curl --request POST \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --data '{ "subscriber_tickets": [ { "external_id": "external_id", "tickets": [ {} ] } ] }' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscribers/tickets/bulkinsert_by_external_id'
```

Example response (201):

```json
{
  "message": "Tickets inserted successfully"
}
```

## Subscriberstatus

### Get latest updated subscribers

`GET /api/public/v2/subscriberstatus`

Parameters:

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `from_date` | query | string |  | Date to get subscribers updated after this date. Format: YYYY-MM-DD |
| `to_date` | query | string |  | Date to get subscribers updated before this date. Format: YYYY-MM-DD |

Responses:

- `200` Return all lists
- `401` Unathorized

Request:

```bash
curl --request GET \
  --user 'user_id:api_key' \
  --header 'content-type: application/json' \
  --url 'https://subscribers.dialogapi.no/api/public/v2/subscriberstatus'
```

Example response (200):

```json
[
  {
    "id": 440,
    "email": "test305@test.com",
    "firstname": "Firstname",
    "lastname": "Lastname",
    "address": null,
    "zip": null,
    "city": null,
    "phone": "4710000098",
    "company": null,
    "birthday": null,
    "gender": null,
    "date_created": "2026-01-01T11:00:00.000Z",
    "date_updated": "2026-01-01T11:00:00.000Z",
    "inactive_emails": [
      {
        "email": "unsubscribed@test.com",
        "status": "unsubscribed",
        "reason": "The content is not relevant for me"
      }
    ],
    "inactive_phones": [],
    "date_updated_by_user": "2026-01-01T11:00:00.000Z",
    "OPTINEMAIL": null,
    "OPTINSMS": null,
    "OPTINEMAILSMS": null,
    "PRIVACYPOLICY": null
  }
]
```
