All Collections
Advanced FAQs
API Documentation
List Sent Email Stats Endpoint
List Sent Email Stats Endpoint

API Documentation for viewing tracked email ecards

Tim Badolato avatar
Written by Tim Badolato
Updated over a week ago

Note: The API is limited to Enterprise Customers only. The feature is new and is under active development. We welcome any questions or feedback you may have. Feel free to reach out to us at [email protected].

View more API Endpoints

Summary

Fetches statistical data related to eCards, including counts by type and specific data based on query parameters. The response will include pagination details and totals for each type of share (email, Facebook, Twitter).

Note: To get your API Key, go to the Account Info page in your account. Also, be careful to never expose this key, it gives full access to your account and all data.

Request URL

GET /api/stats/list


Request Parameters

Name

Type

Description

Required

type

string

Filter results by type (email, facebook, twitter).

No

page

integer

The page number for pagination.

No

perPage

integer

The number of results per page (Max 200).

No

widgetid

integer

Filter results by widget ID.

No

ecardid

integer

Filter results by eCard ID.

No

includeEmails

boolean

Include email addresses in the response.

No

Authorization

Header: Authorization: Bearer YOUR_API_KEY


Request Example

GET https://app.ecardwidget.com/api/stats/list?perPage=1&page=1&includeEmails=true 

Header ‘Authorization: Bearer YOUR_API_KEY’

Response

The response will include a meta object with pagination details and totalsByType for the number of shares via different methods. The data array includes the individual records.

Response Object

Field

Type

Description

meta

object

Metadata for pagination and totals.

data

array

Array of stat objects.

message

string

Any additional messages.

success

boolean

Indicates the success of the request.

Meta Object

Field

Type

Description

pagination

object

Pagination details.

totalsByType

object

Totals for each type of share.

Data Object (Stat)

Field

Type

Description

createdAt

string

Timestamp of the stat.

recipient_email

string

Email of the recipient.

sender_email

string

Email of the sender.

widgetid

integer

Widget ID.

ecardid

integer

eCard ID.

id

integer

ID of the stat.

type

string

Type (email, facebook, twitter).

sender_name

string

Name of the sender.

recipient_name

string

Name of the recipient.


Response Example

{ "meta": 
{ "pagination":
{ "perPage": 1,
"totalPages": 27,
"currentPage": 1,
"totalRecords": 263 },
"totalsByType": {
"twitter": 554,
"facebook": 859,
"email": 921 }
},
"data": [ {
"createdAt": "April, 12 2021 15:31:03 +0000",
"recipient_email": "[email protected]",
"sender_email":
"[email protected]",
...
}
],
"message": "",
"success": true
}

Status Codes

  • 200 OK: The request was successful.

  • 401 Unauthorized: Invalid API key.

  • 400 Bad Request: The request was malformed or invalid.

Did this answer your question?