Emelia API API Reference
Welcome the Emelia API reference. Here you can find all the different schemas you can use on Emelia. Our API is build on GraphQL. Feel free to check their docs if you're not familiar with GraphQL.
All of theses schemas are available to every users. You just have to send your API key in the headers.
API Endpoints
https://graphql.emelia.io/graphql
Terms of Service: https://www.emelia.io/cgv
Contact: charles@bridgers-agency.com
Version: 1.0.0
Authentication
api_key
Provides API Key in 'Authorization' field in Header.
You can get one on your Emelia settings.
User Data
Available actions for your account
Get User Data
Get data from your user account
Example
Request Content-Types:
application/json
Query
query me{
me{
uid
name
email
picture
}
}
Try it now
query me{
me{
uid
name
email
picture
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"me": {
"uid": "string",
"name": "string",
"email": "string",
"picture": "string"
}
}
}
Campaigns Action
Different actions available for a campaign
Get Campaigns
Get a basic listing of all campaigns including name, status, creation date and statistics
Example
Request Content-Types:
application/json
Query
query all_campaigns{
all_campaigns{
_id
name
status
createdAt
stats{
mailsSent
uniqueOpensPercent
opens
linkClickedPercent
repliedPercent
bouncedPercent
unsubscribePercent
progressPercent
}
}
}
Try it now
query all_campaigns{
all_campaigns{
_id
name
status
createdAt
stats{
mailsSent
uniqueOpensPercent
opens
linkClickedPercent
repliedPercent
bouncedPercent
unsubscribePercent
progressPercent
}
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"all_campaigns": [
{
"_id": "string",
"name": "string",
"createdAt": "string",
"stats": {
"mailsSent": "integer",
"uniqueOpensPercent": "number",
"opens": "integer",
"linkClickedPercent": "number",
"repliedPercent": "number",
"bouncedPercent": "number",
"unsubscribePercent": "number",
"progressPercent": "number"
}
}
]
}
}
Get a campaign
Get a specific campaign by its id and get all data
(no description)
Example
Request Content-Types:
application/json
Query
query campaign($id: ID!){
campaign(id: $id){
_id
name
status
createdAt
schedule{
dailyContact
dailyLimit
minInterval
maxInterval
trackLinks
trackOpens
timeZone
days
start
end
eventToStopMails
}
provider
startAt
recipients{
total_count
}
estimatedEnd
}
}
Variables
{
"id": "string"
}
Try it now
query campaign($id: ID!){
campaign(id: $id){
_id
name
status
createdAt
schedule{
dailyContact
dailyLimit
minInterval
maxInterval
trackLinks
trackOpens
timeZone
days
start
end
eventToStopMails
}
provider
startAt
recipients{
total_count
}
estimatedEnd
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"campaign": {
"_id": "string",
"name": "string",
"createdAt": "string",
"schedule": {
"dailyContact": "integer",
"dailyLimit": "integer",
"minInterval": "integer",
"maxInterval": "integer",
"trackLinks": "boolean",
"trackOpens": "boolean",
"timeZone": "string",
"days": [
"integer"
],
"start": "string",
"end": "string",
"eventToStopMails": [
null
]
},
"provider": "string",
"startAt": "string",
"recipients": {
"total_count": "integer"
},
"estimatedEnd": "string"
}
}
}
Create a campaign
Create a new campaign by providing a name
(no description)
Example
Request Content-Types:
application/json
Query
mutation createCampaign($name: String!){
createCampaign(name: $name){
_id
name
status
createdAt
provider
startAt
estimatedEnd
}
}
Variables
{
"name": "string"
}
Try it now
mutation createCampaign($name: String!){
createCampaign(name: $name){
_id
name
status
createdAt
provider
startAt
estimatedEnd
}
}
{
"name": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createCampaign": {
"_id": "string",
"name": "string",
"createdAt": "string",
"provider": "string",
"startAt": "string",
"estimatedEnd": "string"
}
}
}
Start a campaign
Start a cold-mailing campaign by providing its id. You must have a provider and contacts set.
(no description)
Example
Request Content-Types:
application/json
Query
mutation startCampaign($id: ID!){
startCampaign(id: $id)
}
Variables
{
"id": "string"
}
Try it now
mutation startCampaign($id: ID!){
startCampaign(id: $id)
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"startCampaign": "boolean"
}
}
Pause a campaign
Pause a campaign with its id. The campaign must be in RUNNING mode
(no description)
Example
Request Content-Types:
application/json
Query
mutation pauseCampaign($id: ID!){
pauseCampaign(id: $id)
}
Variables
{
"id": "string"
}
Try it now
mutation pauseCampaign($id: ID!){
pauseCampaign(id: $id)
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"pauseCampaign": "boolean"
}
}
Add Contact to a campaign
Add a contact to an existing campaign. If the campaign is the RUNNING, the contact is automatically added to the loop. If the campaign is in FINISHED state, the campaign will be automatically switched to RUNNING until the loop for the new contact is finished.
(no description)
(no description)
Example
Request Content-Types:
application/json
Query
mutation addContactToCampaignHook($id: ID!, $contact: JSON!){
addContactToCampaignHook(id: $id, contact: $contact)
}
Variables
{
"id": "string"
}
Try it now
mutation addContactToCampaignHook($id: ID!, $contact: JSON!){
addContactToCampaignHook(id: $id, contact: $contact)
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addContactToCampaignHook": "string"
}
}
Contacts Action
Different actions about contacts and contacts list on Emelia
Get Contacts Lists
Return all contacts lists existants on your account
Example
Request Content-Types:
application/json
Query
query contact_lists{
contact_lists{
_id
name
contactCount
fields
usedInCampaign
}
}
Try it now
query contact_lists{
contact_lists{
_id
name
contactCount
fields
usedInCampaign
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"contact_lists": [
{
"_id": "string",
"name": "string",
"contactCount": "integer",
"fields": [
"string"
],
"usedInCampaign": "boolean"
}
]
}
}
Add Contact to a List
Add a contact to an existing list. If this list is used in a campaign you must use the addContactToCampaignHook
mutation instead.
(no description)
(no description)
Example
Request Content-Types:
application/json
Query
mutation addContactsToListHook($id: ID!, $contact: JSON!){
addContactsToListHook(id: $id, contact: $contact)
}
Variables
{
"id": "string"
}
Try it now
mutation addContactsToListHook($id: ID!, $contact: JSON!){
addContactsToListHook(id: $id, contact: $contact)
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addContactsToListHook": "string"
}
}
Schema Definitions
Activities: object
Example
{
"total_count": "number",
"activities": [
{
"_id": "object",
"contact": {
"_id": "object",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"email": "string",
"custom": "object",
"interested": "string",
"mailsSent": "number",
"status": "string",
"lastContacted": "string",
"lastReplied": "string",
"lastOpen": "string"
},
"event": "string",
"date": "string"
}
]
}
Activity: object
Example
{
"_id": "object",
"contact": {
"_id": "object",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"email": "string",
"custom": "object",
"interested": "string",
"mailsSent": "number",
"status": "string",
"lastContacted": "string",
"lastReplied": "string",
"lastOpen": "string"
},
"event": "string",
"date": "string"
}
ActivityResume: object
- global:
-
steps:
object[][]
Example
{
"global": {
"sent": "number",
"first_open": "number",
"first_open_percent": "number",
"opened": "number",
"clicked": "number",
"clicked_percent": "number",
"replied": "number",
"replied_percent": "number",
"bounced": "number",
"bounced_percent": "number",
"unsubscribed": "number",
"unsubscribed_percent": "number",
"progress_percent": "number"
},
"steps": [
[
{
"sent": "number",
"to_send": "number",
"delivered": "number",
"first_open": "number",
"first_open_percent": "number",
"opened": "number",
"clicked": "number",
"clicked_percent": "number",
"replied": "number",
"replied_percent": "number",
"bounced": "number",
"bounced_percent": "number",
"unsubscribed": "number",
"unsubscribed_percent": "number"
}
]
]
}
BasicCampaign: object
- _id:
- name:
- status:
- createdAt:
- provider:
Example
{
"_id": "object",
"name": "string",
"status": "string",
"createdAt": "string",
"provider": {
"_id": "object",
"senderName": "string",
"senderEmail": "string",
"senderPassword": "string",
"emailType": "string",
"smtp": {
"login": "string",
"password": "string",
"server": "string",
"port": "number",
"ssl": "boolean"
},
"imap": {
"login": "string",
"password": "string",
"server": "string",
"port": "number",
"ssl": "boolean"
},
"signature": "object",
"usedInCampaign": "string"
}
}
Campaign: object
- _id:
- name:
- customDomain:
- status:
- createdAt:
- schedule:
- provider:
- startAt:
- steps:
- recipients:
- activities_count:
- estimatedEnd:
Example
{
"_id": "object",
"name": "string",
"customDomain": {
"domainName": "string",
"status": "string",
"dateAdded": "string"
},
"status": "string",
"createdAt": "string",
"schedule": {
"dailyContact": "number",
"dailyLimit": "number",
"minInterval": "number",
"maxInterval": "number",
"trackLinks": "boolean",
"trackOpens": "boolean",
"timeZone": "string",
"days": [
"number"
],
"start": "string",
"end": "string",
"eventToStopMails": [
"string"
]
},
"provider": "object",
"startAt": "string",
"steps": [
{
"delay": {
"amount": "number",
"unit": "string"
},
"versions": [
{
"_id": "object",
"subject": "string",
"message": "string",
"options": {
"showHistory": "boolean",
"schedule": [
{
"day": "number",
"start": "string",
"end": "string"
}
],
"trackLinks": "boolean",
"trackOpens": "boolean",
"provider": "object"
}
}
]
}
],
"recipients": {
"lists": [
{
"_id": "object",
"name": "string",
"contactCount": "number",
"fields": [
"string"
],
"usedInCampaign": "boolean"
}
]
}
}
CampaignLine: object
- _id:
- name:
- status:
- createdAt:
- stats:
Example
{
"_id": "object",
"name": "string",
"status": "string",
"createdAt": "string",
"stats": {
"mailsSent": "number",
"uniqueOpensPercent": "number",
"opens": "number",
"linkClickedPercent": "number",
"repliedPercent": "number",
"bouncedPercent": "number",
"unsubscribePercent": "number",
"progressPercent": "number"
}
}
CampaignStat: object
- mailsSent:
- uniqueOpensPercent:
- opens:
- linkClickedPercent:
- repliedPercent:
- bouncedPercent:
- unsubscribePercent:
- progressPercent:
Example
{
"mailsSent": "number",
"uniqueOpensPercent": "number",
"opens": "number",
"linkClickedPercent": "number",
"repliedPercent": "number",
"bouncedPercent": "number",
"unsubscribePercent": "number",
"progressPercent": "number"
}
Contact: object
- _id:
- firstName:
- lastName:
- phoneNumber:
- email:
- custom:
- interested:
- mailsSent:
- status:
- lastContacted:
- lastReplied:
- lastOpen:
Example
{
"_id": "object",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"email": "string",
"custom": "object",
"interested": "string",
"mailsSent": "number",
"status": "string",
"lastContacted": "string",
"lastReplied": "string",
"lastOpen": "string"
}
ContactList: object
- _id:
- name:
- contactCount:
- fields:
- usedInCampaign:
- contacts:
Example
{
"_id": "object",
"name": "string",
"contactCount": "number",
"fields": [
"string"
],
"usedInCampaign": "boolean",
"contacts": {
"list": [
{
"_id": "object",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"email": "string",
"custom": "object",
"interested": "string",
"mailsSent": "number",
"status": "string",
"lastContacted": "string",
"lastReplied": "string",
"lastOpen": "string"
}
],
"count": "number"
}
}
ContactsResult: object
Example
{
"list": [
{
"_id": "object",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"email": "string",
"custom": "object",
"interested": "string",
"mailsSent": "number",
"status": "string",
"lastContacted": "string",
"lastReplied": "string",
"lastOpen": "string"
}
],
"count": "number"
}
EmailProvider: object
- _id:
- senderName:
- senderEmail:
- senderPassword:
- emailType:
- smtp:
- imap:
- signature:
- usedInCampaign:
Example
{
"_id": "object",
"senderName": "string",
"senderEmail": "string",
"senderPassword": "string",
"emailType": "string",
"smtp": {
"login": "string",
"password": "string",
"server": "string",
"port": "number",
"ssl": "boolean"
},
"imap": {
"login": "string",
"password": "string",
"server": "string",
"port": "number",
"ssl": "boolean"
},
"signature": "object",
"usedInCampaign": "string"
}
Float: number
The Float
scalar type represents signed double-precision fractional values as specified by
IEEE 754.
Example
number
GlobalActivities: object
- sent:
- first_open:
- first_open_percent:
- opened:
- clicked:
- clicked_percent:
- replied:
- replied_percent:
- bounced:
- bounced_percent:
- unsubscribed:
- unsubscribed_percent:
- progress_percent:
Example
{
"sent": "number",
"first_open": "number",
"first_open_percent": "number",
"opened": "number",
"clicked": "number",
"clicked_percent": "number",
"replied": "number",
"replied_percent": "number",
"bounced": "number",
"bounced_percent": "number",
"unsubscribed": "number",
"unsubscribed_percent": "number",
"progress_percent": "number"
}
ID: object
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
Example
object
Int: number
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
number
JSON: object
The JSON
scalar type represents JSON values as specified by
ECMA-404.
Example
object
MailEvent: string
-
objectSENT
-
objectFIRST_OPEN
-
objectOPENED
-
objectCLICKED
-
objectREPLIED
-
objectBOUNCED
-
objectUNSUBSCRIBED
MailVersion: object
- _id:
- subject:
- message:
- options:
Example
{
"_id": "object",
"subject": "string",
"message": "string",
"options": {
"showHistory": "boolean",
"schedule": [
{
"day": "number",
"start": "string",
"end": "string"
}
],
"trackLinks": "boolean",
"trackOpens": "boolean",
"provider": "object"
}
}
Membership: object
- id:
- expiration:
- additionalEmails:
Example
{
"id": "number",
"expiration": "string",
"additionalEmails": [
{
"expiration": "string",
"active": "boolean"
}
]
}
Recipients: object
- lists:
- contacts:
- total_count:
Example
{
"lists": [
{
"_id": "object",
"name": "string",
"contactCount": "number",
"fields": [
"string"
],
"usedInCampaign": "boolean",
"contacts": {
"list": [
{
"_id": "object",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"email": "string",
"custom": "object",
"interested": "string",
"mailsSent": "number",
"status": "string",
"lastContacted": "string",
"lastReplied": "string",
"lastOpen": "string"
}
],
"count": "number"
}
}
],
"contacts": {
"list": [
{
"_id": "object",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"email": "string",
"custom": "object",
"interested": "string",
"mailsSent": "number",
"status": "string",
"lastContacted": "string",
"lastReplied": "string",
"lastOpen": "string"
}
],
"count": "number"
},
"total_count": "number"
}
Schedule: object
- dailyContact:
- dailyLimit:
- minInterval:
- maxInterval:
- trackLinks:
- trackOpens:
- timeZone:
- days:
- start:
- end:
- eventToStopMails:
Example
{
"dailyContact": "number",
"dailyLimit": "number",
"minInterval": "number",
"maxInterval": "number",
"trackLinks": "boolean",
"trackOpens": "boolean",
"timeZone": "string",
"days": [
"number"
],
"start": "string",
"end": "string",
"eventToStopMails": [
"string"
]
}
Step: object
- delay:
- versions:
Example
{
"delay": {
"amount": "number",
"unit": "string"
},
"versions": [
{
"_id": "object",
"subject": "string",
"message": "string",
"options": {
"showHistory": "boolean",
"schedule": [
{
"day": "number",
"start": "string",
"end": "string"
}
],
"trackLinks": "boolean",
"trackOpens": "boolean",
"provider": "object"
}
}
]
}
String: string
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
User: object
- uid:
- name:
- email:
- picture:
- subscription:
- credit_cards:
- invoices:
- api_keys:
Example
{
"uid": "object",
"name": "string",
"email": "string",
"picture": "string",
"subscription": {
"id": "number",
"expiration": "string",
"additionalEmails": [
{
"expiration": "string",
"active": "boolean"
}
]
},
"credit_cards": [
{
"card_id": "object",
"type": "string",
"last4": "string",
"exp": "string"
}
],
"invoices": [
{
"id": "string",
"url": "string",
"price": "number",
"date": "string"
}
],
"api_keys": [
{
"key": "string",
"created_at": "string",
"status": "string",
"last_usage": "string"
}
]
}
VersionActivities: object
- sent:
- to_send:
- delivered:
- first_open:
- first_open_percent:
- opened:
- clicked:
- clicked_percent:
- replied:
- replied_percent:
- bounced:
- bounced_percent:
- unsubscribed:
- unsubscribed_percent:
Example
{
"sent": "number",
"to_send": "number",
"delivered": "number",
"first_open": "number",
"first_open_percent": "number",
"opened": "number",
"clicked": "number",
"clicked_percent": "number",
"replied": "number",
"replied_percent": "number",
"bounced": "number",
"bounced_percent": "number",
"unsubscribed": "number",
"unsubscribed_percent": "number"
}
VersionOption: object
- showHistory:
- schedule:
- trackLinks:
- trackOpens:
- provider:
Example
{
"showHistory": "boolean",
"schedule": [
{
"day": "number",
"start": "string",
"end": "string"
}
],
"trackLinks": "boolean",
"trackOpens": "boolean",
"provider": "object"
}