REST API v2

The REST API allows you to retrieve and update the data that is stored inside Copernica from out of your own website or app. You can write your own scripts that send requests and instructions to our servers to fetch this data or to update it. You can use this API to automatically synchronize the data in Copernica with your own system, without any human interference. This page contains an overview of all API calls.

We are currently on version 2 of the REST API. This article explains the new version (and how to switch) in full detail. Not ready to switch? You can find the documentation for version 1 here.

Method types

There are four types of methods:

  • GET: Used to fetch data
  • POST: Used to create new data
  • PUT: Used to overwrite existing data
  • DELETE: Used to delete data

See the introduction for more information about HTTP requests.

Overview

Use the links below to jump to the type of API call you are looking for.

Account

In the table below you can find a call to retrieve account information.

Type Address Description
GET api.copernica.com/v2/identity Fetch the account information
GET api.copernica.com/v2/consumption Fetch the account consumption

Databases & Collections

You can search and maintain your databases and collections with API calls. The following table contains the calls related to database and collection structure.

Databases

Type Address Description
GET api.copernica.com/v2/databases Fetch all databases
POST api.copernica.com/v2/databases Create a new database
POST api.copernica.com/v2/database/$id/copy Copy a database
GET api.copernica.com/v2/database/$id Fetch the database information
PUT api.copernica.com/v2/database/$id Update the database information
GET api.copernica.com/v2/database/$id/unsubscribe Fetch the unsubscribe behavior
PUT api.copernica.com/v2/database/$id/unsubscribe Update the unsubscribe behavior
GET api.copernica.com/v2/database/$id/views Fetch all views
POST api.copernica.com/v2/database/$id/views Create a view
GET api.copernica.com/v2/database/$id/collections Fetch all collections
POST api.copernica.com/v2/database/$id/collections Create a collection
GET api.copernica.com/v2/database/$id/fields Fetch all fields
POST api.copernica.com/v2/database/$id/fields Create a field
PUT api.copernica.com/v2/database/$id/field/$id Update a field
DELETE api.copernica.com/v2/database/$id/field/$id Delete a field
GET api.copernica.com/v2/database/$id/interests Fetch all interests
POST api.copernica.com/v2/database/$id/interests Create an interest
PUT api.copernica.com/v2/interest Update an interest
DELETE api.copernica.com/v2/interest Delete an interest
GET api.copernica.com/v2/database/$id/profileids Fetch all profile IDs
GET api.copernica.com/v2/database/$id/profiles Fetch all profiles
POST api.copernica.com/v2/database/$id/profiles Create a profile
PUT api.copernica.com/v2/database/$id/profiles Update one or multiple profiles
DELETE api.copernica.com/v2/database/$id/profiles Delete one or multiple profiles
PUT api.copernica.com/v2/database/$id/intentions Update the database intentions

Collections

Type Address Description
GET api.copernica.com/v2/database/$id/collections Fetch all collections for a database
POST api.copernica.com/v2/database/$id/collections Create a new collection
GET api.copernica.com/v2/collection/$id Fetch the collection information
PUT api.copernica.com/v2/collection/$id Update the collection information
GET api.copernica.com/v2/collection/$id/unsubscribe Fetch the collection unsubscribe behavior
PUT api.copernica.com/v2/collection/$id/unsubscribe Update the collection unsubscribe behavior
GET api.copernica.com/v2/collection/$id/miniviews Fetch all collection miniviews
POST api.copernica.com/v2/collection/$id/miniviews Create a new collection miniview
GET api.copernica.com/v2/collection/$id/fields Fetch all collection fields
POST api.copernica.com/v2/collection/$id/fields Create a new collection field
PUT api.copernica.com/v2/collection/$id/field/$id Update a collection field
DELETE api.copernica.com/v2/collection/$id/field/$id Delete a collection field
GET api.copernica.com/v2/collection/$id/subprofileids Fetch all collection subprofile IDs
GET api.copernica.com/v2/collection/$id/subprofiles Fetch all collection subprofiles
PUT api.copernica.com/v2/collection/$id/intentions Update the collection intentions

Views & Miniviews

Views are selection under a database, while miniviews are selections under a collection. You can find methods that relate to a specific (mini)view below.

View

Type Address Description
POST api.copernica.com/v2/database/$id/views Create a view
POST api.copernica.com/v2/view/$id/copy Copy a view
GET api.copernica.com/v2/view/$id Fetch the view information
PUT api.copernica.com/v2/view/$id Update the view information
DELETE api.copernica.com/v2/view/$id Delete a view
GET api.copernica.com/v2/view/$id/views Fetch all nested views
POST api.copernica.com/v2/view/$id/views Create a nested view
GET api.copernica.com/v2/view/$id/profileids Fetch all view profile IDs
GET api.copernica.com/v2/view/$id/profiles Fetch all view profiles
GET api.copernica.com/v2/view/$id/rules Fetch all view rules
GET api.copernica.com/v2/view/$id/rule/$id Fetch a view rule
POST api.copernica.com/v2/view/$id/rules Create a new view rule
PUT api.copernica.com/v2/view/$id/intentions Update the view intentions
PUT api.copernica.com/v2/view/$id/rebuild Rebuild the view

Miniview

Type Address Description
POST api.copernica.com/v2/collection/$id/miniviews Create a new miniview
GET api.copernica.com/v2/miniview/$id Fetch the miniview information
PUT api.copernica.com/v2/miniview/$id Update the miniview information
DELETE api.copernica.com/v2/miniview/$id Delete a miniview
GET api.copernica.com/v2/miniview/$id/subprofileids Fetch all miniview subprofile IDs
GET api.copernica.com/v2/miniview/$id/subprofiles Fetch all miniview subprofiles
GET api.copernica.com/v2/miniview/$id/views Fetch all views for a miniview
GET api.copernica.com/v2/miniview/$id/minirules Fetch all miniview minirules
GET api.copernica.com/v2/miniview/$id/minirule/$id Fetch a miniview minirule
POST api.copernica.com/v2/miniview/$id/minirules Create a new miniview minirule
PUT api.copernica.com/v2/miniview/$id/intentions Update the miniview intentions
PUT api.copernica.com/v2/miniview/$id/rebuild Rebuild the miniview

Rules & Minirules

Rules and minirules are made up of several conditions to create selections under a database or collection respectively. You can find API calls related to rules and their conditions in the table below.

Rules

Type Address Description
POST api.copernica.com/v2/view/$id/rules Create a rule
GET api.copernica.com/v2/rule/$id Fetch the rule information
PUT api.copernica.com/v2/rule/$id Update the rule information
DELETE api.copernica.com/v2/rule/$id Delete a rule
POST api.copernica.com/v2/rule/$id/conditions Create a condition
PUT api.copernica.com/v2/condition/$type/$id Update a condition
DELETE api.copernica.com/v2/condition/$type/$id Delete a condition

Minirules (for miniselections)

Type Address Description
POST api.copernica.com/v2/miniview/$id/minirules Create a new minirule
GET api.copernica.com/v2/minirule/$id Fetch the minirule information
PUT api.copernica.com/v2/minirule/$id Update the minirule information
DELETE api.copernica.com/v2/minirule/$id Delete a minirule
POST api.copernica.com/v2/minirule/$id/conditions Create a minirule condition
DELETE api.copernica.com/v2/minicondition/$type/$id Delete a minirule condition

Profiles & Subprofiles

Profiles and subprofiles can be used to represent entities in your database, like your customers or orders. The relevant API calls can be found below.

Profile

Type Address Description
POST api.copernica.com/v2/database/$id/profiles Create a new database profile
GET api.copernica.com/v2/profile/$id Fetch the profile information
PUT api.copernica.com/v2/profile/$id Update the profile information
DELETE api.copernica.com/v2/profile/$id Delete a profile
GET api.copernica.com/v2/profile/$id/subprofiles/$id Fetch subprofiles for a profile
POST api.copernica.com/v2/profile/$id/subprofiles/$id Create a new subprofile
PUT api.copernica.com/v2/profile/$id/subprofiles/$id Update one or multiple subprofiles
GET api.copernica.com/v2/profile/$id/fields Fetch all profile fields
PUT api.copernica.com/v2/profile/$id/fields Update one or multiple profile fields
GET api.copernica.com/v2/profile/$id/interests Fetch all profile interests
POST api.copernica.com/v2/profile/$id/interests Create profile interest(s)
PUT api.copernica.com/v2/profile/$id/interests Update profile interest(s)
GET api.copernica.com/v2/profile/$id/publisher/emailings Fetch all Publisher mailings for a profile
GET api.copernica.com/v2/profile/$id/ms/emailings Fetch all Marketing Suite mailings for a profile
GET api.copernica.com/v2/profile/$id/publisher/destinations Fetch all Publisher destinations for a profile
GET api.copernica.com/v2/profile/$id/ms/destination Fetch all Marketing Suite destinations for a profile
GET api.copernica.com/v2/profile/$id/files Fetch all files for a profile
POST api.copernica.com/v2/profile/$id/datarequest Create a request for all data stored for a profile
PUT api.copernica.com/v2/profile/$id/unsubscribe Execute unsubscribe behavior of a profile

Subprofile

Type Address Description
POST api.copernica.com/v2/profile/$id/subprofiles Create a new subprofile
GET api.copernica.com/v2/subprofile/$id Fetch the subprofile information
PUT api.copernica.com/v2/subprofile/$id Update the subprofile information
DELETE api.copernica.com/v2/subprofile/$id Delete a subprofile
GET api.copernica.com/v2/subprofile/$id/fields Fetch all subprofile fields
PUT api.copernica.com/v2/subprofile/$id/fields Update the subprofile fields
GET api.copernica.com/v2/subprofile/$id/publisher/emailings Fetch all Publisher mailings for a subprofile
GET api.copernica.com/v2/subprofile/$id/ms/emailings Fetch all Marketing Suite mailings for a subprofile
GET api.copernica.com/v2/subprofile/$id/publisher/destinations Fetch all Publisher destinations for a subprofile
GET api.copernica.com/v2/subprofile/$id/ms/destination Fetch all Marketing Suite destinations for a subprofile
POST api.copernica.com/v2/subprofile/$id/datarequest Create a request for all data stored for a subprofile
PUT api.copernica.com/v2/subprofile/$id/unsubscribe Execute unsubscribe behavior of a subprofile

Publisher Mailings

The table below contains all API calls related to Publisher documents, templates and mailings.

Mailings

Type Address Description
GET api.copernica.com/v2/publisher/emailings Fetch all mailings
GET api.copernica.com/v2/publisher/scheduledemailings Fetch all scheduled mailings
GET api.copernica.com/v2/publisher/emailing/$id Fetch a mailing
GET api.copernica.com/v2/publisher/scheduledemailing/$id Fetch a scheduled mailing
POST api.copernica.com/v2/publisher/emailing Create a mailing
GET api.copernica.com/v2/publisher/emailing/$id/destinations Fetch the destinations for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/snapshot Fetch the snapshot for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/statistics Fetch the statistics for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/abuses Fetch the abuses for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/clicks Fetch the clicks for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/deliveries Fetch the deliveries for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/errors Fetch the errors for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/impressions Fetch the impressions for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/unsubscribes Fetch the unsubscribes for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/testgroups Fetch the testgroups for a mailing
GET api.copernica.com/v2/publisher/emailing/$id/finalgroup Fetch the finalgroup for a mailing
PUT api.copernica.com/v2/publisher/emailing/$id/unsubscribe Unsubscribe (sub)profile based on a mailing
GET api.copernica.com/v2/publisher/message/$id Fetch the message information
GET api.copernica.com/v2/profile/$id/publisher/emailings Fetch all Publisher mailings for a profile
GET api.copernica.com/v2/subprofile/$id/publisher/emailings Fetch all Publisher mailings for a subprofile

Documents & Templates

Type Address Description
GET api.copernica.com/v2/publisher/documents Fetch all documents
GET api.copernica.com/v2/publisher/document/$id Fetch the document information
DELETE api.copernica.com/v2/publisher/document/$id Delete a document
GET api.copernica.com/v2/publisher/document/$id/emailings Fetch all emailings for a document
GET api.copernica.com/v2/publisher/document/$id/statistics Fetch the statistics for a document
GET api.copernica.com/v2/publisher/templates Fetch all templates
GET api.copernica.com/v2/publisher/template/$id Fetch the template information
DELETE api.copernica.com/v2/publisher/template/$id Delete a template
GET api.copernica.com/v2/publisher/template/$id/emailings Fetch all emailings for a template
GET api.copernica.com/v2/publisher/template/$id/documents Fetch all documents for a template

Destinations

Type Address Description
GET api.copernica.com/v2/publisher/destination/$id Fetch an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/body Fetch the message body sent to the destination
GET api.copernica.com/v2/publisher/destinations/$id/fields Fetch an emailing destination including profile fields
GET api.copernica.com/v2/publisher/destination/$id/statistics Fetch the statistics for an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/abuses Fetch the abuses for an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/clicks Fetch the clicks for an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/deliveries Fetch the deliveries for an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/errors Fetch the errors for an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/impressions Fetch the impressions for an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/unsubscribes Fetch the unsubscribes for an emailing destination
GET api.copernica.com/v2/publisher/destination/$id/content Fetch the received content for an emailing destination
GET api.copernica.com/v2/profile/$id/publisher/destinations Fetch the Publisher destinations for a profile
GET api.copernica.com/v2/subprofile/$id/publisher/destinations Fetch the Publisher destinations for a subprofile

Statistics

Type Address Description
GET api.copernica.com/v2/publisher/abuses Fetch all abuses for Publisher
GET api.copernica.com/v2/publisher/clicks Fetch all clicks for Publisher
GET api.copernica.com/v2/publisher/deliveries Fetch all deliveries for Publisher
GET api.copernica.com/v2/publisher/errors Fetch all errors for Publisher
GET api.copernica.com/v2/publisher/impressions Fetch all impressions for Publisher
GET api.copernica.com/v2/publisher/unsubscribes Fetch all unsubscribes for Publisher

Marketing Suite Mailings

The table below contains all API calls related to Marketing Suite templates and emailings.

Mailings

Type Address Description
GET api.copernica.com/v2/ms/emailings Fetch all mailings
GET api.copernica.com/v2/ms/emailing/$id Fetch a mailing
POST api.copernica.com/v2/ms/emailing Create a mailing
GET api.copernica.com/v2/ms/destinations Fetch all destinations for a specific period
GET api.copernica.com/v2/ms/scheduledemailings Fetch all scheduled mailings
GET api.copernica.com/v2/ms/scheduledemailing/$id Fetch a scheduled mailing
POST api.copernica.com/v2/ms/scheduledemailing Create a scheduled mailing
GET api.copernica.com/v2/ms/emailing/$id/destinations Fetch the destinations for a mailing
GET api.copernica.com/v2/ms/emailing/$id/statistics Fetch the statistics for a mailing
GET api.copernica.com/v2/ms/emailing/$id/abuses Fetch all abuses for a mailing
GET api.copernica.com/v2/ms/emailing/$id/clicks Fetch all clicks for a mailing
GET api.copernica.com/v2/ms/emailing/$id/deliveries Fetch all deliveries for a mailing
GET api.copernica.com/v2/ms/emailing/$id/errors Fetch all errors for a mailing
GET api.copernica.com/v2/ms/emailing/$id/impressions Fetch all impressions for a mailing
PUT api.copernica.com/v2/ms/emailing/$id/unsubscribe Unsubscribe (sub)profile based on a mailing
GET api.copernica.com/v2/profile/$id/ms/emailings Fetch all Marketing Suite mailings for a profile
GET api.copernica.com/v2/subprofile/$id/ms/emailings Fetch all Marketing Suite mailings for a subprofile

Templates

Type Address Description
GET api.copernica.com/v2/ms/templates Fetch all templates
GET api.copernica.com/v2/ms/template/$id Fetch a template
DELETE api.copernica.com/v2/ms/template/$id Delete a template
GET api.copernica.com/v2/ms/template/$id/statistics Fetch the statistics for a template

Messages & Destinations

Copernica uses the terms messages and destinations interchangeably in the Marketing Suite. Both refer to a specific message sent to a specific profile or subprofile. Please keep in mind that you can substitute 'message' by 'destination' or vice versa in all of the articles below, including the code examples.

Type Address Description
GET api.copernica.com/v2/ms/destination/$id Fetch a destination
GET api.copernica.com/v2/ms/emailing/$id/destinations Fetch the destinations for a mailing
GET api.copernica.com/v2/ms/destination/$id/body Fetch the message body sent to the destination
GET api.copernica.com/v2/ms/destination/$id/statistics Fetch the statistics for a destination
GET api.copernica.com/v2/ms/destination/$id/abuses Fetch all abuses for a destination
GET api.copernica.com/v2/ms/destination/$id/clicks Fetch all clicks for a destination
GET api.copernica.com/v2/ms/destination/$id/deliveries Fetch all deliveries for a destination
GET api.copernica.com/v2/ms/destination/$id/errors Fetch all errors for a destination
GET api.copernica.com/v2/ms/destination/$id/impressions Fetch all impressions for a destination
GET api.copernica.com/v2/profile/$id/ms/destinations Fetch all Marketing Suite destinations for a profile
GET api.copernica.com/v2/subprofile/$id/ms/destinations Fetch all Marketing Suite destinations for a subprofile

Statistics

Type Address Description
GET api.copernica.com/v2/ms/abuses Fetch all abuses
GET api.copernica.com/v2/ms/clicks Fetch all clicks
GET api.copernica.com/v2/ms/deliveries Fetch all deliveries
GET api.copernica.com/v2/ms/errors Fetch all errors
GET api.copernica.com/v2/ms/impressions Fetch all impressions
GET api.copernica.com/v2/ms/emailing/$id/statistics Fetch the statistics for a mailing
GET api.copernica.com/v2/ms/emailing/$id/abuses Fetch all abuses for a mailing
GET api.copernica.com/v2/ms/emailing/$id/clicks Fetch all clicks for a mailing
GET api.copernica.com/v2/ms/emailing/$id/deliveries Fetch all deliveries for a mailing
GET api.copernica.com/v2/ms/emailing/$id/errors Fetch all errors for a mailing
GET api.copernica.com/v2/ms/emailing/$id/impressions Fetch all impressions for a mailing
GET api.copernica.com/v2/ms/destination/$id/statistics Fetch the statistics for a destination
GET api.copernica.com/v2/ms/destination/$id/abuses Fetch all abuses for a destination
GET api.copernica.com/v2/ms/destination/$id/clicks Fetch all clicks for a destination
GET api.copernica.com/v2/ms/destination/$id/deliveries Fetch all deliveries for a destination
GET api.copernica.com/v2/ms/destination/$id/errors Fetch all errors for a destination
GET api.copernica.com/v2/ms/destination/$id/impressions Fetch all impressions for a destination

Datarequests

The result of data requests is stored for a while after completion. With the following methods you can retrieve the status and data of previously completed calls.

Type Address Description
POST api.copernica.com/v2/email/$email/datarequest Create a request for all data stored for an emailaddress
POST api.copernica.com/v2/profile/$id/datarequest Create a request for all data stored for a profile
POST api.copernica.com/v2/subprofile/$id/datarequest Create a request for all data stored for a subprofile
GET api.copernica.com/v2/datarequest/$id/data Fetch the data of a previous data request
GET api.copernica.com/v2/datarequest/$id/status Fetch the status of a previous data request

Logfiles

Copernica keeps extensive logfiles about everything that happens to your emails after sending. You can find all calls related to logfiles in the table below.

Type Address Description
GET api.copernica.com/v2/logfiles Fetch logfile dates
GET api.copernica.com/v2/logfiles Fetch logfile names
GET api.copernica.com/v2/logfile/$filename/csv Fetch logfiles in CSV format
GET api.copernica.com/v2/logfile/$filename/json Fetch logfiles in JSON format
GET api.copernica.com/v2/logfile/$filename/xml Fetch logfiles in XML format

Webhooks

Webhooks are processes that notify their user of events that happen in real time through HTTP POST. You can find all calls related to webhooks in the table below.

Type Address Description
GET api.copernica.com/v2/webhook/$id Fetch a webhook
POST api.copernica.com/v2/webhooks Create a webhook
PUT api.copernica.com/v2/webhook/$id Update a webhook
DELETE api.copernica.com/v2/webhook/$id Remove a webhook