The Blink Developer Community

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

Get Started    Guides
Suggest Edits

Get Config

Gets the config for an App.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.joinblink.com/v1/config
curl --request GET \
  --url https://api.joinblink.com/v1/config
var request = require("request");

var options = { method: 'GET', url: 'https://api.joinblink.com/v1/config' };

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

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

url = URI("https://api.joinblink.com/v1/config")

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.joinblink.com/v1/config");

xhr.send(data);
import requests

url = "https://api.joinblink.com/v1/config"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: [
    app_id: "b-123botabcd",
    app_identities: [
      // Array of AppIdentity objects
    ]
  ]
}
{
  "error": "An error description"
}
 

For further information about what apps and app Identities are please refer to the main Documentation

Suggest Edits

Get User

Get a user given a user ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.joinblink.com/v1/app-identity/app_identity_id/user/user_id
curl --request GET \
  --url https://api.joinblink.com/v1/app-identity/app_identity_id/user/user_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.joinblink.com/v1/app-identity/app_identity_id/user/user_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.joinblink.com/v1/app-identity/app_identity_id/user/user_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.joinblink.com/v1/app-identity/app_identity_id/user/user_id");

xhr.send(data);
import requests

url = "https://api.joinblink.com/v1/app-identity/app_identity_id/user/user_id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: {
    // User object
  }
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "FORBIDDEN",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

user_id
string
required

The id of the user being retrieved

 
Suggest Edits

Get Random User

Get a random user that is connected to an app identity. "Connected" means the user has the app in their launchpad, i.e. the app has been added to the launchpad from the discover page.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.joinblink.com/v1/app-identity/app_identity_id/random/user
curl --request GET \
  --url https://api.joinblink.com/v1/app-identity/app_identity_id/random/user
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.joinblink.com/v1/app-identity/app_identity_id/random/user' };

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

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

url = URI("https://api.joinblink.com/v1/app-identity/app_identity_id/random/user")

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.joinblink.com/v1/app-identity/app_identity_id/random/user");

xhr.send(data);
import requests

url = "https://api.joinblink.com/v1/app-identity/app_identity_id/random/user"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: {
    // User object
  }
}
{
  code: "XXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

 
Suggest Edits

Connect to Users

Sends a connection request to users.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.joinblink.com/v1/app-identity/app_identity_id/user
{
  "ids": [
    "u-123"
  ],
  "emails": [
  	"test@test.com"  
  ]
}
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: [
    // Array of User objects
  ]
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

 

At least one of the lists must be present

Will return successful connections only. Any requested users not in the response list were not connected.

Suggest Edits

Get Chat

Get details about a Chat.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id
curl --request GET \
  --url https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_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.joinblink.com/v1/app-identity/app_identity_id/chat/chat_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.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id");

xhr.send(data);
import requests

url = "https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: {
    // Chat object
  }
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

chat_id
string
required

The id of the chat that is being retrieved

 
Suggest Edits

Get Chat Recipients

Gets a list of chat participants including spaces.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/recipients
curl --request GET \
  --url https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/recipients
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/recipients' };

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

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

url = URI("https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/recipients")

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.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/recipients");

xhr.send(data);
import requests

url = "https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/recipients"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: {
    users: [
      "u-1234",
      "u-2345"
    ],
    app_identities: [
      "i-1234"
    ]
  }
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

chat_id
string
required

The id of the chat for which participants should be retrieved

 
Suggest Edits

Create Chat

Create a Chat.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.joinblink.com/v1/app-identity/app_identity_id/chat
// Chat object (no id)
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: {
    // Chat object
  }
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

Body Params

subject
string
required

name of the chat

description
string

short description of the chat

users
array of strings

list of user ids to add to the chat (users, app identities or both need to be provided)

app_identities
array of strings

list of app identitiy ids to add to the chat (users, app identities or both need to be provided)

 
Suggest Edits

Send Typing in Chat

Sends the indicator that this app identity "is typing" in a chat.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/typing
curl --request POST \
  --url https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/typing
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/typing' };

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

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

url = URI("https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/typing")

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.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/typing");

xhr.send(data);
import requests

url = "https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/typing"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

chat_id
string
required

Chat Id to send typing to

 

To make Bots feel more interactive, they can notify participants in the chat that they are working on a response. This is useful if the Bot is working on responding to a message that takes a while to process.

"My Bot is typing...." notifications timeout after 3 seconds of being received by Blink, so you may need to send more than one appropriately time spaced.

Suggest Edits

Send Message to Chat

Sends a message to a chat. Blink offers many types of messages that can be sent, check them out and use the one that best suit your app's use case.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/message
{
  "text": "hello world"
}
{
  "type": "card",
  "text": "Card preview",
  "content": {
    "pretext": null,
    "posttext": null,
    "cards": [
    ]
  },
  "quick_replies": [
    {
      "type": "button",
      "label": "Yes",
      "client_action": "blink://url",
      "reply_text": "Yes please!"
    },
    {
      "type": "button",
      "label": "No",
      "client_action": "blink://url",
      "reply_text": "Not now, thanks"
    }
  ]
}
{
  "type": "markdown",
  "text": "hello guys in bold",
  "content": {
  	"content": "**hello guys in bold**"
  }
}
A binary file was returned

You couldn't be authenticated

// Message object
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

chat_id
string
required

Chat Id to send the message to

 

For advanced message construction, such as Message Cards, read the Message object documentation.

Message Type
Description

text

Send a simple text message

card

Send a message containing one or more cards

markdown

Send a markdown message

Suggest Edits

Send Message to all

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.joinblink.com/v1/app-identity/app_identity_id/send-to-all
// Message object, chat_id parameter ignored
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: {
    successful_user_ids: [
  	  "u-123",
      "u-234"
    ]
  }
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

 

This endpoint will send a message in the private direct chats between your Bot and all connected contacts. It can be used for announcements.

Suggest Edits

Edit Message

Edit a message that was already sent.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://api.joinblink.com/v1/app-identity/app_identity_id/message/message_id
// Message object
A binary file was returned

You couldn't be authenticated

{
  code: "OK",
  message: "OK",
  data: {
    // Message object
  }
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

message_id
string
required

Message Id to edit

 

Can include plain text, hidden & card messages

Suggest Edits

Add Users to Chat

Add users to a group chat.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id/recipients
{
  users: [
    "u-123",
    "u-234"
   ],
  app_identities : [
    "i-1234"
  ]
}
A binary file was returned

You couldn't be authenticated

{
  "code": "CREATED",
  "message": "Created",
  "data": null,
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

chat_id
string
required

Chat Id to add users to

Body Params

users
array of strings

list of user ids to add to the chat (users, app identities or both need to be provided)

app_identities
array of strings

list of app identitiy ids to add to the chat (users, app identities or both need to be provided)

 
Suggest Edits

Leave Chat

Leave a group chat. Your app cannot rejoin the chat unless it is added again by the admin of a chat. Your app cannot leave a direct chat.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id
curl --request DELETE \
  --url https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_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.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id")

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

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", "https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id");

xhr.send(data);
import requests

url = "https://api.joinblink.com/v1/app-identity/app_identity_id/chat/chat_id"

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "code": "OK",
  "message": "OK",
  "data": null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}
{
  code: "XXXX",
  message: "An error description",
  data: null
}

Path Params

app_identity_id
string
required

App Identity ID to perform request as

chat_id
string
required

Chat Id to leave