StickQR Client REST API (v1)

Download OpenAPI specification:Download

OpenAPI specification for StickQR Platform.

UpdateChannel


The GraphQl query for this endpoint is:

mutation UpdateChannel($cid: uuid, $telegram_id: String) {
  update_telegram_channel(where: {id: {_eq: $cid}}, _set: {used: true, telegram_id: $telegram_id, connected_at: "now()"}) {
    affected_rows
  }
}
query Parameters
cid
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
telegram_id
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

cid
string or null (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
telegram_id
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "cid": "string",
  • "telegram_id": "string"
}

Response samples

Content type
application/json
{
  • "update_telegram_channel": {
    }
}

CheckUid


The GraphQl query for this endpoint is:

query CheckUid($uid: String) {
  telegram_channel(where: {unique_code: {_eq: $uid}, used: {_eq: false}}) {
    user
    id
  }
}
query Parameters
uid
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

uid
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "uid": "string"
}

Response samples

Content type
application/json
{
  • "telegram_channel": [
    ]
}

GetBrowserChannel


The GraphQl query for this endpoint is:

query GetBrowserChannel($is_app: Boolean = false) {
  browser_channel(where: {is_app: {_eq: $is_app}}) {
    browser
    active
    created_at
    device_id
    id
    os
    device_token
  }
}
query Parameters
is_app
boolean
Default: false
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

is_app
boolean or null (Boolean)
Default: false

Responses

Request samples

Content type
application/json
{
  • "is_app": false
}

Response samples

Content type
application/json
{
  • "browser_channel": [
    ]
}

GetUsersFirebaseToken


The GraphQl query for this endpoint is:

query GetUsersFirebaseToken($user: uuid) {
  browser_channel(limit: 10, where: {user: {_eq: $user}}) {
    device_token
  }
  android_channel(limit: 10, where: {user: {_eq: $user}}) {
    device_token
  }
}
query Parameters
user
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

user
string or null (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

Responses

Request samples

Content type
application/json
{
  • "user": "string"
}

Response samples

Content type
application/json
{
  • "android_channel": [
    ],
  • "browser_channel": [
    ]
}

RegisterAndroidChannel


The GraphQl query for this endpoint is:

mutation RegisterAndroidChannel($device_id: String, $device_name: String, $device_token: String, $os: String) {
  insert_android_channel_one(object: {device_id: $device_id, device_name: $device_name, device_token: $device_token, os: $os}) {
    id
  }
}
query Parameters
device_id
string
device_name
string
device_token
string
os
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

device_id
string or null (String)
device_name
string or null (String)
device_token
string or null (String)
os
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "device_id": "string",
  • "device_name": "string",
  • "device_token": "string",
  • "os": "string"
}

Response samples

Content type
application/json
{
  • "insert_android_channel_one": {
    }
}

UpdateQRCode


The GraphQl query for this endpoint is:

mutation UpdateQRCode($code: String) {
  update_qr_code(where: {integration_code: {_eq: $code}}, _set: {integration_code: $code}) {
    affected_rows
  }
}
query Parameters
code
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

code
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "update_qr_code": {
    }
}

UpdateQRCode


The GraphQl query for this endpoint is:

mutation UpdateQRCode($code: String) {
  update_qr_code(where: {integration_code: {_eq: $code}}, _set: {integration_code: $code}) {
    affected_rows
  }
}
query Parameters
code
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

code
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "update_qr_code": {
    }
}

DeleteAndroidChannel


The GraphQl query for this endpoint is:

mutation DeleteAndroidChannel($id: uuid!) {
  delete_android_channel_by_pk(id: $id) {
    id
  }
}
query Parameters
id
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

"id" is required (enter it either in parameters or request body)

header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

id
string (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "delete_android_channel_by_pk": {
    }
}

Get Current Profile

Get session profile*** The GraphQl query for this endpoint is:

query MyQuery {
  profile(limit: 1) {
    id
    name
    avatar
  }
}
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Responses

Response samples

Content type
application/json
{
  • "profile": [
    ]
}

CreateTelegramChannel


The GraphQl query for this endpoint is:

mutation CreateTelegramChannel($unique_code: String) {
  insert_telegram_channel_one(object: {unique_code: $unique_code}) {
    id
  }
}
query Parameters
unique_code
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

unique_code
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "unique_code": "string"
}

Response samples

Content type
application/json
{
  • "insert_telegram_channel_one": {
    }
}

GetAndroidChannels


The GraphQl query for this endpoint is:

query GetAndroidChannels {
  android_channel {
    active
    created_at
    device_id
    device_name
    device_token
    id
    os
    updated_at
    user
  }
}
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Responses

Response samples

Content type
application/json
{
  • "android_channel": [
    ]
}

GetQRCodeAvailibility


The GraphQl query for this endpoint is:

query GetQRCodeAvailibility($code: String) {
  qr_code(limit: 1, where: {integration_code: {_eq: $code}, used_by: {_is_null: true}}) {
    id
  }
}
query Parameters
code
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

code
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "qr_code": [
    ]
}

insertNewQR


The GraphQl query for this endpoint is:

mutation insertNewQR($slug: String!, $integration_code: String!) {
  insert_qr_code(objects: {slug: $slug, integration_code: $integration_code}) {
    affected_rows
    returning {
      id
      integration_code
      slug
      created_at
    }
  }
}
query Parameters
integration_code
string

"integration_code" is required (enter it either in parameters or request body)

slug
string

"slug" is required (enter it either in parameters or request body)

header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

integration_code
string (String)
slug
string (String)

Responses

Request samples

Content type
application/json
{
  • "integration_code": "string",
  • "slug": "string"
}

Response samples

Content type
application/json
{
  • "insert_qr_code": {
    }
}

GetAllMessages


The GraphQl query for this endpoint is:

query GetAllMessages($offset: Int = 0) {
  notification_message(limit: 10, offset: $offset, order_by: {created_at: desc}) {
    created_at
    from
    from_user {
      profile {
        name
        avatar
      }
      id
    }
    id
    message
    object_id
    to
    object {
      id
      type
      title
    }
  }
}
query Parameters
offset
integer
Default: 0
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

offset
integer or null (Int)
Default: 0

Responses

Request samples

Content type
application/json
{
  • "offset": 0
}

Response samples

Content type
application/json
{
  • "notification_message": [
    ]
}

UpdateQRCodeStatus


The GraphQl query for this endpoint is:

mutation UpdateQRCodeStatus($object_id: uuid!, $qr_id: uuid!) {
  update_object_by_pk(pk_columns: {id: $object_id}, _set: {qr_id: $qr_id}) {
    id
  }
  update_qr_code_by_pk(pk_columns: {id: $qr_id}, _set: {used_by: $object_id}) {
    id
  }
}
query Parameters
object_id
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

"object_id" is required (enter it either in parameters or request body)

qr_id
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

"qr_id" is required (enter it either in parameters or request body)

header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

object_id
string (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
qr_id
string (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

Responses

Request samples

Content type
application/json
{
  • "object_id": "string",
  • "qr_id": "string"
}

Response samples

Content type
application/json
{
  • "update_object_by_pk": {
    },
  • "update_qr_code_by_pk": {
    }
}

UpdateObject


The GraphQl query for this endpoint is:

mutation UpdateObject($id: uuid, $active: Boolean, $custom_message: Boolean, $messages: [String!], $show_owner: Boolean, $sub_title: String, $title: String, $type: String) {
  update_object(where: {id: {_eq: $id}}, _set: {active: $active, custom_message: $custom_message, messages: $messages, show_owner: $show_owner, sub_title: $sub_title, title: $title, type: $type}) {
    affected_rows
  }
}
query Parameters
active
boolean
custom_message
boolean
id
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
show_owner
boolean
sub_title
string
title
string
type
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

active
boolean or null (Boolean)
custom_message
boolean or null (Boolean)
id
string or null (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
messages
Array of strings or null (String)
show_owner
boolean or null (Boolean)
sub_title
string or null (String)
title
string or null (String)
type
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "custom_message": true,
  • "id": "string",
  • "messages": [
    ],
  • "show_owner": true,
  • "sub_title": "string",
  • "title": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "update_object": {
    }
}

channel


The GraphQl query for this endpoint is:

query channel {
  channel(order_by: {active: desc}) {
    active
    created_at
    description
    id
    name
    updated_at
  }
}
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Responses

Response samples

Content type
application/json
{
  • "channel": [
    ]
}

GetMessagesByObjectId


The GraphQl query for this endpoint is:

query GetMessagesByObjectId($offset: Int = 0, $objectId: uuid) {
  notification_message(limit: 10, offset: $offset, order_by: {created_at: desc}, where: {object_id: {_eq: $objectId}}) {
    created_at
    from
    from_user {
      profile {
        name
        avatar
      }
      id
    }
    id
    message
    object_id
    to
    object {
      id
      type
      title
    }
  }
}
query Parameters
objectId
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
offset
integer
Default: 0
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

objectId
string or null (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
offset
integer or null (Int)
Default: 0

Responses

Request samples

Content type
application/json
{
  • "objectId": "string",
  • "offset": 0
}

Response samples

Content type
application/json
{
  • "notification_message": [
    ]
}

GetObjectDetail


The GraphQl query for this endpoint is:

query GetObjectDetail($oId: uuid) {
  object(limit: 1, where: {id: {_eq: $oId}}) {
    active
    anonymous
    created_at
    custom_message
    id
    image
    last_message
    messages
    qr_code {
      slug
      id
    }
    show_owner
    sub_title
    title
    type
    updated_at
  }
}
query Parameters
oId
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

oId
string or null (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

Responses

Request samples

Content type
application/json
{
  • "oId": "string"
}

Response samples

Content type
application/json
{
  • "object": [
    ]
}

InsertObjectOne


The GraphQl query for this endpoint is:

mutation InsertObjectOne($active: Boolean, $custom_message: Boolean, $messages: [String!], $show_owner: Boolean, $sub_title: String, $title: String, $type: String) {
  insert_object_one(object: {active: $active, custom_message: $custom_message, messages: $messages, show_owner: $show_owner, sub_title: $sub_title, title: $title, type: $type}) {
    id
  }
}
query Parameters
active
boolean
custom_message
boolean
show_owner
boolean
sub_title
string
title
string
type
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

active
boolean or null (Boolean)
custom_message
boolean or null (Boolean)
messages
Array of strings or null (String)
show_owner
boolean or null (Boolean)
sub_title
string or null (String)
title
string or null (String)
type
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "custom_message": true,
  • "messages": [
    ],
  • "show_owner": true,
  • "sub_title": "string",
  • "title": "string",
  • "type": "string"
}

Response samples

Content type
application/json
{
  • "insert_object_one": {
    }
}

UpdateAndroidToken


The GraphQl query for this endpoint is:

mutation UpdateAndroidToken($deviceId: String, $device_token: String) {
  update_android_channel(where: {device_id: {_eq: $deviceId}}, _set: {device_token: $device_token}) {
    affected_rows
  }
}
query Parameters
deviceId
string
device_token
string
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

deviceId
string or null (String)
device_token
string or null (String)

Responses

Request samples

Content type
application/json
{
  • "deviceId": "string",
  • "device_token": "string"
}

Response samples

Content type
application/json
{
  • "update_android_channel": {
    }
}

DeleteBrowserChannel


The GraphQl query for this endpoint is:

mutation DeleteBrowserChannel($id: uuid = "") {
  delete_browser_channel_by_pk(id: $id) {
    id
  }
}
query Parameters
id
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
Default: ""
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

id
string or null (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
Default: ""

Responses

Request samples

Content type
application/json
{
  • "id": ""
}

Response samples

Content type
application/json
{
  • "delete_browser_channel_by_pk": {
    }
}

object


The GraphQl query for this endpoint is:

query object {
  object(order_by: {active: desc}) {
    active
    created_at
    id
    last_message
    title
    type
    updated_at
    qr_id
  }
}
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Responses

Response samples

Content type
application/json
{
  • "object": [
    ]
}

DeleteTelegramChannel


The GraphQl query for this endpoint is:

mutation DeleteTelegramChannel($id: uuid!) {
  delete_telegram_channel_by_pk(id: $id) {
    id
  }
}
query Parameters
id
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

"id" is required (enter it either in parameters or request body)

header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

id
string (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{
  • "delete_telegram_channel_by_pk": {
    }
}

RequestDeleteAccount


The GraphQl query for this endpoint is:

mutation RequestDeleteAccount($user: uuid) {
  update_user(where: {id: {_eq: $user}}, _set: {status: "REQUEST_DELETE"}) {
    affected_rows
  }
}
query Parameters
user
string[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Request Body schema: application/json
optional

Query parameters can also be provided in the request body as a JSON object

user
string or null (uuid) [a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB]...

Responses

Request samples

Content type
application/json
{
  • "user": "string"
}

Response samples

Content type
application/json
{
  • "update_user": {
    }
}

GetTelegramChannelMobile


The GraphQl query for this endpoint is:

query GetTelegramChannel {
  telegram_channel {
    active
    connected_at
    created_at
    id
    telegram_id
    unique_code
    updated_at
    used
    user
  }
}
header Parameters
Authorization
string

Your Bearer Token, will be used for authentication of the API request.

Responses

Response samples

Content type
application/json
{
  • "telegram_channel": [
    ]
}