MENU navbar-image

Auto-fills Authorization header

Introduction

Programmatic access to your apps, builds, and push notifications.

This API allows you to programmatically manage your apps, trigger builds, and send push notifications.

Authentication

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Get your API token from the API Keys page in your dashboard.

Account

APIs for retrieving account information, subscription details, and usage statistics.

Get account information

Requires Authentication

Retrieve the authenticated user's account details including name, email, and plan information.

Example request:
curl --request GET \
    --get "/api/v1/account" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/account"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/account';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "john@example.com",
        "plan": {
            "id": 1,
            "name": "Pro"
        },
        "build_credits": 50,
        "created_at": "2024-01-01T00:00:00.000000Z"
    }
}
 

Request      

GET api/v1/account

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get subscription information

Requires Authentication

Retrieve the authenticated user's current subscription details including plan, status, and renewal date.

Example request:
curl --request GET \
    --get "/api/v1/account/subscription" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/account/subscription"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/account/subscription';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Active subscription):


{
    "data": {
        "id": 1,
        "status": "active",
        "amount": 29.99,
        "payment_method": "stripe",
        "plan": {
            "id": 2,
            "name": "Pro",
            "price": 29.99
        },
        "renewal_at": "2024-02-01T00:00:00.000000Z"
    }
}
 

Example response (200, No subscription):


{
    "message": "No active subscription found.",
    "plan": {
        "id": 1,
        "name": "Free",
        "price": 0
    }
}
 

Request      

GET api/v1/account/subscription

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get usage statistics

Requires Authentication

Retrieve the authenticated user's usage statistics including build credits, app counts, and build history.

Example request:
curl --request GET \
    --get "/api/v1/account/usage" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/account/usage"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/account/usage';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "build_credits": {
        "available": 45,
        "monthly_allocation": 100,
        "unlimited": false
    },
    "apps": {
        "total": 5
    },
    "builds": {
        "total": 23,
        "completed": 20,
        "failed": 3
    },
    "plan": {
        "id": 2,
        "name": "Pro",
        "features": [
            "Unlimited apps",
            "Priority support"
        ]
    }
}
 

Request      

GET api/v1/account/usage

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Apps

APIs for managing your mobile applications.

List all apps

Requires Authentication

Get a paginated list of all apps belonging to the authenticated user.

Example request:
curl --request GET \
    --get "/api/v1/apps?per_page=10" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/apps"
);

const params = {
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": [
        {
            "id": 1,
            "name": "My App",
            "platform": "android-webview",
            "version_name": "1.0.0",
            "version_code": 1
        }
    ],
    "meta": {
        "current_page": 1,
        "total": 5
    }
}
 

Request      

GET api/v1/apps

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

per_page   integer  optional    

Number of items per page. Default: 15. Example: 10

Create a new app

Requires Authentication

Create a new app for the authenticated user.

Example request:
curl --request POST \
    "/api/v1/apps" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My App\",
    \"platform\": \"android-webview\",
    \"url\": \"https:\\/\\/example.com\",
    \"package_name\": \"com.example.myapp\",
    \"version_name\": \"1.0.0\",
    \"version_code\": 1
}"
const url = new URL(
    "/api/v1/apps"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "My App",
    "platform": "android-webview",
    "url": "https:\/\/example.com",
    "package_name": "com.example.myapp",
    "version_name": "1.0.0",
    "version_code": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'My App',
            'platform' => 'android-webview',
            'url' => 'https://example.com',
            'package_name' => 'com.example.myapp',
            'version_name' => '1.0.0',
            'version_code' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Success):


{
    "data": {
        "id": 1,
        "name": "My App",
        "platform": "android-webview",
        "version_name": "1.0.0",
        "version_code": 1,
        "url": "https://example.com",
        "package_name": "com.example.myapp"
    }
}
 

Example response (422, Validation Error):


{
    "message": "The name field is required.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
 

Request      

POST api/v1/apps

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The name of the app. Example: My App

platform   string     

The platform slug (e.g., android-webview). Example: android-webview

url   string     

The website URL for the app. Example: https://example.com

package_name   string     

The package name (e.g., com.example.app). Example: com.example.myapp

version_name   string  optional    

The initial version name. Default: 1.0.0. Example: 1.0.0

version_code   integer  optional    

The initial version code. Default: 1. Example: 1

Get app details

Requires Authentication

Get details for a specific app including recent builds.

Example request:
curl --request GET \
    --get "/api/v1/apps/2" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/apps/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps/2';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": {
        "id": 1,
        "name": "My App",
        "platform": "android-webview",
        "version_name": "1.0.0",
        "version_code": 1,
        "builds": []
    }
}
 

Example response (404, Not Found):


{
    "message": "App not found."
}
 

Request      

GET api/v1/apps/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the app. Example: 2

Update an app

Requires Authentication

Update an existing app's details and configuration.

Example request:
curl --request PUT \
    "/api/v1/apps/2" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Updated App Name\",
    \"url\": \"https:\\/\\/newsite.com\",
    \"package_name\": \"com.example.newapp\",
    \"version_name\": \"1.0.1\",
    \"version_code\": 2
}"
const url = new URL(
    "/api/v1/apps/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Updated App Name",
    "url": "https:\/\/newsite.com",
    "package_name": "com.example.newapp",
    "version_name": "1.0.1",
    "version_code": 2
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps/2';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Updated App Name',
            'url' => 'https://newsite.com',
            'package_name' => 'com.example.newapp',
            'version_name' => '1.0.1',
            'version_code' => 2,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": {
        "id": 1,
        "name": "Updated App Name",
        "platform": "android-webview",
        "version_name": "1.0.1",
        "version_code": 2
    }
}
 

Example response (404, Not Found):


{
    "message": "App not found."
}
 

Request      

PUT api/v1/apps/{id}

PATCH api/v1/apps/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the app. Example: 2

Body Parameters

name   string  optional    

The app name. Example: Updated App Name

url   string  optional    

The website URL. Example: https://newsite.com

package_name   string  optional    

The package name. Example: com.example.newapp

version_name   string  optional    

The version name. Example: 1.0.1

version_code   integer  optional    

The version code. Example: 2

Delete an app

Requires Authentication

Delete an app and all its associated data including builds and configurations.

Example request:
curl --request DELETE \
    "/api/v1/apps/2" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/apps/2"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps/2';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "message": "App deleted successfully."
}
 

Example response (404, Not Found):


{
    "message": "App not found."
}
 

Example response (409, Has Active Builds):


{
    "message": "Cannot delete app with active builds.",
    "error": "active_builds"
}
 

Request      

DELETE api/v1/apps/{id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the app. Example: 2

Builds

APIs for managing app builds. Trigger new builds, check status, and download artifacts.

List builds for an app

Requires Authentication

Get a paginated list of builds for a specific app.

Example request:
curl --request GET \
    --get "/api/v1/apps/2/builds?per_page=10" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/apps/2/builds"
);

const params = {
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps/2/builds';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": [
        {
            "id": 1,
            "status": "completed",
            "build_type": "debug",
            "build_format": "apk",
            "version_name": "1.0.0",
            "version_code": 1,
            "created_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "meta": {
        "current_page": 1,
        "total": 5
    }
}
 

Request      

GET api/v1/apps/{app_id}/builds

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

app_id   integer     

The ID of the app. Example: 2

Query Parameters

per_page   integer  optional    

Number of items per page. Default: 15. Example: 10

Trigger a new build

Requires Authentication

Trigger a new build for a specific app. Requires available build credits.

Example request:
curl --request POST \
    "/api/v1/apps/2/builds" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"build_format\": \"apk\",
    \"build_type\": \"debug\",
    \"keystore_id\": 1
}"
const url = new URL(
    "/api/v1/apps/2/builds"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "build_format": "apk",
    "build_type": "debug",
    "keystore_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps/2/builds';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'build_format' => 'apk',
            'build_type' => 'debug',
            'keystore_id' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Success):


{
    "data": {
        "id": 1,
        "status": "pending",
        "build_type": "debug",
        "build_format": "apk",
        "version_name": "1.0.1",
        "version_code": 2
    }
}
 

Example response (402, Insufficient Credits):


{
    "message": "Insufficient build credits.",
    "error": "insufficient_credits",
    "required_credits": 1,
    "available_credits": 0
}
 

Example response (409, Active Build):


{
    "message": "App already has an active build in progress.",
    "error": "active_build"
}
 

Example response (503, No Builders Available):


{
    "message": "No builders available. Please try again later.",
    "error": "no_builders"
}
 

Request      

POST api/v1/apps/{app_id}/builds

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

app_id   integer     

The ID of the app. Example: 2

Body Parameters

build_format   string  optional    

The build format: apk or aab. Default: apk. Example: apk

build_type   string  optional    

The build type: debug or release. Default: debug. Example: debug

keystore_id   integer  optional    

The keystore ID for release builds. Example: 1

Get build details

Requires Authentication

Get details for a specific build including status and logs.

Example request:
curl --request GET \
    --get "/api/v1/builds/1" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/builds/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/builds/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": {
        "id": 1,
        "status": "completed",
        "build_type": "debug",
        "build_format": "apk",
        "version_name": "1.0.0",
        "version_code": 1,
        "artifact_size": 15000000,
        "build_duration": 120,
        "created_at": "2024-01-01T00:00:00.000000Z",
        "completed_at": "2024-01-01T00:02:00.000000Z"
    }
}
 

Example response (404, Not Found):


{
    "message": "Build not found."
}
 

Request      

GET api/v1/builds/{build_id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

build_id   integer     

The ID of the build. Example: 1

Download build artifact

Requires Authentication

Get the download URL for a completed build artifact.

Example request:
curl --request GET \
    --get "/api/v1/builds/1/download" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/builds/1/download"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/builds/1/download';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "download_url": "https://example.com/builds/app.apk?token=abc123",
    "file_name": "My App.apk",
    "file_size": 15000000,
    "expires_at": "2024-01-08T00:00:00+00:00"
}
 

Example response (400, Build Not Completed):


{
    "message": "Build is not completed yet.",
    "error": "build_not_completed",
    "status": "building"
}
 

Example response (404, Artifact Not Found):


{
    "message": "Build artifact not available.",
    "error": "artifact_not_found"
}
 

Request      

GET api/v1/builds/{build_id}/download

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

build_id   integer     

The ID of the build. Example: 1

Get build logs

Requires Authentication

Get the build logs for a specific build. Useful for debugging failed builds.

Example request:
curl --request GET \
    --get "/api/v1/builds/1/logs" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/builds/1/logs"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/builds/1/logs';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "build_id": 1,
    "status": "completed",
    "logs": "Build started...\nCompiling...\nBuild completed successfully.",
    "error_message": null
}
 

Example response (200, Failed Build):


{
    "build_id": 2,
    "status": "failed",
    "logs": "Build started...\nCompiling...",
    "error_message": "Compilation failed: missing dependency"
}
 

Request      

GET api/v1/builds/{build_id}/logs

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

build_id   integer     

The ID of the build. Example: 1

Notifications

APIs for sending and managing push notifications to your app users.

List notifications for an app

Requires Authentication

Get a paginated list of push notifications sent to a specific app.

Example request:
curl --request GET \
    --get "/api/v1/apps/2/notifications?per_page=10" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/apps/2/notifications"
);

const params = {
    "per_page": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps/2/notifications';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'per_page' => '10',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": [
        {
            "id": 1,
            "title": "Welcome!",
            "body": "Thanks for installing our app.",
            "status": "sent",
            "sent_at": "2024-01-01T00:00:00.000000Z"
        }
    ],
    "meta": {
        "current_page": 1,
        "total": 10
    }
}
 

Request      

GET api/v1/apps/{app_id}/notifications

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

app_id   integer     

The ID of the app. Example: 2

Query Parameters

per_page   integer  optional    

Number of items per page. Default: 15. Example: 10

Send a push notification

Requires Authentication

Send a push notification to all users of a specific app. Requires push notifications to be configured.

Example request:
curl --request POST \
    "/api/v1/apps/2/notifications" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"New Update Available\",
    \"body\": \"Check out our latest features!\",
    \"image_url\": \"https:\\/\\/example.com\\/image.png\",
    \"scheduled_at\": \"2024-01-15T10:00:00Z\"
}"
const url = new URL(
    "/api/v1/apps/2/notifications"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "New Update Available",
    "body": "Check out our latest features!",
    "image_url": "https:\/\/example.com\/image.png",
    "scheduled_at": "2024-01-15T10:00:00Z"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/apps/2/notifications';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'New Update Available',
            'body' => 'Check out our latest features!',
            'image_url' => 'https://example.com/image.png',
            'scheduled_at' => '2024-01-15T10:00:00Z',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201, Success):


{
    "data": {
        "id": 1,
        "title": "New Update Available",
        "body": "Check out our latest features!",
        "status": "pending",
        "created_at": "2024-01-01T00:00:00.000000Z"
    }
}
 

Example response (400, Notifications Not Configured):


{
    "message": "Push notifications are not configured for this app.",
    "error": "notifications_not_configured"
}
 

Request      

POST api/v1/apps/{app_id}/notifications

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

app_id   integer     

The ID of the app. Example: 2

Body Parameters

title   string     

The notification title. Example: New Update Available

body   string     

The notification body/message. Example: Check out our latest features!

image_url   string  optional    

URL to an image to include in the notification. Example: https://example.com/image.png

scheduled_at   string  optional    

Schedule the notification for a future time (ISO 8601 format). Example: 2024-01-15T10:00:00Z

Get notification details

Requires Authentication

Get details for a specific notification including status and delivery information.

Example request:
curl --request GET \
    --get "/api/v1/notifications/16" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/notifications/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/notifications/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "data": {
        "id": 1,
        "title": "Welcome!",
        "body": "Thanks for installing our app.",
        "status": "sent",
        "sent_at": "2024-01-01T00:00:00.000000Z",
        "created_at": "2024-01-01T00:00:00.000000Z"
    }
}
 

Example response (404, Not Found):


{
    "message": "Notification not found."
}
 

Request      

GET api/v1/notifications/{notification_id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

notification_id   integer     

The ID of the notification. Example: 16

Cancel a scheduled notification

Requires Authentication

Cancel a notification that has not been sent yet. Only works for pending or scheduled notifications.

Example request:
curl --request DELETE \
    "/api/v1/notifications/16" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "/api/v1/notifications/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '/api/v1/notifications/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, Success):


{
    "message": "Notification cancelled successfully."
}
 

Example response (400, Already Sent):


{
    "message": "Cannot cancel a notification that has already been sent.",
    "error": "already_sent",
    "status": "sent"
}
 

Example response (404, Not Found):


{
    "message": "Notification not found."
}
 

Request      

DELETE api/v1/notifications/{notification_id}

Headers

Authorization        

Example: Bearer {YOUR_API_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

notification_id   integer     

The ID of the notification. Example: 16