diff --git a/docs/api/add-subscriber-to-segment.api.mdx b/docs/api/add-subscriber-to-segment.api.mdx
new file mode 100644
index 0000000..543b472
--- /dev/null
+++ b/docs/api/add-subscriber-to-segment.api.mdx
@@ -0,0 +1,58 @@
+---
+id: add-subscriber-to-segment
+title: "Add a subscriber to a segmentation list"
+description: "Add a subscriber to a segmentation list by email"
+sidebar_label: "Add a subscriber to a segmentation list"
+hide_title: true
+hide_table_of_contents: true
+api: eJy1WW1z2zYS/isY5kui0Yuj2JdG35xEvXrqJhlZuZtO7KkgErTQkAALgLZ1jv97nwVIipRkx0lzzkwsEYt932d36dvI8UsbTT5FVlzmQjnupFY2uuhHibCxkQV9jybRcZIwzmy5pIdLYZjT9L11iWXSOrZcM5FzmUX9SBfC+JOTBAx4kpw1t+f6LNwEmRG2gEgBLW6j8cEB/erK3txj4CISkr0jGZxirRzxBANeFJmM/enoT0tcbiMbr6AafXLrQoCvXv4pYrpYGNLVyaCDEX+VwjrSuiG1zkh1Gd31O346hVzbouLG8DX4SSdy+3VB8h4JjblT78mHaR6p5j1ksRHcieTY7Z72o1SbnOMkSkAzcDIXdKUskm+7Uv/0o8N90X3NE1a5/FtiyNX6fYrEhQ7SZaTEa52smbRMiVhYyw1FohuAu/6GupVUSjsmFF9mItm9clGrfrir+jtcTHWpkn+m+JYqNccHdN8puwfu1QaMx7sGfFTISO8tGM+mCgLWP8wWjwOPD8g9uuy35mhfJp1Aa6N4BnAwV6SAMdoMfxwweH77sl7c8LzwRtyjAjT2n97oRHyFwbv5dPbu+PSPs+nsP9PZH9PZ7P2M7j+ASu37afri5fKA/zRIxPNXg8P05XjAX4pkcLBMnsfLly/S8as0agqyYkqVQ2x/kJ/2QmQ3VPSY6XQXxi07eWuH7HddspgrdikccyuBh9RZYp5lMJjp0qAVFYU2OBU8H27y5D4I3kBe46tPj3NW/3FkF7VPC254LpAG1heGwhfIvxnwQg4+C68beWAleCJMtN1nfyfbjj+csEBKAZIGuDRxphT93RDUdlElNaIScSUyisggp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Zb5jK2axGsnB+VBnRzKdnYT6d0lRKNJ0soVCfylw6JEcnSSp4toxgH/MaSGwrNREdihcBUFXmSOchO/HpwcRN7BEDjzfX+/7oWnrwjYUEqvPKHCSjK60P77DGyZzfyLzMmSpzmgIgpYFsXxeULNaDohXwLWqk1zva0NB4g6JB2lWgTzyXJVpgUMnTjxt6tB/w5Iz22BoGC4N2pGgqlcjCa8JjwGRO0jB+lDFVYmMibl+vJGCBjGwaWO2XOVh4XQFAiVaCRtx6tCI2nOECoCsX8YoraXOquY6QjRuobZeoKWi2x9omBisOB9tCxDKVMauGJpo+YIvveci7724Smwx62wyTvyF6e5vcCkjJt6bOEENO7daDPqWWI5d5dAntPbyg8o1FlyBOU/Rd8oenKZq51EMnfKyr1X5LVH+3hdU9qe4UlR/bDac7604YzZpN4/Hh9GZQ17EiLTOPSGRBo2DHCMIwXzohnrwyNK54XGvz2eeBRe0gZsCYIaMxhULvZx8jAHIKNqBdbLkS91P+WXgZzeATvLXfVd0InoUM8EDeSh2CFu8Vrz+M8x6ktOgzDHHciiaN/tG8MeUomtbEV9VMDRRkNeFEsxRjTFC+0RLhEvN1k/F1iGu1Kn0adWmSDBfhsTZD3CEdEUmGc4Btut7OCwzgtAmEWfr58GB4QIto9T7jpLUk0d5JuwamMxrCq4Xnke9Ut9eg1p7+Pa9lq33IiRs3KjIMuf6lnvHvGcMi1H0ZjCvdVQgPJoEZ1poVbVC4cXtLY8pHk93d0WN4yKzxHB+vuJFUgH5fSqQN79nqzfBey57Oqo3uGXtg7dtrTP0qQNEGfcWzkr7hI63U9Zp5R0tRtRF/t2Jby/peZYLQ9vrfaES77+Pl/h/29AcV3nmJ0NE7UL0J2g3mxGhDsfPyaHPjOKbt8kHa9oL+4f3ZHMTL6gWV12QSGX5NKz/+n0Tn+Of/2BD+cEHv7+n5bZRxdVliFAFN4Es/fwOMYKsZ
+sidebar_class_name: "post api-method"
+info_path: docs/api/introduction
+custom_edit_url: null
+---
+
+import ApiTabs from "@theme/ApiTabs";
+import DiscriminatorTabs from "@theme/DiscriminatorTabs";
+import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
+import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
+import MimeTabs from "@theme/MimeTabs";
+import ParamsItem from "@theme/ParamsItem";
+import ResponseSamples from "@theme/ResponseSamples";
+import SchemaItem from "@theme/SchemaItem";
+import SchemaTabs from "@theme/SchemaTabs";
+import Markdown from "@theme/Markdown";
+import OperationTabs from "@theme/OperationTabs";
+import TabItem from "@theme/TabItem";
+
+
Add a subscriber to a segmentation list
+
+
+
+
+
+Add a subscriber to a segmentation list by email
+
+## Request
+
+Path Parameters
Header Parameters
Body
+
+Subscriber added to segmentation list
+
+
Schema
segmentationLists object[]
+
+Bad request
+
+
+
+Not found
+
+
+
+Unprocessable Entity
+
+
+
+Internal server error.
+
+
+
\ No newline at end of file
diff --git a/docs/api/segmentations.tag.mdx b/docs/api/segmentations.tag.mdx
new file mode 100644
index 0000000..fa018ac
--- /dev/null
+++ b/docs/api/segmentations.tag.mdx
@@ -0,0 +1,20 @@
+---
+id: segmentations
+title: "Segmentations"
+description: "Segmentations"
+custom_edit_url: null
+---
+
+
+
+Manage your Pingback segmentation lists.
+
+
+
+```mdx-code-block
+import DocCardList from '@theme/DocCardList';
+import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
+
+
+```
+
\ No newline at end of file
diff --git a/docs/api/sidebar.js b/docs/api/sidebar.js
index 1341bb7..af1d7a9 100644
--- a/docs/api/sidebar.js
+++ b/docs/api/sidebar.js
@@ -1 +1,26 @@
-module.exports = [{"type":"doc","id":"api/introduction"},{"type":"category","label":"Subscribers","link":{"type":"doc","id":"api/subscribers"},"items":[{"type":"doc","id":"api/create-subscriber","label":"Create a subscriber","className":"api-method post"},{"type":"doc","id":"api/get-subscriber","label":"Get a subscriber","className":"api-method get"},{"type":"doc","id":"api/update-subscriber","label":"Update a subscriber","className":"api-method put"}]}];
\ No newline at end of file
+module.exports = [
+ { type: "doc", id: "api/introduction" },
+ {
+ type: "category",
+ label: "Subscribers",
+ link: { type: "doc", id: "api/subscribers" },
+ items: [
+ { type: "doc", id: "api/create-subscriber", label: "Create a subscriber", className: "api-method post" },
+ { type: "doc", id: "api/get-subscriber", label: "Get a subscriber", className: "api-method get" },
+ { type: "doc", id: "api/update-subscriber", label: "Update a subscriber", className: "api-method put" },
+ ],
+ },
+ {
+ type: "category",
+ label: "Segmentations",
+ link: { type: "doc", id: "api/segmentations" },
+ items: [
+ {
+ type: "doc",
+ id: "api/add-subscriber-to-segment",
+ label: "Add a subscriber to a segmentation list",
+ className: "api-method post",
+ },
+ ],
+ },
+];
diff --git a/package.json b/package.json
index f5a5c1f..af353fd 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
- "gen-api-docs": "docusaurus gen-api-docs",
+ "gen-api-docs": "docusaurus gen-api-docs all",
"clean-api-docs": "docusaurus clean-api-docs",
"gen-api-docs:version": "docusaurus gen-api-docs:version",
"clean-api-docs:version": "docusaurus clean-api-docs:version"
diff --git a/specs/api.yaml b/specs/api.yaml
index d205de9..5ff0168 100644
--- a/specs/api.yaml
+++ b/specs/api.yaml
@@ -90,6 +90,9 @@ tags:
- name: subscribers
description: Manage your Pingback subscribers.
x-displayName: Subscribers
+ - name: segmentations
+ description: Manage your Pingback segmentation lists.
+ x-displayName: Segmentations
paths:
/subscriber:
parameters:
@@ -205,6 +208,7 @@ paths:
example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
requestBody:
$ref: "#/components/requestBodies/Subscriber"
+
"/subscriber/{email}":
parameters:
- name: x-api-key
@@ -348,6 +352,180 @@ paths:
- paid_subscriber
- unsubscribed_subscriber
example: free_subscriber
+
+ "/segmentation/add-subscriber/{email}":
+ parameters:
+ - name: x-api-key
+ in: header
+ description: Your API key
+ required: true
+ schema:
+ type: string
+ - name: x-developer-mode
+ in: header
+ description: Enable developer mode. Learn more [here](/docs/api/introduction#developer-mode).
+ required: false
+ schema:
+ type: boolean
+ - name: email
+ in: path
+ description: Subscriber email address
+ required: true
+ schema:
+ type: string
+ post:
+ tags:
+ - segmentations
+ summary: Add a subscriber to a segmentation list
+ description: Add a subscriber to a segmentation list by email
+ operationId: addSubscriberToSegment
+ responses:
+ "200":
+ description: Subscriber added to segmentation list
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ requestId:
+ type: string
+ segmentationLists:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ subscriberEmail:
+ type: string
+ subscriberId:
+ type: string
+ segmentationListId:
+ type: string
+ createdAt:
+ type: string
+ format: date-time
+ updatedAt:
+ type: string
+ format: date-time
+ "400":
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ anyOf:
+ - title: Body is necessary
+ type: object
+ properties:
+ error:
+ type: string
+ example: Body is necessary
+ errorCode:
+ type: string
+ example: MISSING_BODY
+ requestId:
+ type: string
+ example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
+ - title: Subscriber not enabled
+ type: object
+ properties:
+ error:
+ type: string
+ example: Subscriber not enabled
+ errorCode:
+ type: string
+ example: SUBSCRIBER_NOT_ENABLED
+ requestId:
+ type: string
+ example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
+ "404":
+ description: Not found
+ content:
+ application/json:
+ schema:
+ anyOf:
+ - title: Subscriber not found
+ type: object
+ properties:
+ error:
+ type: string
+ example: Subscriber not found
+ errorCode:
+ type: string
+ example: SUBSCRIBER_NOT_FOUND
+ requestId:
+ type: string
+ example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
+ - title: Segmentation list not found
+ type: object
+ properties:
+ error:
+ type: string
+ example: Segmentation list not found
+ errorCode:
+ type: string
+ example: SEGMENTATION_LIST_NOT_FOUND
+ requestId:
+ type: string
+ example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
+ "422":
+ description: Unprocessable Entity
+ content:
+ application/json:
+ schema:
+ anyOf:
+ - title: Subscriber email is necessary
+ type: object
+ properties:
+ error:
+ type: string
+ example: Subscriber email is necessary
+ errorCode:
+ type: string
+ example: SUBSCRIBER_EMAIL_IS_NECESSARY
+ requestId:
+ type: string
+ example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
+ - title: Unprocessable Entity
+ type: object
+ properties:
+ error:
+ type: string
+ example: Unprocessable Entity.
+ errorCode:
+ type: string
+ example: INVALID_INPUT
+ requestId:
+ type: string
+ example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
+ "500":
+ description: Internal server error.
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ example: Internal server error.
+ errorCode:
+ type: string
+ example: INTERNAL_SERVER_ERROR
+ requestId:
+ type: string
+ example: ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ segmentationLists:
+ description: List of segmentation lists IDs. You can get the ID by calling our support team.
+ type: array
+ items:
+ type: string
+ example: ["ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f", "ff37b0a8-de19-4f72-a7ed-0bd1cb73f29f"]
components:
schemas:
CustomFields: