|
1585 | 1585 | } |
1586 | 1586 | } |
1587 | 1587 | }, |
| 1588 | + "/v1/contactBooks/{contactBookId}/contacts/bulk": { |
| 1589 | + "delete": { |
| 1590 | + "parameters": [ |
| 1591 | + { |
| 1592 | + "schema": { |
| 1593 | + "type": "string", |
| 1594 | + "minLength": 3, |
| 1595 | + "example": "cuiwqdj74rygf74" |
| 1596 | + }, |
| 1597 | + "required": true, |
| 1598 | + "name": "contactBookId", |
| 1599 | + "in": "path" |
| 1600 | + } |
| 1601 | + ], |
| 1602 | + "requestBody": { |
| 1603 | + "required": true, |
| 1604 | + "content": { |
| 1605 | + "application/json": { |
| 1606 | + "schema": { |
| 1607 | + "type": "object", |
| 1608 | + "properties": { |
| 1609 | + "contactIds": { |
| 1610 | + "type": "array", |
| 1611 | + "items": { "type": "string" }, |
| 1612 | + "minItems": 1, |
| 1613 | + "maxItems": 1000 |
| 1614 | + } |
| 1615 | + }, |
| 1616 | + "required": ["contactIds"] |
| 1617 | + } |
| 1618 | + } |
| 1619 | + } |
| 1620 | + }, |
| 1621 | + "responses": { |
| 1622 | + "200": { |
| 1623 | + "description": "Bulk delete contacts from a contact book", |
| 1624 | + "content": { |
| 1625 | + "application/json": { |
| 1626 | + "schema": { |
| 1627 | + "type": "object", |
| 1628 | + "properties": { |
| 1629 | + "success": { "type": "boolean" }, |
| 1630 | + "count": { "type": "number" } |
| 1631 | + }, |
| 1632 | + "required": ["success", "count"] |
| 1633 | + } |
| 1634 | + } |
| 1635 | + } |
| 1636 | + }, |
| 1637 | + "403": { |
| 1638 | + "description": "Forbidden - API key doesn't have access", |
| 1639 | + "content": { |
| 1640 | + "application/json": { |
| 1641 | + "schema": { |
| 1642 | + "type": "object", |
| 1643 | + "properties": { "error": { "type": "string" } }, |
| 1644 | + "required": ["error"] |
| 1645 | + } |
| 1646 | + } |
| 1647 | + } |
| 1648 | + }, |
| 1649 | + "404": { |
| 1650 | + "description": "Contact book not found", |
| 1651 | + "content": { |
| 1652 | + "application/json": { |
| 1653 | + "schema": { |
| 1654 | + "type": "object", |
| 1655 | + "properties": { "error": { "type": "string" } }, |
| 1656 | + "required": ["error"] |
| 1657 | + } |
| 1658 | + } |
| 1659 | + } |
| 1660 | + } |
| 1661 | + } |
| 1662 | + }, |
| 1663 | + "post": { |
| 1664 | + "parameters": [ |
| 1665 | + { |
| 1666 | + "schema": { |
| 1667 | + "type": "string", |
| 1668 | + "minLength": 3, |
| 1669 | + "example": "cuiwqdj74rygf74" |
| 1670 | + }, |
| 1671 | + "required": true, |
| 1672 | + "name": "contactBookId", |
| 1673 | + "in": "path" |
| 1674 | + } |
| 1675 | + ], |
| 1676 | + "requestBody": { |
| 1677 | + "required": true, |
| 1678 | + "content": { |
| 1679 | + "application/json": { |
| 1680 | + "schema": { |
| 1681 | + "type": "array", |
| 1682 | + "items": { |
| 1683 | + "type": "object", |
| 1684 | + "properties": { |
| 1685 | + "email": { "type": "string" }, |
| 1686 | + "firstName": { "type": "string" }, |
| 1687 | + "lastName": { "type": "string" }, |
| 1688 | + "properties": { |
| 1689 | + "type": "object", |
| 1690 | + "additionalProperties": { "type": "string" } |
| 1691 | + }, |
| 1692 | + "subscribed": { "type": "boolean" } |
| 1693 | + }, |
| 1694 | + "required": ["email"] |
| 1695 | + }, |
| 1696 | + "minItems": 1, |
| 1697 | + "maxItems": 1000 |
| 1698 | + } |
| 1699 | + } |
| 1700 | + } |
| 1701 | + }, |
| 1702 | + "responses": { |
| 1703 | + "200": { |
| 1704 | + "description": "Bulk add contacts to a contact book", |
| 1705 | + "content": { |
| 1706 | + "application/json": { |
| 1707 | + "schema": { |
| 1708 | + "type": "object", |
| 1709 | + "properties": { |
| 1710 | + "message": { "type": "string" }, |
| 1711 | + "count": { "type": "number" } |
| 1712 | + }, |
| 1713 | + "required": ["message", "count"] |
| 1714 | + } |
| 1715 | + } |
| 1716 | + } |
| 1717 | + }, |
| 1718 | + "403": { |
| 1719 | + "description": "Forbidden - API key doesn't have access", |
| 1720 | + "content": { |
| 1721 | + "application/json": { |
| 1722 | + "schema": { |
| 1723 | + "type": "object", |
| 1724 | + "properties": { "error": { "type": "string" } }, |
| 1725 | + "required": ["error"] |
| 1726 | + } |
| 1727 | + } |
| 1728 | + } |
| 1729 | + }, |
| 1730 | + "404": { |
| 1731 | + "description": "Contact book not found", |
| 1732 | + "content": { |
| 1733 | + "application/json": { |
| 1734 | + "schema": { |
| 1735 | + "type": "object", |
| 1736 | + "properties": { "error": { "type": "string" } }, |
| 1737 | + "required": ["error"] |
| 1738 | + } |
| 1739 | + } |
| 1740 | + } |
| 1741 | + } |
| 1742 | + } |
| 1743 | + } |
| 1744 | + }, |
1588 | 1745 | "/v1/contactBooks/{contactBookId}/contacts/{contactId}": { |
1589 | 1746 | "patch": { |
1590 | 1747 | "parameters": [ |
|
1790 | 1947 | "enum": [ |
1791 | 1948 | "DRAFT", |
1792 | 1949 | "SCHEDULED", |
1793 | | - "IN_PROGRESS", |
| 1950 | + "RUNNING", |
1794 | 1951 | "PAUSED", |
1795 | | - "COMPLETED", |
1796 | | - "CANCELLED" |
| 1952 | + "SENT" |
1797 | 1953 | ], |
1798 | 1954 | "example": "DRAFT" |
1799 | 1955 | }, |
|
1829 | 1985 | "subject": { "type": "string" }, |
1830 | 1986 | "createdAt": { "type": "string", "format": "date-time" }, |
1831 | 1987 | "updatedAt": { "type": "string", "format": "date-time" }, |
1832 | | - "status": { "type": "string" }, |
| 1988 | + "status": { "type": "string", "enum": ["DRAFT", "SCHEDULED", "RUNNING", "PAUSED", "SENT"] }, |
1833 | 1989 | "scheduledAt": { "type": "string", "nullable": true, "format": "date-time" }, |
1834 | 1990 | "total": { "type": "integer" }, |
1835 | 1991 | "sent": { "type": "integer" }, |
|
1935 | 2091 | "contactBookId": { "type": "string", "nullable": true }, |
1936 | 2092 | "html": { "type": "string", "nullable": true }, |
1937 | 2093 | "content": { "type": "string", "nullable": true }, |
1938 | | - "status": { "type": "string" }, |
| 2094 | + "status": { "type": "string", "enum": ["DRAFT", "SCHEDULED", "RUNNING", "PAUSED", "SENT"] }, |
1939 | 2095 | "scheduledAt": { |
1940 | 2096 | "type": "string", |
1941 | 2097 | "nullable": true, |
|
1997 | 2153 | } |
1998 | 2154 | }, |
1999 | 2155 | "/v1/campaigns/{campaignId}": { |
| 2156 | + "parameters": [ |
| 2157 | + { |
| 2158 | + "schema": { |
| 2159 | + "type": "string", |
| 2160 | + "minLength": 1, |
| 2161 | + "example": "cmp_123" |
| 2162 | + }, |
| 2163 | + "required": true, |
| 2164 | + "name": "campaignId", |
| 2165 | + "in": "path" |
| 2166 | + } |
| 2167 | + ], |
2000 | 2168 | "get": { |
2001 | | - "parameters": [ |
2002 | | - { |
2003 | | - "schema": { |
2004 | | - "type": "string", |
2005 | | - "minLength": 1, |
2006 | | - "example": "cmp_123" |
2007 | | - }, |
2008 | | - "required": true, |
2009 | | - "name": "campaignId", |
2010 | | - "in": "path" |
2011 | | - } |
2012 | | - ], |
2013 | 2169 | "responses": { |
2014 | 2170 | "200": { |
2015 | 2171 | "description": "Get campaign details", |
|
2026 | 2182 | "contactBookId": { "type": "string", "nullable": true }, |
2027 | 2183 | "html": { "type": "string", "nullable": true }, |
2028 | 2184 | "content": { "type": "string", "nullable": true }, |
2029 | | - "status": { "type": "string" }, |
| 2185 | + "status": { "type": "string", "enum": ["DRAFT", "SCHEDULED", "RUNNING", "PAUSED", "SENT"] }, |
| 2186 | + "scheduledAt": { |
| 2187 | + "type": "string", |
| 2188 | + "nullable": true, |
| 2189 | + "format": "date-time" |
| 2190 | + }, |
| 2191 | + "batchSize": { "type": "integer" }, |
| 2192 | + "batchWindowMinutes": { "type": "integer" }, |
| 2193 | + "total": { "type": "integer" }, |
| 2194 | + "sent": { "type": "integer" }, |
| 2195 | + "delivered": { "type": "integer" }, |
| 2196 | + "opened": { "type": "integer" }, |
| 2197 | + "clicked": { "type": "integer" }, |
| 2198 | + "unsubscribed": { "type": "integer" }, |
| 2199 | + "bounced": { "type": "integer" }, |
| 2200 | + "hardBounced": { "type": "integer" }, |
| 2201 | + "complained": { "type": "integer" }, |
| 2202 | + "replyTo": { |
| 2203 | + "type": "array", |
| 2204 | + "items": { "type": "string" } |
| 2205 | + }, |
| 2206 | + "cc": { "type": "array", "items": { "type": "string" } }, |
| 2207 | + "bcc": { "type": "array", "items": { "type": "string" } }, |
| 2208 | + "createdAt": { "type": "string", "format": "date-time" }, |
| 2209 | + "updatedAt": { "type": "string", "format": "date-time" } |
| 2210 | + }, |
| 2211 | + "required": [ |
| 2212 | + "id", |
| 2213 | + "name", |
| 2214 | + "from", |
| 2215 | + "subject", |
| 2216 | + "previewText", |
| 2217 | + "contactBookId", |
| 2218 | + "html", |
| 2219 | + "content", |
| 2220 | + "status", |
| 2221 | + "scheduledAt", |
| 2222 | + "batchSize", |
| 2223 | + "batchWindowMinutes", |
| 2224 | + "total", |
| 2225 | + "sent", |
| 2226 | + "delivered", |
| 2227 | + "opened", |
| 2228 | + "clicked", |
| 2229 | + "unsubscribed", |
| 2230 | + "bounced", |
| 2231 | + "hardBounced", |
| 2232 | + "complained", |
| 2233 | + "replyTo", |
| 2234 | + "cc", |
| 2235 | + "bcc", |
| 2236 | + "createdAt", |
| 2237 | + "updatedAt" |
| 2238 | + ] |
| 2239 | + } |
| 2240 | + } |
| 2241 | + } |
| 2242 | + } |
| 2243 | + } |
| 2244 | + }, |
| 2245 | + "delete": { |
| 2246 | + "responses": { |
| 2247 | + "200": { |
| 2248 | + "description": "Delete campaign", |
| 2249 | + "content": { |
| 2250 | + "application/json": { |
| 2251 | + "schema": { |
| 2252 | + "type": "object", |
| 2253 | + "properties": { |
| 2254 | + "id": { "type": "string" }, |
| 2255 | + "name": { "type": "string" }, |
| 2256 | + "from": { "type": "string" }, |
| 2257 | + "subject": { "type": "string" }, |
| 2258 | + "previewText": { "type": "string", "nullable": true }, |
| 2259 | + "contactBookId": { "type": "string", "nullable": true }, |
| 2260 | + "html": { "type": "string", "nullable": true }, |
| 2261 | + "content": { "type": "string", "nullable": true }, |
| 2262 | + "status": { "type": "string", "enum": ["DRAFT", "SCHEDULED", "RUNNING", "PAUSED", "SENT"] }, |
2030 | 2263 | "scheduledAt": { |
2031 | 2264 | "type": "string", |
2032 | 2265 | "nullable": true, |
|
0 commit comments