Appio documentation

Install App Button

There are two functionally identical options for integrating Appio.

Option 1: Preview

Mobile APP

Install code

<script src="https://cdn.appio.so/v1/appio.js"></script>

<script>
  const appio = Appio("svc_00dddddd000000ccccccssssss")
  
  function mobileApp() {
    appio.open({
      user: "007:[email protected]"
    })
  }
</script>

<a href="#" onclick="mobileApp()">Mobile APP</a>
Appio("svc_**YOUR*SERVICE*ID**")
Use your service ID, which was assigned to you during registration.
Replace `svc_**YOUR*SERVICE*ID**` with your service id.
user
Your user identifier. Not iterable and unguessable.
For example, it can be composed of your customers' id and email.

Option 2: Preview

Mobile APP

Install code

<script src="https://cdn.appio.so/v1/appio.js"></script>

<a
  data-appio="on"
  data-service="svc_00dddddd000000ccccccssssss"
  data-user="007:[email protected]"
  href="#"
>
  Mobile APP
</a>
data-appio
Activates Appio. The value is optional and can be omitted.
data-service
Use your service ID, which was assigned to you during registration.
Replace `svc_**YOUR*SERVICE*ID**` with your service id.
data-user
Your user identifier. Not iterable and unguessable.
For example, it can be composed of your customers' id and email.

API Overview

All commands in this documentation are live and ready for testing.

NOTE:
Data is automatically reset every 15 minutes.
In effect, the "Appio Docs" service will disappear from your app.

Authentication

All API requests are authenticated using Bearer authentication header and providing an authentication token.
Each service has its own authentication token.

curl https://api.appio.so/hi -H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

API Services

Service

title
String, no length limit.
description
String, no length limit.
logo_url
Square image up to 1MB. Allowed formats: .gif, .jpg, .png, .webp
banner_url
Image ration 16/9, up to 3MB. Allowed formats: .gif, .jpg, .png, .webp

Get service details

Path

GET /v1/services/{id}

Request

curl -X GET https://api.appio.so/v1/services/svc_00dddddd000000ccccccssssss \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
{
    "id": "svc_00dddddd000000ccccccssssss",
    "title": "Appio Docs",
    "description": "Try out the functionality of Appio by downloading the app.",
    "logo_url": "https://cdn.appio.so/app/docs.appio.so/logo.png",
    "banner_url": "https://cdn.appio.so/app/docs.appio.so/banner.jpg"
}

Update service details.

Path

PATCH /v1/services/{id}

Request

curl -X PATCH https://api.appio.so/v1/services/svc_00dddddd000000ccccccssssss \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A" \
-H "Content-Type: application/json" \
-d '{"title":"New service title"}'

Response

HTTP Code: 200
{
    "id": "svc_00dddddd000000ccccccssssss"
}

API Devices

List of devices subscribed to service.

Path

GET /v1/devices

Request

curl -X GET https://api.appio.so/v1/devices \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
[
    {
        "id": "dvc_01jmpmh9fvxgyym44sqanjr9hs",
        "name": "iPhone 13",
        "platform": "ios",
        "os_version": "18.3",
        "model": "iPhone",
        "device_token": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
        "notifications_enabled": true
    },
    ...
]

View device details.

Path

GET /v1/devices/{id}

Request

curl -X GET https://api.appio.so/v1/devices/dvc_01jmpmh9fvxgyym44sqanjr9hs \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
{
    "id": "dvc_01jmpmh9fvxgyym44sqanjr9hs",
    "name": "iPhone 13",
    "platform": "ios",
    "os_version": "18.3",
    "model": "iPhone",
    "device_token": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "notifications_enabled": true
}

Deactivate device.

Path

DELETE /v1/devices/{id}

Request

curl -X DELETE https://api.appio.so/v1/devices/dvc_01jmpmh9fvxgyym44sqanjr9hs \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
{
    "id": "dvc_01jmpmh9fvxgyym44sqanjr9hs"
}

API Notifications

Notification payload

title
String, no length limit.
message
String, no length limit.
link
Optional. Valid URL.
image_url
Optional. Image ration 16/9, up to 3MB. Allowed formats: .gif, .jpg, .png, .webp

List of notifications, including sending status.

Path

GET /v1/notifications

Request

curl -X GET https://api.appio.so/v1/notifications \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
[
    {
        "id":"ntf_01jmpmgb6my0s57c960q1s862v",
        "service_id": "svc_00dddddd000000ccccccssssss",
        "payload": {
            "title": "Notification",
            "message": "Hello from Appio Docs",
            "link": "https://docs.appio.so",
            "image_url": "https://cdn.appio.so/app/docs.appio.so/banner.jpg"
        },
        "status": "completed",
        "delivery_stats": {
            "total": 1,
            "created": 0,
            "queued": 0,
            "delivered": 1,
            "failed": 0
        },
        ...
    ]
}

View notification details, including sending status.

Path

GET /v1/notifications/{id}

Request

curl -X GET https://api.appio.so/v1/notifications/ntf_01jmpmgb6my0s57c960q1s862v \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
{
    "id":"ntf_01jmpmgb6my0s57c960q1s862v",
    "service_id": "svc_00dddddd000000ccccccssssss",
    "payload": {
        "title": "Notification",
        "message": "Hello from Appio Docs",
        "link": "https://docs.appio.so",
        "image_url": "https://cdn.appio.so/app/docs.appio.so/banner.jpg"
    },
    "status": "completed",
    "delivery_stats": {
        "total": 1,
        "created": 0,
        "queued": 0,
        "delivered": 1,
        "failed": 0
    }
}

Queue a notification to be sent to all subscribed devices.

Path

POST /v1/notifications

Request

curl -X POST https://api.appio.so/v1/notifications \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A" \
-H "Content-Type: application/json" \
-d '{"payload":{"title":"Notification","message":"Hello from Appio Docs"}}'

Response

HTTP Code: 201
{
    "id":"ntf_01jmpmgb6my0s57c960q1s862v"
}

API Widgets

Widget

template
String reference to saved template.
source
data
Data source.
type
Type of data source.

Create a new widget.

Path

POST /v1/widgets

Request

curl -X POST https://api.appio.so/v1/widgets \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A" \
-H "Content-Type: application/json" \
-d '{"template":"number","source":{"data":"123","type":"static"}}'

Response

HTTP Code: 201
{
    "id":"wgt_01jmpr3vt1008txv1jehgdeny7"
}

View widget details.

Path

GET /v1/widgets/{id}

Request

curl -X GET https://api.appio.so/v1/widgets/wgt_01jmpr3vt1008txv1jehgdeny7 \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
{
    "id":"wgt_01jmpr3vt1008txv1jehgdeny7",
    "service_id": "svc_00dddddd000000ccccccssssss",
    "template": "number",
    "source": {
        "data": "123",
        "type": "static"
    }
}

View all widgets.

Path

GET /v1/widgets

Request

curl -X GET https://api.appio.so/v1/widgets \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
[
    {
        "id":"wgt_01jmpr3vt1008txv1jehgdeny7",
        "service_id": "svc_00dddddd000000ccccccssssss",
        "template": "number",
        "source": {
            "type": "static",
            "data": "123"
        }
    },
    ...
]

Update widgets details.

Path

PATCH /v1/widgets/{id}

Request

curl -X PATCH https://api.appio.so/v1/widgets/wgt_01jmpr3vt1008txv1jehgdeny7 \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A" \
-H "Content-Type: application/json" \
-d '{"template":"ring","source":{"data":"65","type":"static"}}'

Response

HTTP Code: 200
{
    "id":"wgt_01jmpr3vt1008txv1jehgdeny7"
}

Delete widget.

Path

DELETE /v1/widgets/{id}

Request

curl -X DELETE https://api.appio.so/v1/widgets/wgt_01jmpr3vt1008txv1jehgdeny7 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer docs_g3psUMsuKZ7NGGJvuk1csf47pvJfukz97cS5ZrOuHnY98yhY5A"

Response

HTTP Code: 200
{
    "id": "wgt_01jmpr3vt1008txv1jehgdeny7"
}

API Errors

400
Bad Request
The request contains invalid data or data is missing.
401
Unauthorized
The request requires user authentication.
403
Forbidden
The request does not have permission to perform the action.
404
Not Found
Requested entity doesn't exist.
409
Conflict
The request conflicts with existing data or a change.
500
Internal Error
Something went wrong with your request, and it was not processed.