docs: Update openapi.json to match actual API outputs
This commit is contained in:
+136
-195
@@ -458,17 +458,27 @@
|
|||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"contact": {
|
||||||
"type": "string"
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"to": {
|
"email": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
},
|
"description": "Email record ID"
|
||||||
"status": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"timestamp": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -561,26 +571,16 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"contact": {
|
"contact": {
|
||||||
"type": "object",
|
"type": "string",
|
||||||
"properties": {
|
"description": "Contact ID"
|
||||||
"id": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"email": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"event": {
|
"event": {
|
||||||
"type": "object",
|
"type": "string",
|
||||||
"properties": {
|
"description": "Event ID"
|
||||||
"id": {
|
},
|
||||||
"type": "string"
|
"timestamp": {
|
||||||
},
|
"type": "string",
|
||||||
"event": {
|
"format": "date-time"
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -599,9 +599,6 @@
|
|||||||
"description": "Get a paginated list of contacts with cursor-based pagination",
|
"description": "Get a paginated list of contacts with cursor-based pagination",
|
||||||
"operationId": "listContacts",
|
"operationId": "listContacts",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"$ref": "#/components/parameters/Limit"
|
"$ref": "#/components/parameters/Limit"
|
||||||
},
|
},
|
||||||
@@ -633,29 +630,23 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"success": {
|
"contacts": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/Contact"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cursor": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Cursor for next page"
|
||||||
|
},
|
||||||
|
"hasMore": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"data": {
|
"total": {
|
||||||
"type": "object",
|
"type": "integer",
|
||||||
"properties": {
|
"description": "Total count (only included on first page)"
|
||||||
"items": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/Contact"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nextCursor": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": true
|
|
||||||
},
|
|
||||||
"hasMore": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"total": {
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -669,11 +660,6 @@
|
|||||||
"summary": "Create or update contact",
|
"summary": "Create or update contact",
|
||||||
"description": "Create a new contact or update existing (upsert by email)",
|
"description": "Create a new contact or update existing (upsert by email)",
|
||||||
"operationId": "createContact",
|
"operationId": "createContact",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
@@ -710,19 +696,61 @@
|
|||||||
},
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Contact created/updated",
|
"description": "Contact updated",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"allOf": [
|
||||||
"properties": {
|
{
|
||||||
"success": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"$ref": "#/components/schemas/Contact"
|
"$ref": "#/components/schemas/Contact"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"_meta": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"isNew": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"isUpdate": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"201": {
|
||||||
|
"description": "Contact created",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/Contact"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"_meta": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"isNew": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"isUpdate": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -737,9 +765,6 @@
|
|||||||
"description": "Get a single contact by ID",
|
"description": "Get a single contact by ID",
|
||||||
"operationId": "getContact",
|
"operationId": "getContact",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@@ -755,15 +780,7 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"$ref": "#/components/schemas/Contact"
|
||||||
"properties": {
|
|
||||||
"success": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"$ref": "#/components/schemas/Contact"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -779,9 +796,6 @@
|
|||||||
"description": "Update an existing contact",
|
"description": "Update an existing contact",
|
||||||
"operationId": "updateContact",
|
"operationId": "updateContact",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@@ -816,15 +830,7 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"$ref": "#/components/schemas/Contact"
|
||||||
"properties": {
|
|
||||||
"success": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"$ref": "#/components/schemas/Contact"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -837,9 +843,6 @@
|
|||||||
"description": "Permanently delete a contact",
|
"description": "Permanently delete a contact",
|
||||||
"operationId": "deleteContact",
|
"operationId": "deleteContact",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@@ -850,28 +853,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"204": {
|
||||||
"description": "Contact deleted",
|
"description": "Contact deleted successfully (no content returned)"
|
||||||
"content": {
|
},
|
||||||
"application/json": {
|
"404": {
|
||||||
"schema": {
|
"description": "Contact not found"
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"success": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"message": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -883,9 +869,6 @@
|
|||||||
"description": "Get a paginated list of email templates",
|
"description": "Get a paginated list of email templates",
|
||||||
"operationId": "listTemplates",
|
"operationId": "listTemplates",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"$ref": "#/components/parameters/Limit"
|
"$ref": "#/components/parameters/Limit"
|
||||||
},
|
},
|
||||||
@@ -916,19 +899,23 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"success": {
|
"templates": {
|
||||||
"type": "boolean"
|
"type": "array",
|
||||||
},
|
"items": {
|
||||||
"data": {
|
"$ref": "#/components/schemas/Template"
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"items": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/Template"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"total": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"page": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"pageSize": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"totalPages": {
|
||||||
|
"type": "integer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -942,11 +929,6 @@
|
|||||||
"summary": "Create template",
|
"summary": "Create template",
|
||||||
"description": "Create a new email template",
|
"description": "Create a new email template",
|
||||||
"operationId": "createTemplate",
|
"operationId": "createTemplate",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
@@ -974,20 +956,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "Template created",
|
"description": "Template created",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"$ref": "#/components/schemas/Template"
|
||||||
"properties": {
|
|
||||||
"success": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"$ref": "#/components/schemas/Template"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1002,9 +976,6 @@
|
|||||||
"description": "Get a paginated list of email campaigns",
|
"description": "Get a paginated list of email campaigns",
|
||||||
"operationId": "listCampaigns",
|
"operationId": "listCampaigns",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"$ref": "#/components/parameters/Limit"
|
"$ref": "#/components/parameters/Limit"
|
||||||
},
|
},
|
||||||
@@ -1028,19 +999,23 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"success": {
|
"campaigns": {
|
||||||
"type": "boolean"
|
"type": "array",
|
||||||
},
|
"items": {
|
||||||
"data": {
|
"$ref": "#/components/schemas/Campaign"
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"items": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/Campaign"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"page": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"pageSize": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"total": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"totalPages": {
|
||||||
|
"type": "integer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1054,11 +1029,6 @@
|
|||||||
"summary": "Create campaign",
|
"summary": "Create campaign",
|
||||||
"description": "Create a new email campaign",
|
"description": "Create a new email campaign",
|
||||||
"operationId": "createCampaign",
|
"operationId": "createCampaign",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
@@ -1144,9 +1114,6 @@
|
|||||||
"description": "Send a campaign immediately or schedule for future delivery",
|
"description": "Send a campaign immediately or schedule for future delivery",
|
||||||
"operationId": "sendCampaign",
|
"operationId": "sendCampaign",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
@@ -1186,28 +1153,15 @@
|
|||||||
"summary": "List segments",
|
"summary": "List segments",
|
||||||
"description": "Get all audience segments",
|
"description": "Get all audience segments",
|
||||||
"operationId": "listSegments",
|
"operationId": "listSegments",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "List of segments",
|
"description": "List of segments",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "array",
|
||||||
"properties": {
|
"items": {
|
||||||
"success": {
|
"$ref": "#/components/schemas/Segment"
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/Segment"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1220,11 +1174,6 @@
|
|||||||
"summary": "Create segment",
|
"summary": "Create segment",
|
||||||
"description": "Create a new audience segment",
|
"description": "Create a new audience segment",
|
||||||
"operationId": "createSegment",
|
"operationId": "createSegment",
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"$ref": "#/components/parameters/ProjectId"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"required": true,
|
"required": true,
|
||||||
"content": {
|
"content": {
|
||||||
@@ -1264,20 +1213,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"201": {
|
||||||
"description": "Segment created",
|
"description": "Segment created",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"$ref": "#/components/schemas/Segment"
|
||||||
"properties": {
|
|
||||||
"success": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"data": {
|
|
||||||
"$ref": "#/components/schemas/Segment"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user