openapi: 3.0.1 info: title: Whippy Public Campaigns API description: The Whippy Public API is a RESTful API for the Whippy AI customer communication platform. It uses standard HTTP methods and JSON request / response bodies and is authenticated with an API key supplied in the X-WHIPPY-KEY header (OAuth bearer tokens are also supported). The API covers messaging (SMS / MMS, email, fax), contacts, conversations and messages, campaigns, automated sequences, channels, and webhook / custom events. termsOfService: https://www.whippy.ai/terms-of-service contact: name: Whippy Support url: https://docs.whippy.ai version: '1.0' servers: - url: https://api.whippy.co/v1 description: Whippy Public API v1 security: - WhippyApiKey: [] tags: - name: Campaigns description: Send campaigns and inspect campaign analytics. paths: /messaging/sms/campaign: post: operationId: sendCampaign tags: - Campaigns summary: Send an SMS campaign description: Create and send a bulk SMS campaign from a channel to a list of contacts. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SendCampaignRequest' responses: '202': description: Campaign accepted for processing content: application/json: schema: $ref: '#/components/schemas/AcceptedResponse' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/UnprocessableEntity' /campaigns: get: operationId: getCampaigns tags: - Campaigns summary: List campaigns parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' - name: title in: query description: Filter by campaign title. schema: type: string - name: status[] in: query schema: type: array items: type: string responses: '200': description: A page of campaigns content: application/json: schema: $ref: '#/components/schemas/CampaignList' '401': $ref: '#/components/responses/Unauthorized' /campaigns/{id}: parameters: - $ref: '#/components/parameters/PathId' get: operationId: getCampaign tags: - Campaigns summary: Show a campaign responses: '200': description: A single campaign content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/Campaign' '401': $ref: '#/components/responses/Unauthorized' /campaigns/{id}/contacts: parameters: - $ref: '#/components/parameters/PathId' get: operationId: getCampaignContacts tags: - Campaigns summary: List campaign contacts parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: A page of campaign contacts content: application/json: schema: $ref: '#/components/schemas/ContactList' '401': $ref: '#/components/responses/Unauthorized' components: parameters: Limit: name: limit in: query description: Number of results per page (default 50, max 500). schema: type: integer default: 50 maximum: 500 Offset: name: offset in: query description: Number of results to skip for pagination. schema: type: integer default: 0 PathId: name: id in: path required: true description: Resource UUID. schema: type: string format: uuid schemas: Address: type: object properties: address_line_one: type: string address_line_two: type: string city: type: string state: type: string country: type: string postal_code: type: string CreateContactRequest: type: object required: - phone properties: phone: type: string name: type: string email: type: string external_id: type: string address: $ref: '#/components/schemas/Address' birth_date: $ref: '#/components/schemas/BirthDate' language: type: string default_channel_id: type: string format: uuid properties: type: object additionalProperties: true opt_in_to: type: array items: $ref: '#/components/schemas/OptInChannel' opt_in_to_all_channels: type: boolean Contact: type: object properties: id: type: string format: uuid phone: type: string email: type: string name: type: string external_id: type: string address: $ref: '#/components/schemas/Address' birth_date: $ref: '#/components/schemas/BirthDate' state: type: string enum: - open - archived - blocked blocked: type: boolean communication_preferences: type: array items: $ref: '#/components/schemas/CommunicationPreference' created_at: type: string format: date-time updated_at: type: string format: date-time Campaign: type: object properties: campaign_id: type: string format: uuid campaign_title: type: string sent_messages: type: integer slated_messages: type: integer failed_deliveries: type: integer responses: type: integer link_clicks: type: integer unsubscribes: type: integer OptInChannel: type: object properties: id: type: string format: uuid phone: type: string BirthDate: type: object properties: day: type: integer month: type: integer year: type: integer CampaignList: type: object properties: data: type: array items: $ref: '#/components/schemas/Campaign' total: type: integer SendCampaignRequest: type: object required: - from - body - contacts properties: from: type: string description: Phone of an existing channel. title: type: string body: type: string attachments: type: array items: type: string schedule_at: type: string format: date-time contacts: type: array items: $ref: '#/components/schemas/CreateContactRequest' ContactList: type: object properties: data: type: array items: $ref: '#/components/schemas/Contact' total: type: integer CommunicationPreference: type: object properties: channel_id: type: string format: uuid opt_in: type: boolean updated_at: type: string format: date-time AcceptedResponse: type: object properties: data: type: object properties: message: type: string Error: type: object properties: error: type: string status: type: integer responses: Unauthorized: description: Not authenticated content: application/json: schema: $ref: '#/components/schemas/Error' UnprocessableEntity: description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: WhippyApiKey: type: apiKey in: header name: X-WHIPPY-KEY description: Organization API key. Generated in the Whippy app under Settings > Developers. OAuth 2.0 bearer tokens are also accepted via the Authorization header.