Sendible API

Content

Create Topic

Open in API Explorer
POST /v2/topic.json

Save a topic within Content Suggestions.

Example Request

Format:
curl --request POST \
  --url 'https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_name=cats' \
  --header 'accept: application/json' \
  --header 'authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001'
require 'uri'
require 'net/http'

url = URI("https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_name=cats")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Basic QWxhZGRpbjpPcGVuU2VzYW1l'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.sendible.com",
  "port": null,
  "path": "/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_name=cats",
  "headers": {
    "accept": "application/json",
    "authorization": "Basic QWxhZGRpbjpPcGVuU2VzYW1l",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.sendible.com")

payload = ""

headers = {
    'accept': "application/json",
    'authorization': "Basic QWxhZGRpbjpPcGVuU2VzYW1l",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_name=cats", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_name=cats",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_name=cats"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Basic QWxhZGRpbjpPcGVuU2VzYW1l")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
application_id String Required

Your developer application id. This was provided to you via email.

4b634537cc392cca820b61dab08
topic_name String Required

A topic name.

cats

Responses

default Default

Unknown

(Empty Response)

Delete Topic

Open in API Explorer
DELETE /v2/topic.json

Delete a topic from Content Suggestions.

Example Request

Format:
curl --request DELETE \
  --url 'https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_id=1001' \
  --header 'accept: application/json' \
  --header 'authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l'
require 'uri'
require 'net/http'

url = URI("https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_id=1001")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Basic QWxhZGRpbjpPcGVuU2VzYW1l'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.sendible.com",
  "port": null,
  "path": "/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_id=1001",
  "headers": {
    "accept": "application/json",
    "authorization": "Basic QWxhZGRpbjpPcGVuU2VzYW1l"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.sendible.com")

headers = {
    'accept': "application/json",
    'authorization': "Basic QWxhZGRpbjpPcGVuU2VzYW1l"
    }

conn.request("DELETE", "/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_id=1001", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_id=1001",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.sendible.com/api/v2/topic.json?application_id=4b634537cc392cca820b61dab08&topic_id=1001"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Basic QWxhZGRpbjpPcGVuU2VzYW1l")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
application_id String Required

Your developer application id. This was provided to you via email.

4b634537cc392cca820b61dab08
topic_id Number Required

ID of the topic to delete.

1001

Responses

default Default

Unknown

(Empty Response)

Get Topics

Open in API Explorer
GET /v2/topics.json

Retrieve the list of topics a user has saved within Content Suggestions.

Example Request

Format:
curl --request GET \
  --url https://api.sendible.com/api/v2/topics.json \
  --header 'accept: application/json' \
  --header 'authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l'
require 'uri'
require 'net/http'

url = URI("https://api.sendible.com/api/v2/topics.json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Basic QWxhZGRpbjpPcGVuU2VzYW1l'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.sendible.com",
  "port": null,
  "path": "/api/v2/topics.json",
  "headers": {
    "accept": "application/json",
    "authorization": "Basic QWxhZGRpbjpPcGVuU2VzYW1l"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.sendible.com")

headers = {
    'accept': "application/json",
    'authorization': "Basic QWxhZGRpbjpPcGVuU2VzYW1l"
    }

conn.request("GET", "/api/v2/topics.json", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.sendible.com/api/v2/topics.json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.sendible.com/api/v2/topics.json"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Basic QWxhZGRpbjpPcGVuU2VzYW1l")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Responses

default Default

Unknown

(Empty Response)