Prepr Documentation

Prepr Documentation

Welcome to the Prepr Documentation. You'll find comprehensive guides and documentation to help you start working with Prepr as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

And now your Prepr journey begins!

 

API RELEASE 6.0

Contact Prepr support before using the new Prepr 6 API to upgrade your existing keys.

Overview

This is reference documentation for the Prepr REST API.

The API provides programmatic access to all of the key parts of Prepr. To get started with the API, you'll need to first have created a application or an lifetime access token.

Making a request

Making a request to our API is as simple as issuing an HTTP GET request. You can make these requests using the mechanism of your choosing. For debugging and developing our team uses Postman.

GET /publications?access_token={{access_token}} HTTP/1.0

More about the basis in our guide Basics explained and some advanced functions Overview and Best Practices .

Interpreting the Response

All API endpoints will return a HTTP status code that matches the state of your request. The status codes are explained in the Response Codes guide.

Suggest Edits

/publications

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/publications
curl --request GET \
  --url https://api.eu1.prepr.io/publications
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/publications' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/publications")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/publications");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/publications"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "items": [
        {
            "id": "93fb1b38-9a85-4d6e-9639-8c4a8a88454a",
            "created_on": "2019-01-14T19:52:58+00:00",
            "changed_on": null,
            "label": "Publication",
            "slug": {
                "en-EN": "publication-model-two-21"
            },
            "publish_on": {
                "en-EN": "2019-01-11T13:24:34+00:00"
            },
            "status": {
                "en-EN": {
                    "id": "7f18224a-437b-4421-a7ce-6551d177c53e",
                    "created_on": "2018-12-24T09:09:25+00:00",
                    "changed_on": null,
                    "label": "Status",
                    "body": "Done"
                }
            }
        },
        {
					// ....
        }
    ],
    "total": 2,
    "after": "YWZ0ZXJfMjU=",
    "before": "YmVmb3JlXzA=",
    "skip": 0,
    "limit": 25
}
 

Sorting publications

created_on,
-created_on,
changed_on,
-changed_on,
published_on,
-published_on

{
	"sort" : "created_on"
}

Sorting on publish_on

Because the publish_on param of a Publication is localized, if no locale param is present the API will sort on the default Environment locale.

Filtering publications

Here you will find everything you need to learn how the query Prepr.

eq (equal)

The eq operator checks that the field matches the described value exactly. It takes a single value for filtering.

{
	"{field}" : [
		{
			"eq" : "To do",
			"param" : "{param}" // Optional
		}
	]
}

all

The all operator filters all publications matching a specific set of values.

{
	"{field}" : [
		{
			"all" : [
				"42314cdb-5705-4f6c-b190-74ca06fb83f1",
				"0e45b74b-e6b7-b346-7b64-a8e446232d76"      
			],
			"param" : "{param}" // Optional
		}
	]
}

in

The in operator filters a field by multiple values. The publication must match at least one of them.

{
	"{field}" : [
		{
			"in" : [
				"42314cdb-5705-4f6c-b190-74ca06fb83f1",
				"0e45b74b-e6b7-b346-7b64-a8e446232d76"      
			],
			"param" : "{param}" // Optional
		}
	]
}

has

The has operator filters a field by checking the existence. The publication must have at least one field.

{
	"{field}" : [
		{
			"has" : true
		}
	]
}

Model

Filter publications on the Publication Model.

{
	"model" : { 
		"body" : "One"
	}
}

Status

/statuses

Supported operators: eq, in.

{
	"status" : [
		{
			"eq" : "To do",
			"in" : [
				"Done", "To do"
			]
		}
	]
}

Querying eq status 'Done' is optimized and will respond faster than a multi-status request if a locale is specified.

Locales

/locales

Supported operators: eq, in.

{
	"locales" : [
		{
			"eq" : "en-EN",
			"in" : [
				"en-EN", "en-US"
			]
		}
	]
}

Please note that an Publication only gets a locale link when at least one field is filled for that locale.

Created by

/users

Supported operators: eq, in.

{
	"created_by" : [
		{
			"eq" : "bcc9eea7-7307-f45b-5aaf-27eca7d329f9",
			"in" : [
				"222b7528-9e3a-294f-21bf-7ec623d1ac74",
				"bcc9eea7-7307-f45b-5aaf-27eca7d329f9"
			]
		}
	]
}

Assigned to

/users

Supported operators: eq, in.

{
	"assigned_to" : [
		{
			"eq" : "bcc9eea7-7307-f45b-5aaf-27eca7d329f9",
			"in" : [
				"222b7528-9e3a-294f-21bf-7ec623d1ac74",
				"bcc9eea7-7307-f45b-5aaf-27eca7d329f9"
			]
		}
	]
}

Channel

/channels

Supported operators: eq, in.
Supported params: Id (default), Slug, Body.

{
	"channels" : [
		{
			"eq" : "bcc9eea7-7307-f45b-5aaf-27eca7d329f9",
			"in" : [
				"222b7528-9e3a-294f-21bf-7ec623d1ac74",
				"bcc9eea7-7307-f45b-5aaf-27eca7d329f9"
			],
			"param" : "Id"
		}
	]
}

Tag

The tags filters on all the tags associated with the publication.

Supported operators: eq, all, in, has.
Supported params: id (default), slug, body.

{
	"tags" : [
		{
			"eq" : "bcc9eea7-7307-f45b-5aaf-27eca7d329f9",
			"all" : [
				"222b7528-9e3a-294f-21bf-7ec623d1ac74",
				"bcc9eea7-7307-f45b-5aaf-27eca7d329f9"
			],
			"in" : [
				"222b7528-9e3a-294f-21bf-7ec623d1ac74",
				"bcc9eea7-7307-f45b-5aaf-27eca7d329f9"
			],
			"has" : true,
			"param" : "Id"
		}
	]
}

Containers (stories)

/containers

Supported operators: eq, in.

{
	"conainers" : [
		{
			"eq" : "bcc9eea7-7307-f45b-5aaf-27eca7d329f9",
			"in" : [
				"222b7528-9e3a-294f-21bf-7ec623d1ac74",
				"bcc9eea7-7307-f45b-5aaf-27eca7d329f9"
			]
		}
	]
}

Slug

Supported operators: eq.
Requires locale, requires model for a unique result.

{
	"slug" : [
		{
			"eq" : "nieuws/388107-beelden-paaseiland-wandelden-over-het-eiland.html"
		}
	]
}

Search

Filter publications by searching in all text fields with fuzzy search.

Supported operators: fz.

{
	"q" : [
		{
			"fz" : "Our character is what we do when we think no one is looking"
		}	
	]
}

Dates

The date filter can be used with the operators eq, lt, gt and accepts UTC timestamps.

{
	"created_on" : [
		{
			"eq" : "2019-01-08T14:10:58+00:00", // Optimized
			"lt" : "2019-01-08T14:10:58+00:00", // Optimized (if used with gt)
			"gt" : "2019-01-08T14:10:58+00:00",
		}	
	],
	"changed_on" : [
		{
			"eq" : "2019-01-08T14:10:58+00:00",
			"lt" : "2019-01-08T14:10:58+00:00",
			"gt" : "2019-01-08T14:10:58+00:00",
		}	
	],
	"publish_on" : [
		{
			"eq" : "2019-01-08T14:10:58+00:00", // Optimized
			"lt" : "2019-01-08T14:10:58+00:00", // Optimized (if used with gt)
			"gt" : "2019-01-08T14:10:58+00:00",
		}	
	],
	"expire_on" : [
		{
			"eq" : "2019-01-08T14:10:58+00:00", // Coming soon
			"lt" : "2019-01-08T14:10:58+00:00", // Coming soon
			"gt" : "2019-01-08T14:10:58+00:00", // Coming soon
		}	
	]
}

When querying publish_on without a locale specified the results will be accurate in a one hour window.

Querying created_on/publish_on eq or gt with lt is optimized and will respond much faster than other range requests.

Location proximity search

Coming soon!

You can use a proximity search on publications with a location field to find results in a specified geographical area.

Queries that include exact coordinates can't take advantage of caching. In many use cases it should be enough to round the coordinates to 3 decimal places (an accuracy of about 300m), 2 decimal places (an accuracy of about 1km) or more to improve your cache hit rates.

Scopes: publications.

Suggest Edits

/publications

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.eu1.prepr.io/publications
curl --request POST \
  --url https://api.eu1.prepr.io/publications
var request = require("request");

var options = { method: 'POST', url: 'https://api.eu1.prepr.io/publications' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/publications")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.eu1.prepr.io/publications");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/publications"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	// Returns the same result as GET /publications/{id}
}

Body Params

model
object
 
model.id
string
items
mixed type
locales
array of strings
required

Locales (min: 1)

status
object
 
status.*
object
 
status.*.body
string
publish_on
object
 
publish_on.*
date-time

UTC timestamp

expire_on
object
 
expire_on.*
date-time

UTC timestamp

channels
object
 
channels.*
object
 
channels.*.id
string
containers
object
 
containers.*
object
 
containers.*.id
string
assigned_to
object
 
assigned_to.*
object
 
assigned_to.*.id
string

/users (id)

 
{
	"model" : { 
		"id" : "8ca916d8-ba5c-4c6b-a91a-4c4fb2213879"
	},
	"publish_on" : {
		"en-EN" : "1546956658", // UTC TIMESTAMP
		"nl-NL" : "1546351870"
	},
	"expire_on" : {
		"en-EN" : "1546956658",
		"nl-NL" : "1546351870"
	},
	"status" : {
		"en-EN" : {
			"body" : "To do"
		},
		"nl-NL" : {
			"body" : "Done"
		}
	},
	"channels" : [
		{
			"id" : "ddc429a1-2bf1-cf99-5bbe-76ad8f3b6334"
		}
	],
	"containers" : [
		{
			"id" : "5776f710-5d3d-3c8e-c9c6-e4a56579218c"
		}
	],
	"assigned_to" : {
		"en-EN" : {
			"id" : "52475775"
		},
		"nl-NL" : {
			"id" : "392185ba-d803-41ab-8a35-88018123aa5c"
		}
	},
	"locales" : [
		"en-EN",
		"nl-NL"
	],
	"items" : {
		"en-EN" : {
			"title" : {
				"body" : "This is the title",
				"format" : "H6",
				"label" : "Text"
			},
			"summary" : {
				"body" : "En dit is de summary text.",
				"label" : "Text"
			},
			"boolean" : {
				"value" : true
			},
			"integer" : {
				"value" : 3742343
			},
			"float" : {
				"value" : 94.23423
			},
			"bnnvara" : {
				"id" : "384727"
			},
			"quote" : {
				"author" : "Albert Einstein",
				"body" : "If we knew what it was we were doing, it would not be called research, would it?"
			},
			"number" : {
				"title" : "Viering van de liefde in Amsterdam",
				"number" : 349,
				"body" : "mensen",
				"description" : "nemen op 'Viering van de Liefde' afstand van Nashville-verklaring"
			},
			"location" : {
				"latitude" : 21.3137,
				"longitude" : -157.806
			},
			"tags" : {
				"items" : [
					{
						"name" : "airplane"
					}	
				]
			},
			"hours" : [
				{
					"open_day" : 6,
					"open_time" : "12:00",
					"close_day" : 6,
					"close_time" : "17:00"
				}	
			],
			"publication" : {
				"id" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1"
			},
			"publications" : {
				"items" : [
					{
						"id" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1"
					},
					{
						"id" : "220e1e38-3e01-40f9-800e-19ec9ebb43d1"
					}
				]
			}
		},
		"nl-NL" : {
			"title" : {
				"body" : "Dit is de titel",
				"format" : "H6",
				"label" : "Text"
			},
			"summary" : {
				"body" : "If we knew what it was we were doing, it would not be called research, would it?",
				"label" : "Text"
			}
		}
	}
}

Scopes: publications, publications_publish.
Events: publication.created.

Suggest Edits

/publications/{id}

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/publications/id
curl --request GET \
  --url https://api.eu1.prepr.io/publications/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.eu1.prepr.io/publications/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/publications/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/publications/id");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/publications/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "id": "ec21095b-4beb-4cea-890f-1255bbe4a002",
    "created_on": "2019-01-09T15:38:04+00:00",
    "changed_on": null,
    "label": "Publication",
    "publish_on": {
        "en-EN": "2019-01-08T14:10:58+00:00"
    },
    "expire_on": {
        "en-EN": "2019-01-08T14:10:58+00:00"
    },
    "locales": [
        "en-EN"
    ],
    "status": {
        "en-EN": {
            "id": "9246edd8-f67b-45f7-b416-566377789d2c",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "To do"
        }
    },
    "items": {
        "en-EN": {
            "title": {
                "id": "0156ec9a-dbaa-4d35-8efa-e1e9f9c0aac7",
                "created_on": "2019-01-09T15:38:04+00:00",
                "changed_on": null,
                "label": "Text",
                "body": "This is the title",
                "format": "H6"
            },
            "summary": {
                "id": "72c09cbe-aeaf-471a-a0e7-19195cd2899f",
                "created_on": "2019-01-09T15:38:04+00:00",
                "changed_on": null,
                "label": "Text",
                "body": "En dit is de summary text.",
                "format": null
            }
        }
    }
}
{
    "code": 404,
    "message": "Not Found",
    "dbtrace": "GAE.xxxxxxxxxxxxxx"
}

Path Params

id
string
required

Query Params

fields
string
 

Fields: items, title, model, locales, status, environment, created_by, updated_by, assigned_to.
Scopes: publications.

Suggest Edits

/publications/{id}

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
puthttps://api.eu1.prepr.io/publications/id
curl --request PUT \
  --url https://api.eu1.prepr.io/publications/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.eu1.prepr.io/publications/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/publications/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.eu1.prepr.io/publications/id");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/publications/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	// Returns the same result as GET /publications/{id}
}

Path Params

id
string
required
 

This endpoint is identical to POST, with the exception that label is not required.

Scopes: publications, publications_publish.
Events: publication.changed.

Suggest Edits

/publications/{id}

 
delete/publications/id
curl --request DELETE \
  --url http://example.com/publications/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'http://example.com/publications/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/publications/id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "http://example.com/publications/id");

xhr.send(data);
import requests

url = "http://example.com/publications/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

// empty response

Path Params

id
string
required
 

Scopes: publications, publications_delete.
Events: publication.deleted.

Suggest Edits

Items explained

 

The Publication items array contains the content of the Publication. For every locale there is a array containing the fields specified by the Publication Model.

"items" : {
  "en-EN" : {
    "{{api_id}}" : {
      "body" : "This is the title",
      "format" : "H6"
  		// For a specification of the fields check the type model below.
    }
  }
}

Format options

Here below you will find a table with all possible text format options.

param value
UI functionality
API value

H1

heading input field

body without html and format specified

H2

heading input field

body without html and format specified

H3

heading input field

body without html and format specified

H4

heading input field

body without html and format specified

H5

heading input field

body without html and format specified

H6

heading input field

body without html and format specified

CODE

raw html input field

body contains html and format specified (this will be used for the UI editor)

null

basic wysiwyg editor input field. (bold, italic, list, list with numbers, link/url)

body contains html and no format specified

"{{api_id}}" : {
	"body" : "This is the title",
	"label" : "Text", // Required inside the Drag-and-drop editor
	"format" : "H6" // Optional
}
"{{api_id}}": {
	"id": "4b950836-f274-4ef2-a91b-efd064b55ae4",
	"created_on": "2019-01-09T20:29:28+00:00",
	"changed_on": null,
	"label": "Text",
	"body": "This is the title",
	"format": "H6"
},
"{{api_id}}" : {
	"body" : "#003366",
	"label" : "Color", // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "411c7ddb-58d4-487b-9bd4-9bb43eec279d",
	"created_on": "2019-01-09T20:39:50+00:00",
	"changed_on": null,
	"label": "Color",
	"body": "#003366",
	"format": "Color"
}
 
"{{api_id}}" : {
	"body" : "2020-01-01",
	"label" : "DateTime", // Required inside the Drag-and-drop editor
	"format" : "Y-m-d" // Required inside the Drag-and-drop editor
}
 
"{{api_id}}" : {
	"value" : true,
	"label" : "Boolean" // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "38b6d11b-eaa8-4c3f-bbda-232b4de54501",
	"created_on": "2019-01-09T20:45:51+00:00",
	"changed_on": null,
	"label": "Boolean",
	"value": true
}
Suggest Edits

ElementBox

 
"{{api_id}}": {
	"items": [
      {
        // element 1 
      },
      {
        // element 2
      }
	],
  "label" : "ElementBox"
}
"{{api_id}}": {
	"items": [
      {
        // element 1 
      },
      {
        // element 2
      }
	],
  "label" : "ElementBox"
}
 
"{{api_id}}" : {
	"value" : 5472653,
	"label" : "Integer" // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "ca1bded4-edaa-45a1-b7b6-f7fac96a7afd",
	"created_on": "2019-01-09T20:45:51+00:00",
	"changed_on": null,
	"label": "Integer",
	"value": 3742343
}
"{{api_id}}" : {
	"value" : 54.72653,
	"label" : "Float" // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "e09b4321-3811-4b6f-9440-26f1290ee402",
	"created_on": "2019-01-09T21:04:48+00:00",
	"changed_on": null,
	"label": "Float",
	"value": 94.23423
},
Suggest Edits

Coordinates

 
"{{api_id}}" : {
	"latitude": "21.3137",
	"longitude": "-157.806",
	"label" : "Coordinates" // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "56c9ddb0-1c91-49db-a322-736c5d343280",
	"created_on": "2019-01-07T16:05:08+00:00",
	"changed_on": null,
	"label": "Coordinates",
	"latitude": 21.3137,
	"longitude": -157.806
}
"{{api_id}}" : {
	"author" : "Albert Einstein",
	"body" : "If we knew what it was we were doing, it would not be called research, would it?",
	"label" : "Quote" // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "8faf8d54-6b85-44dd-b707-28b058fd939f",
	"created_on": "2019-01-09T20:52:49+00:00",
	"changed_on": null,
	"label": "Quote",
	"body": "If we knew what it was we were doing, it would not be called research, would it?",
	"author": "Albert Einstein"
},
"{{api_id}}" : {
	"title" : "Viering van de liefde in Amsterdam",
	"number" : 349,
	"description" : "nemen op 'Viering van de Liefde' afstand van Nashville-verklaring",
	"body" : "mensen",
	"label" : "Number"
}
"{{api_id}}": {
	"id": "13ff1609-1987-427c-924e-ebf31c4079fe",
	"created_on": "2019-01-09T20:57:44+00:00",
	"changed_on": null,
	"label": "Number",
	"body": "mensen",
	"number": 349,
	"description": "nemen op 'Viering van de Liefde' afstand van Nashville-verklaring",
	"title": "Viering van de liefde in Amsterdam"
},
 
"{{api_id}}" : {
	"url" : "https://nos.nl/artikel/2266773-honderden-nemen-op-viering-van-de-liefde-afstand-van-nashville-verklaring.html",
	"label" : "Resource"
}
Suggest Edits

TwitterPost

 
"{{api_id}}" : {
	"url" : "https://twitter.com/realDonaldTrump/status/1083022011574747137",
	"label" : "TwitterPost" // Required inside the Drag-and-drop editor
}
Suggest Edits

InstagramPost

 
"{{api_id}}" : {
	"url" : "https://www.instagram.com/p/BrSs_aglLEb",
	"label" : "InstagramPost" // Required inside the Drag-and-drop editor
}
Suggest Edits

YouTubePost

 
"{{api_id}}" : {
	"url" : "https://www.youtube.com/watch?v=4xgx4k83zzc",
	"label" : "YouTubePost" // Required inside the Drag-and-drop editor
}
Suggest Edits

FacebookPost

 
"{{api_id}}" : {
	"url" : "https://www.facebook.com/openbac/photos/a.560688977339484/2364254840316213",
	"label" : "FacebookPost" // Required inside the Drag-and-drop editor
}
Suggest Edits

VimeoPost

 
"{{api_id}}" : {
	"url" : "https://vimeo.com/190247248",
	"label" : "VimeoPost" // Required inside the Drag-and-drop editor
}
Suggest Edits

SoundCloudPost

 
"{{api_id}}" : {
	"url" : "https://soundcloud.com/summersaltband/driving-to-hawaii",
	"label" : "SoundCloudPost" // Required inside the Drag-and-drop editor
}
Suggest Edits

SpotifyPlaylist

 
"{{api_id}}" : {
	"url" : "https://open.spotify.com/user/11158963147/playlist/6AfkmB7MBUuYJ7oFAvp81G?si=txHmkuucRPuFemHtVx17BQ",
	"label" : "SpotifyPlaylist" // Required inside the Drag-and-drop editor
}
Suggest Edits

BnnvaraPost

 
"{{api_id}}" : {
	"id" : "AB6CD2",
	"label" : "BnnvaraPost" // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "a734jad",
	"created_on": "2019-01-09T20:29:28+00:00",
	"changed_on": null,
	"label": "BnnvaraPost"
},
Suggest Edits

QualifioPost

 
"{{api_id}}" : {
	"id" : "87654321",
	"label" : "QualifioPost" // Required inside the Drag-and-drop editor
}
"{{api_id}}": {
	"id": "a734jad-32478623-sdafw4f4jgfj4",
	"created_on": "2019-01-09T20:29:28+00:00",
	"changed_on": null,
	"label": "QualifioPost"
},
Suggest Edits

Publications (ref)

 

Publication references can be created as a one to many relationship.

"{{api_id}}" : {
  "items" : [
		{
			"id" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1"
		},
		{
			"id" : "220e1e38-3e01-40f9-800e-19ec9ebb43d1"
		}
	]
}
"{{api_id}}": {
	"label": "Publication",
	"items": {
		"0": {
			"id": "1852380d-50b1-486e-b8c3-c5b8f45f9ac1",
			"created_on": "2019-01-07T19:59:26+00:00",
			"changed_on": null,
			"label": "Publication"
		},
		"1": {
			"id": "220e1e38-3e01-40f9-800e-19ec9ebb43d1",
			"created_on": "2019-01-07T20:41:03+00:00",
			"changed_on": null,
			"label": "Publication"
		}
	}
}
Suggest Edits

Assets (ref)

 

Asset references can be created as a one to many relationship.

"{{api_id}}" : {
  "items" : [
		{
			"id" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1"
		},
		{
			"id" : "220e1e38-3e01-40f9-800e-19ec9ebb43d1"
		}
	]
}
"{{api_id}}": {
	"label": "Asset",
	"items": {
		"0": {
			"id": "1852380d-50b1-486e-b8c3-c5b8f45f9ac1",
			"created_on": "2019-01-07T19:59:26+00:00",
			"changed_on": null,
			"label": "Asset"
		},
		"1": {
			"id": "220e1e38-3e01-40f9-800e-19ec9ebb43d1",
			"created_on": "2019-01-07T20:41:03+00:00",
			"changed_on": null,
			"label": "Asset"
		}
	}
}
Suggest Edits

Tags (ref)

 

Tags references can be created as a one to many relationship.
Tags posted as body are created if they don't exists.

"{{api_id}}" : {
  "items" : [
		{
			"id" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1", // Optional; Add by Id or body
			"body" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1" // Optional; Add by Id or body
		},
		{
			"id" : "220e1e38-3e01-40f9-800e-19ec9ebb43d1",  // Optional; Add by Id or body
			"body" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1" // Optional; Add by Id or body
		}
	]
}
"{{api_id}}": {
	"label": "TagBox",
	"items": {
		"0": {
			"id": "1852380d-50b1-486e-b8c3-c5b8f45f9ac1",
			"created_on": "2018-03-08T15:36:13+00:00",
			"changed_on": "2018-12-17T10:58:16+00:00",
			"label": "Tag",
			"body": "Politics",
			"slug": "politics"
		},
		"1": {
			"id": "5785cd69-fa47-434a-b027-3d3b750c5f69",
			"created_on": "2018-03-08T15:36:13+00:00",
			"changed_on": "2018-12-17T10:58:16+00:00",
			"label": "Tag",
			"body": "Sport",
			"slug": "sport"
		}
	}
}
Suggest Edits

Persons (ref)

 

Person (audience) references can be created as a one to many relationship.

"{{api_id}}" : {
  "items" : [
		{
			"id" : "1852380d-50b1-486e-b8c3-c5b8f45f9ac1"
		},
		{
			"id" : "220e1e38-3e01-40f9-800e-19ec9ebb43d1"
		}
	]
}
"{{api_id}}": {
	"label": "Person",
	"items": {
		"0": {
			"id": "1852380d-50b1-486e-b8c3-c5b8f45f9ac1",
			"created_on": "2019-01-07T19:59:26+00:00",
			"changed_on": null,
			"label": "Person"
		},
		"1": {
			"id": "220e1e38-3e01-40f9-800e-19ec9ebb43d1",
			"created_on": "2019-01-07T20:41:03+00:00",
			"changed_on": null,
			"label": "Person"
		}
	}
}
Suggest Edits

BusinessHours

 
"{{api_id}}" : [
    {
      "open_day" : 2,
      "open_time" : "08:00",
      "close_day" : 2,
      "close_time" : "19:00"
    }
  ]
}
Suggest Edits

/containers

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/containers
curl --request GET \
  --url https://api.eu1.prepr.io/containers
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/containers' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/containers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/containers");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/containers"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results
 
Suggest Edits

/channels

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/channels
curl --request GET \
  --url https://api.eu1.prepr.io/channels
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/channels' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/channels")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/channels");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/channels"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results
 

Scopes: channels.

Suggest Edits

/statuses

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/statuses
curl --request GET \
  --url https://api.eu1.prepr.io/statuses
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/statuses' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/statuses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/statuses");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/statuses"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "items": [
        {
            "id": "3ad273ed-a525-4300-a9ac-baaaf7621446",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "Archived"
        },
        {
            "id": "7f18224a-437b-4421-a7ce-6551d177c53e",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "Published"
        },
        {
            "id": "0e4ad6eb-f7ef-44dd-9645-07e2728afd4e",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "Expired"
        },
        {
            "id": "cff13c2a-615a-4f85-a50d-cc05104e6d6b",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "In progress"
        },
        {
            "id": "2fc5de5c-7364-4e59-902a-ffe6b2653fe4",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "Pending"
        },
        {
            "id": "1921ef7c-f8a1-4211-b636-954170b68055",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "Private"
        },
        {
            "id": "0c734433-0a3e-4f86-b45d-18c3da284772",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "Review"
        },
        {
            "id": "9246edd8-f67b-45f7-b416-566377789d2c",
            "created_on": "2018-12-24T09:09:25+00:00",
            "changed_on": null,
            "label": "Status",
            "body": "To do"
        }
    ],
    "total": 8,
    "after": "YWZ0ZXJfMjU=",
    "before": "YmVmb3JlXzA=",
    "skip": 0,
    "limit": 25
}
 

Scopes: statuses.

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/locales
curl --request GET \
  --url https://api.eu1.prepr.io/locales
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/locales' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/locales")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/locales");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/locales"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "items": [
        {
            "id": "a33baedc-dc4f-488e-9953-2c1cc4ea7232",
            "created_on": "2019-01-10T13:14:20+00:00",
            "changed_on": null,
            "label": "Locale",
            "body": "nl-BE"
        },
        {
            "id": "a10bb394-a1a0-4f34-b427-2c5c487035d2",
            "created_on": "2019-01-10T13:14:29+00:00",
            "changed_on": null,
            "label": "Locale",
            "body": "en-EN"
        },
        {
            "id": "ebc6e749-526c-4785-926b-7b49543ba485",
            "created_on": "2019-01-10T13:14:38+00:00",
            "changed_on": null,
            "label": "Locale",
            "body": "en-US"
        },
        {
            "id": "4a99e697-d08f-41cb-9d78-0eaf2bcc88a1",
            "created_on": "2019-01-10T13:14:43+00:00",
            "changed_on": null,
            "label": "Locale",
            "body": "de-DE"
        },
        {
            "id": "bd97a0c9-c2f9-42e5-b0aa-69b7fb91ea1a",
            "created_on": "2019-01-10T13:13:45+00:00",
            "changed_on": null,
            "label": "Locale",
            "body": "nl-NL"
        }
    ],
    "total": 5,
    "after": "YWZ0ZXJfMjU=",
    "before": "YmVmb3JlXzA=",
    "skip": 0,
    "limit": 25
}

Query Params

fields
string
q
string
sort
string

Possible options: -id,id,-created_on,created_on,-body,body

 
Suggest Edits

/channels

With Prepr you can publish to all your digital channels. Publish to your website, app, live blog, social wall, social media and on location screens. All those different front ends are defined as an Channel. This description is all about the web channels.

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/channels
curl --request GET \
  --url https://api.eu1.prepr.io/channels
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/channels' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/channels")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/channels");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/channels"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "items": [
        {
            "id": "81ef56b4-561f-f42e-75b5-3602fd9954ac",
            "created_on": "2018-09-12T11:36:38+00:00",
            "changed_on": "2019-02-07T09:58:50+00:00",
            "label": "Channel",
            "name": "Floortje Naar Het Einde van de Wereld",
          	"slug": "floortje-naar-het-einde-van-de-wereld
        },
        {
					// ....
        }
    ],
    "total": 2,
    "after": "YWZ0ZXJfMjU=",
    "before": "YmVmb3JlXzA=",
    "skip": 0,
    "limit": 25
}
 

Sorting channels

created_on,
-created_on,
changed_on,
-changed_on,
name,
-name

{
	"sort" : "created_on"
}

Filtering channels

Here you will find everything you need to learn how the query Prepr.

Name

Filter channels by name with equal or fuzzy search.

Supported operators: eq, fz.

{
	"name" : [
		{
			"eq" : "International",
			"fz" : "interna"
		}
	]
}

Slug

Filter channels by slug, since a slug is unique this filter will always return one result.

Supported operators: eq.

{
	"slug" : [
		{
			"eq" : "international"
		}
	]
}

Scopes: channels.

Suggest Edits

/channels

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttps://api.eu1.prepr.io/channels
curl --request POST \
  --url https://api.eu1.prepr.io/channels
var request = require("request");

var options = { method: 'POST', url: 'https://api.eu1.prepr.io/channels' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/channels")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.eu1.prepr.io/channels");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/channels"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	// Returns the same result as GET /channels/{id}
}

Body Params

name
string
required
slug
string

is unique

 
{
	"name": "Floortje naar het einde van de wereld",
	"slug": "floortje-naar-het-einde-van-de-wereld"
}

Scopes: channels, channels_publish.
Events: channel.created.

Suggest Edits

/channels/{id}

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/channels/id
curl --request GET \
  --url https://api.eu1.prepr.io/channels/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.eu1.prepr.io/channels/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/channels/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/channels/id");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/channels/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	"id": "81ef56b4-561f-f42e-75b5-3602fd9954ac",
	"created_on": "2018-09-12T11:36:38+00:00",
	"changed_on": "2019-02-07T09:58:50+00:00",
	"label": "Channel",
	"name": "Floortje Naar Het Einde van de Wereld",
	"slug": "floortje-naar-het-einde-van-de-wereld
}
{
    "code": 404,
    "message": "Not Found",
    "dbtrace": "GAE.xxxxxxxxxxxxxx"
}

Path Params

id
string
required

Query Params

fields
string
 

Scopes: channels.

Suggest Edits

/channels/{id}

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
puthttps://api.eu1.prepr.io/channels/id
curl --request PUT \
  --url https://api.eu1.prepr.io/channels/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.eu1.prepr.io/channels/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/channels/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.eu1.prepr.io/channels/id");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/channels/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	// Returns the same result as GET /channels/{id}
}

Path Params

id
string
required
 

This endpoint is identical to POST, with the exception that name is not required.

Scopes: channels, channels_publish.
Events: channel.changed.

Suggest Edits

/channels/{id}

 
delete/channels/id
curl --request DELETE \
  --url http://example.com/channels/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'http://example.com/channels/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/channels/id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "http://example.com/channels/id");

xhr.send(data);
import requests

url = "http://example.com/channels/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

// empty response

Path Params

id
string
required
 

Slugs of a deleted channel cannot be reused.

Scopes: channels, channels_delete.
Events: channel.deleted.

get
curl --request GET \
  --url http://example.com/
var request = require("request");

var options = { method: 'GET', url: 'http://example.com/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://example.com/");

xhr.send(data);
import requests

url = "http://example.com/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "items": [
        {
            "id": "8431f12-27d5-4c83-9121-1d61649415",
            "created_on": "2018-09-04T12:57:01+00:00",
            "changed_on": null,
            "label": "Tag",
            "body": "Unicorn",
            "slug": "unicorn"
        },
        {
            "id": "2c98d5a3-9dca-4619-9031-6b82dc795f15",
            "created_on": "2018-09-04T12:57:01+00:00",
            "changed_on": null,
            "label": "Tag",
            "body": "Climate change",
            "slug": "climate-change"
        }
    ],
    "total": 98,
    "after": "YWZ0ZXJfMg==",
    "before": "YmVmb3JlXzA=",
    "skip": 0,
    "limit": 2
}
 

Sorting tags

id,
-id,
created_on,
-created_on,
changed_on,
-changed_on,
body,
-body

{
	"sort" : "created_on"
}

Filtering tags

Here you will find everything you need to learn how the query Prepr.

Search

Filter tags by searching in the body field with fuzzy search.

Supported operators: fz.

{
	"q" : [
		{
			"fz" : "Spor"
		}	
	]
}

Slug

Supported operators: eq.

{
	"slug" : [
		{
			"eq" : "news-and-sports"
		}
	]
}

Scopes: tags.

post/tags
curl --request POST \
  --url http://example.com/tags
var request = require("request");

var options = { method: 'POST', url: 'http://example.com/tags' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/tags")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://example.com/tags");

xhr.send(data);
import requests

url = "http://example.com/tags"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	// Returns the same result as GET /publications/{id}
}

Body Params

body
string
required
slug
string

(auto generated if not set)

 

Scopes: tags, tags_publish.

Suggest Edits

/tags/{id}

 
get/tags/id
curl --request GET \
  --url http://example.com/tags/id
var request = require("request");

var options = { method: 'GET',
  url: 'http://example.com/tags/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/tags/id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://example.com/tags/id");

xhr.send(data);
import requests

url = "http://example.com/tags/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "id": "2c98d5a3-9dca-4619-9031-6b82dc795f15",
    "created_on": "2018-09-04T12:57:01+00:00",
    "changed_on": null,
    "label": "Tag",
    "body": "Unicorn",
    "slug": "unicorn"
}

Path Params

id
string
required
 

Scopes: tags.

Suggest Edits

/tags/{id}

 
put
curl --request PUT \
  --url http://example.com/
var request = require("request");

var options = { method: 'PUT', url: 'http://example.com/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "http://example.com/");

xhr.send(data);
import requests

url = "http://example.com/"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	// Returns the same result as GET /publications/{id}
}

Path Params

id
string
required

Body Params

body
string
required
slug
string
 

This endpoint is identical to POST.

Scopes: tags, tags_publish.

Suggest Edits

/tags/{id}

 
delete/tags/id
curl --request DELETE \
  --url http://example.com/tags/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'http://example.com/tags/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/tags/id")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "http://example.com/tags/id");

xhr.send(data);
import requests

url = "http://example.com/tags/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

// empty response

Path Params

id
string
required
 

Scopes: tags, tags_delete.

Suggest Edits

About Publication Models

 

Prepr organizes content into environments, that allows you to group all the related data for a project together, this includes publications, assets, and settings for localizing content into different languages.

Each environment has their own publication models that represents the data structure for a publication.

Suggest Edits

/publication_models

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/publication_models
curl --request GET \
  --url https://api.eu1.prepr.io/publication_models
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.eu1.prepr.io/publication_models' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/publication_models")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/publication_models");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/publication_models"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "items": [
    {
      "id": "0e91ac7f-2525-4356-816f-fd19b5283d8f",
      "created_on": "2019-01-03T10:49:24+00:00",
      "changed_on": "2019-01-03T22:03:29+00:00",
      "body": "Example",
      "description": "Example Model for StarFm",
      "label": "PublicationModel",
      "stories": true,
      "channels": true
    }
  ],
  "total": 1,
  "after": "YWZ0ZXJfMjU=",
  "before": "YmVmb3JlXzA=",
  "skip": 0,
  "limit": 25
}
 

Fields: fields, title.
Scopes: publication_models.

Suggest Edits

/publication_models/{id}

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/publication_models/id
curl --request GET \
  --url https://api.eu1.prepr.io/publication_models/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.eu1.prepr.io/publication_models/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/publication_models/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/publication_models/id");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/publication_models/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	"id": "0e91ac7f-2525-4356-816f-fd19b5283d8f",
	"created_on": "2019-01-03T10:49:24+00:00",
	"changed_on": "2019-01-03T22:03:29+00:00",
	"body": "Example",
	"description": "Example Model for StarFm",
	"label": "PublicationModel",
	"stories": true,
	"channels": true
}

Path Params

id
string
required

Query Params

fields
string
 

Fields: fields, title.
Scopes: publication_models.

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/persons
curl --request GET \
  --url https://api.eu1.prepr.io/persons
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/persons' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/persons")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/persons");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/persons"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "items": [
        {
            "id": "93fb1b38-9a85-4d6e-9639-8c4a8a88454a",
            "created_on": "2019-01-14T19:52:58+00:00",
            "changed_on": null,
            "label": "Publication",
            "slug": {
                "en-EN": "publication-model-two-21"
            },
            "publish_on": {
                "en-EN": "2019-01-11T13:24:34+00:00"
            },
            "status": {
                "en-EN": {
                    "id": "7f18224a-437b-4421-a7ce-6551d177c53e",
                    "created_on": "2018-12-24T09:09:25+00:00",
                    "changed_on": null,
                    "label": "Status",
                    "body": "Done"
                }
            }
        },
        {
					// ....
        }
    ],
    "total": 2,
    "after": "YWZ0ZXJfMjU=",
    "before": "YmVmb3JlXzA=",
    "skip": 0,
    "limit": 25
}
 

BETA ENDPOINT

Use version 5 for production environments: https://docs.prepr.io/v5/reference#persons

Sorting persons

created_on,
-created_on,
changed_on,
-changed_on,
last_seen,
-last_seen

{
	"sort" : "created_on"
}

Filtering persons

Here you will find everything you need to learn how the query Prepr.

Registration Date & Last seen

The date filter can be used with the operators eq, lt, lte, gt, gte, il and accepts UTC timestamps (except the il operator).

{
	"created_on" : [
		{
			"eq" : "2019-01-08T14:10:58+00:00",
			"lt" : "2019-01-08T14:10:58+00:00",
			"gt" : "2019-01-08T14:10:58+00:00",
      "il" : 3600
		}	
	],
	"last_seen" : [
		{
			"eq" : "2019-01-08T14:10:58+00:00",
			"lt" : "2019-01-08T14:10:58+00:00",
			"gt" : "2019-01-08T14:10:58+00:00",
      "il" : 3600
		}
	]
}

Scopes: persons.

Suggest Edits

About Users

 

A User is a back-end logged in account in Prepr. Users can create, update or be assigned to Publications.

get/users
curl --request GET \
  --url http://example.com/users
var request = require("request");

var options = { method: 'GET', url: 'http://example.com/users' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://example.com/users")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://example.com/users");

xhr.send(data);
import requests

url = "http://example.com/users"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Scopes: users.

Suggest Edits

/sessions/{id}

Sessions are created on a user log-in. The session is required to be passed to endpoints that need a user action to validate the request like creating an publication.

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/sessions/id
curl --request GET \
  --url https://api.eu1.prepr.io/sessions/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.eu1.prepr.io/sessions/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/sessions/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/sessions/id");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/sessions/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
	"id": "hnmgfJHKIAegpEOO5ngH7MhEmtpLFXrv4gfGHErnQXf7XMNcOKkfUmFqY1Lagk7R",
	"created_on": "2018-12-03T07:03:32+00:00",
	"changed_on": null,
	"label": "Session",
	"hash": "hnmgfJHKIAegpEOO5ngH7MhEmtpLFXrv4gfGHErnQXf7XMNcOKkfUmFqY1Lagk7R",
	"ttl": 1546542307,
	"ip_address": null
}

Path Params

id
string
required
 
 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttps://api.eu1.prepr.io/health
curl --request GET \
  --url https://api.eu1.prepr.io/health
var request = require("request");

var options = { method: 'GET', url: 'https://api.eu1.prepr.io/health' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.eu1.prepr.io/health")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.eu1.prepr.io/health");

xhr.send(data);
import requests

url = "https://api.eu1.prepr.io/health"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "message": "I'm okay buddy, fine and stable."
}
{
    "message": "Service Unavailable"
}
 

Returns 200 OK when all services are up.
Returns 503 Service Unavailable when down or has degraded performance.