openapi: 3.2.0 info: title: Reference Campaigns API version: '2.0' contact: name: Sendlane url: https://sendlane.com email: support@sendlane.com description: Sendlane V2 API servers: - url: https://api.sendlane.com/v2 description: Sendlane security: - BearerToken: [] tags: - name: Campaigns paths: /campaigns: get: summary: Campaigns tags: - Campaigns responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Campaign.v2' links: $ref: '#/components/schemas/PaginatorLinks.v2' meta: $ref: '#/components/schemas/PaginatorMeta.v2' operationId: get-campaigns description: Get Campaigns /campaigns/{campaignId}: parameters: - schema: type: integer name: campaignId in: path required: true get: summary: Get Campaign tags: - Campaigns responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/Campaign.v2' operationId: get-campaigns-campaignId description: Get campaign /campaigns/{campaignId}/report: parameters: - schema: type: integer name: campaignId in: path required: true - $ref: '#/components/parameters/from' - $ref: '#/components/parameters/to' get: summary: Campaign Report tags: - Campaigns responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CampaignReport.v2' operationId: get-campaigns-report description: Campaign Report components: schemas: PaginatorMeta.v2: description: '' type: object x-examples: {} properties: current_page: type: integer readOnly: true from: type: integer readOnly: true last_page: type: integer readOnly: true path: type: string minLength: 1 readOnly: true per_page: type: integer readOnly: true to: type: integer readOnly: true total: type: integer readOnly: true title: Paginator Meta PaginatorLinks.v2: description: '' type: object x-examples: {} properties: first: type: string minLength: 1 format: uri readOnly: true last: type: string minLength: 1 format: uri readOnly: true prev: type: string minLength: 1 format: uri readOnly: true next: type: string minLength: 1 format: uri readOnly: true title: Paginator Links Campaign.v2: title: Campaign type: object properties: id: type: integer readOnly: true name: type: string status: type: string scheduled_at: type: string sent_at: type: string automation: $ref: '#/components/schemas/CampaignAutomation.v2' created_at: type: string updated_at: type: string CampaignAutomation.v2: title: CampaignAutomation type: object properties: id: type: integer readOnly: true name: type: string action_order: type: integer CampaignReport.v2: type: object x-examples: example-1: campaign_id: 1 sent: 0 opens: 0 clicks: 0 unique_opens: 0 unique_clicks: 0 bounced: 0 suppressed: 0 unsubscribed: 0 spam: 0 revenue: 0 automation: id: 1 name: MyAutomation x-internal: false properties: campaign_id: type: integer sent: type: integer opens: type: integer clicks: type: integer unique_opens: type: integer unique_clicks: type: integer bounced: type: integer suppressed: type: integer unsubscribed: type: integer spam: type: integer revenue: type: number automation: type: object properties: id: type: int name: type: string parameters: to: schema: type: string format: date-time name: to description: Ending datetime. in: query required: false example: '`2024-12-04T12:30:40-05:00` or `2024-12-04T12:30:40%2b05:00` or `2024-12-04T12:00:00%2b00:00` or `2024-12-04T12:00:00Z`' from: schema: type: string format: date-time name: from description: Starting datetime. Required if the "to" parameter is in the query. in: query required: false example: '`2024-12-04T12:30:40-05:00` or `2024-12-04T12:30:40%2b05:00` or `2024-12-04T12:00:00%2b00:00` or `2024-12-04T12:00:00Z`' securitySchemes: BearerToken: name: Authorization type: apiKey in: header description: API token sent in the Authorization header with the value "Bearer {apiToken}" OtherAccountBearerToken: name: Authorization-Destination type: apiKey in: header description: API token for other account sent in the Authorization-Destination header with the value "Bearer {apiToken}"