Pushed API

The API lets you interact with Pushed from anything that can send an HTTP request. There are many things you can do with the API. For example:

  • Send notifications to all your subscribers
  • Schedule notifications to some of your subscribers
  • Subscribe users to your applications and channels
  • Fetch your notifications analytics
  • And much more!

Schema

All API access is over HTTPS, and accessed from the api.pushed.co domain. The relative path prefix /1/ indicates that we are currently using version 1 of the API.

Current endpoint is https://api.pushed.co/1.

Request content type must be application/x-www-form-urlencoded and Pushed response comes as application/json.

Response Format

The response format for all requests is a JSON object.

Whether a request succeeded is indicated by the HTTP status code. A 2xx status code indicates success, whereas a 4xx status code indicates failure.

For example, trying to verify an authorization code that is valid will return the message:

{
  "response": {
      "type": "auth_code_valid",
      "message": "Authorization Code is valid."
   }
}

Client Errors

When a request fails, the response body is still JSON, but always contains the fields code and error which you can inspect to use for debugging.

For example, trying to verify an authorization code that is invalid will return the message:

{
  "error": {
      "type": "auth_code_invalid",
      "message": "Authorization Code is not valid."
    }
}

Timezones

Pushed timezone is set to UTC, so all dates will be offered in this timezone.

Credentials

There are three credentials methods to use the API. Depending on what you want to accomplish, you will need to add to your request the required credentials.

Target Based Credential: Using your Pushed app/channel credentials (app_key, app_secret & target_alias).

Pushed Api-Key Based: Using your Pushed account api_key.

OAuth-Credentials Based: Using the access_token genereated in the OAuth process.

No Credential Required: Some API calls does not require any credentials.

Which one to use? We know this could be a little tedious but security is a huge concern and that's the best way to ensure your account data and privacy. For each of the methods of the API you will se a badge of what credentials are required.

Quick Reference Available Methods

Sending Notifications

Endpoint Functionality
https://api.pushed.co/1/push Send Push Message

Authorization

Endpoint Functionality
https://api.pushed.co/1/oauth Request an Access Token
https://api.pushed.co/1/oauth/new Request an Authorization Code with an Access Token
https://api.pushed.co/1/oauth/verify Verify an Authorization Code
https://api.pushed.co/1/oauth Delete an Authorization Code

Subscription Management

Endpoint Functionality
https://api.pushed.co/1/subscriptions Get user subscriptions
https://api.pushed.co/1/subscription Subscribe user to an app or channel
https://api.pushed.co/1/subscription Delete a user subscription
https://api.pushed.co/1/subscription/invite Invite a user to subscribe to an app or channel

Applications Management

Endpoint Functionality
https://api.pushed.co/1/app List all applications
https://api.pushed.co/1/app Create new application
https://api.pushed.co/1/app Edit an application
https://api.pushed.co/1/app Delete an application
https://api.pushed.co/1/app/subscriptions List all application's subscriptions
https://api.pushed.co/1/app/subscription Get application subscription

Channels Management

Endpoint Functionality
https://api.pushed.co/1/channel List all channels
https://api.pushed.co/1/channel Create new channel
https://api.pushed.co/1/channel Edit a channel
https://api.pushed.co/1/channel Delete a channel
https://api.pushed.co/1/channel/subscriptions List all channel subscriptions
https://api.pushed.co/1/channel/subscription Get channel subscription

Account Management

Endpoint Functionality
https://api.pushed.co/1/account Programatically creates a new user account end subscribes it to a certain app or channel

Analytics

Endpoint Functionality
https://api.pushed.co/1/analytics Hooks for retrieving multiple stats

Sending Notifications

https://api.pushed.co/1/push

This method allows Pushed applications to send notifications programatically. There are four options to reach Pushed users (we called it targets): app, channel, user or pushed identifier. Depending on your needs you will have to provide specific parameter to the push call.

Parameter Name Type Required Description
app_key string Yes Your application key. You can find your app_key on the settings section of your application inside the developer portal.
app_secret string Yes Your application secret. You can find your app_secret on the settings section of your application inside the developer portal.
content string Yes The content of the notification. Max length is 140 characters. If your content is larger than 140 characters the API will return an error: message_is_too_large.
content_type string Optional The content type of the notification. Currently there's only one option available: url. If this parameter is specified then special behaviour is applied to notification in order to show it properly.
content_extra string Optional The extra content of the notification. Depending on content_type parameter should be filled with relevant data.
target_type string Yes The type of the destination. Allowed options: app, channel, user, pushed_id, subscription_alias or email.
target_alias string Optional Only required when target_type != app. Depending on the target_type the target_alias must include different information.
access_token string Optional Only required when target_type = user. You can obtain this value when your application requests OAuth access.
pushed_id string Optional Only required when target_type = pushed_id. The Pushed Identifier string of the user.
email string Optional Only required when target_type = email. This is the email the user used to register in Pushed. It must be subscribed to your app or channel.

Sending a notification to a Pushed App

Here's an example of the most common request to send a notification using our API. In this case we send a notification to everyone subscribed to the app we specify in the target_alias parameter. Be aware that depending on your app settings, you will need different parameters.

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "target_type=your_target_type" \
  --form-string "content=Your notification content." \
  https://api.pushed.co/1/push

Sending a notification to a Pushed Channel

This example illustrates how to send a notification to a Pushed channel. As you might have pointed out, the only difference from a regular app notification request is that we add the parameter target_type to channel to specify the channel.

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "target_type=channel" \
  --form-string "target_alias=your_app_or_channel_alias" \
  --form-string "content=Your notification content." \
  https://api.pushed.co/1/push

Sending a notification with a URL (link to a website)

Sometimes it's useful to attach a URL into a notification. This URL will be attached to the notification and the user will be able to open the link within the Pushed app.

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "target_type=your_target_type" \
  --form-string "content=Your notification content." \
  --form-string "content_type=url" \
  --form-string "content_extra=https://pushed.co" \
  https://api.pushed.co/1/push

Targets

Depending on which target you want to reach for your notifications, you will have to specify the target_type parameter. This option allows you to send a notification to everyone subscribed to your channel, or specific users. These are the available target types:

Target Name Description
app Send a notification to all subscribers of an app.
channel Send a notification to all subscribers of a channel.
user Send a notification to an specific user specifying user alias. (OAuth required)
pushed_id Send a notification to an specific user specifying Pushed ID.
email Send a notification to an specific user using its email (registered in Pushed).

Sending a notification to specific users

If you need to send a notification to a certain user, you have several options: using the subscription alias, email, PushedID or the OAuth token. Below you can find multiple examples of sending a push message using user-based targets.

Sending a notification to an specific user using email

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "target_type=email" \
  --form-string "email=john@doe.com" \
  --form-string "content=Your notification content." \
  https://api.pushed.co/1/push
And another example of sending a push message using email using our API to a Channel:

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "target_type=email" \
  --form-string "target_alias=your_app_or_channel_alias" \
  --form-string "email=john@doe.com" \
  --form-string "content=Your notification content." \
  https://api.pushed.co/1/push

Sending a notification to an specific user using PushedID

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "target_type=pushed_id" \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "content=Your notification content." \
  https://api.pushed.co/1/push

Sending a notification to an specific user using OAuth Protocol

If you need to send a notification to a certain user, you can get user permissions by setting up Pushed OAuth Protocol in your system. Once the user has established connection with Pushed and granted your app access you will receive an access_token. You can use this access_token to send notifications without the need to add further parameters. Very Important: Only apps can use access_token, channels are not allowed to use target_type = user.

Below you can find an example of sending a push message using the OAuth Token using our API:

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "access_token=access_token_code_given_by_pushed" \
  --form-string "target_type=user" \
  --form-string "target_alias=your_channel_alias" \
  --form-string "content=Your notification content." \
  https://api.pushed.co/1/push

Sending a notification to an specific user using subscription alias

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "target_type=subscription_alias" \
  --form-string "content=Your notification content." \
  --form-string "subscription_alias=alias_of_the_subscription" \
  https://api.pushed.co/1/push

Sending a notification to an specific user using subscription alias (with OAuth access token)

curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "access_token=access_token_code_given_by_pushed" \
  --form-string "target_type=subscription_alias" \
  --form-string "subscription_alias=alias_of_the_subscription" \
  --form-string "content=Your notification content." \
  https://api.pushed.co/1/push
 

Authorization

oauth https://api.pushed.co/1/oauth

This method allows you to create the page where the user can authorize your Pushed app to access several information on their account. Remember that users can revoke permisions at any time.

Parameter Name Type Required Description
client_id string Yes Your application key. You can find your app_key on the settings section of your application inside the developer portal.
redirect_uri string Yes The URL Pushed will use to callback with the authorization details response.

oauth/access_token https://api.pushed.co/1/oauth/access_token

This method is used to exchange the code provided in https://api.pushed.co/1/oauth an access token. You should store the given access_token in your system so you can send interact with Pushed API methods at any time.

Parameter Name Type Required Description
code string Yes The code provided by https://api.pushed.co/1/oauth.

oauth/verify https://api.pushed.co/1/oauth/verify

This method allows you to check if an access_token is valid. This method shoudl be used to check permissions in case you are having issues with the access_token. Remember that users can revoke permisions at any time.

Parameter Name Type Required Description
access_token string Yes The access_token provided in https://api.pushed.co/1/oauth/access_token.

oauth https://api.pushed.co/1/oauth

Remove a previous access_token.

Parameter Name Type Required Description
access_token string Yes The access_token you want to delete provided in https://api.pushed.co/1/oauth/access_token.
 

Subscription Management

# subscriptions https://api.pushed.co/1/subscriptions

This method allows you to list all subscriptions from a user. To use this method you need an OAuth access token. Learn More.

Parameter Name Type Required Description
access_token string Yes The code provided by https://api.pushed.co/1/oauth.
Example of a valid subscription response listing subscriptions:
{
  "response": {
    "type": "user_subscriptions_fetched",
    "message": "User subscriptions fetched.",
    "data": {
        "subscriptions": [
            {
                "subscription_alias": "CqVGmwordX",
                "source_type": "app",
                "created_at": {
                    "date": "2016-08-23 10:48:25.000000",
                    "timezone_type": 3,
                    "timezone": "UTC"
                },
                "source_alias": "abc123",
                "source_name": "Name of the app",
                "source_icon": "https://s3-eu-west-1.amazonaws.com/pushed.co/media/pushed.png",
            }
        ]
    }
  }
}

# subscription https://api.pushed.co/1/subscription

This method allows you to subscribe a user token one of your sources (app or channel). To use this method you need an OAuth access token. Learn More.

You can not subscribe a user to an app or channel that is not yours.

Parameter Name Type Required Description
access_token string Yes The code provided by https://api.pushed.co/1/oauth.
source_alias string Yes The alias of your source (app or channel).
source_type string Yes Allowed options: app or channel.
Example of a valid subscription created response:
{
  "response": {
    "type": "subscription_created",
    "message": "Subscription to Pushed Demo App created successfully.",
        "data": {
        {
            "subscription_alias": "CqVGmwordX",
        }
    }
  }
}

# subscription https://api.pushed.co/1/subscription

This method allows you to unsubscribe user from one of your sources (app or channel). To use this method you need an OAuth access token. Learn More.

You can not unsubscribe a user to an app or channel that is not yours.

Parameter Name Type Required Description
access_token string Yes The code provided by https://api.pushed.co/1/oauth.
subscription_alias string Yes The subscription_alias provided by https://api.pushed.co/1/subscription.
Example of a valid subscription delete response:
{
  "response": {
    "type": "subscription_deleted",
    "message": "Subscription to Pushed Demo App deleted successfully.",
  }
}

# subscription/invite https://api.pushed.co/1/subscription/invite

This method allows you to invite users to subscribe to one of your sources (app or channel).

Parameter Name Type Required Description
app_key string Yes Your application key. You can find your app_key on the settings section of your application inside the developer portal.
app_secret string Yes Your application secret. You can find your app_secret on the settings section of your application inside the developer portal.
source_type string Yes Allowed options: app or channel.
source_alias string Optional Only required when source_type != app.
emails string Yes List of comma separated emails to send invitations to.
curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "source_type=your_source_type" \
  --form-string "source_alias=your_app_or_channel_alias" \
  --form-string "emails=emails_list_comma_separated" \
  https://api.pushed.co/1/subscription/invite
Example of a valid subscription/invite response:
{
  "response": {
    "type": "invitations_created_successfully",
    "message": "Invitations created successfully.",
        "data": {
        {
            "count": 1,
        }
    }
  }
}
 

Applications Management

https://api.pushed.co/1/app

This method lists all of your applications.

Parameter Name Type Required Description
pushed_id string yes Your account PushedID (you can get it from your account settings page).
api_key string yes Your account api key (you can get it from your account settings page).
curl -X GET -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  https://api.pushed.co/1/app

Example of a valid app response listing apps:

{
  "response": {
    "type": "account_apps_fetched_successfully",
    "message": "Account apps fetched successfully.",
    "data": {
      "apps": {
        {
          "name": "Pushed Demo App",
          "description": "App Description",
          "alias": "abc123",
          "public": 1,
          "members_only": 0,
          "icon": "https://s3-eu-west-1.amazonaws.com/pushed.co/static/apps/abc123/abc123.png",
          "app_key": "app_key",
          "app_secret": "app_secret",
          "created_at": "2014-09-17 18:57:59"
        }
      }
    }
  }
}

https://api.pushed.co/1/app PUT

This method allows you to create a new application.

Parameter Name Type Required Description
pushed_id string yes Your account PushedID (you can get it from your account settings page).
api_key string yes Your account api key (you can get it from your account settings page).
name string Yes App name.
description string Yes App description.
public boolean Optional Wether your app will be publicly available or not (Private by default).
icon_url string Optional App icon url (will be saved to Pushed).
tags string Optional Comma separated app tags.
supercategory string Optional App category. Options available: Pushed Picks, News, Tech & Science, Internet, Sports, Business, Design, Music, Films & TV, Travel, Food, Style.
curl -X PUT \
  https://api.pushed.co/1/app \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'pushed_id=user_pushed_id&api_key=user_api_key&name=name_of_the_app&description=description_of_the_app&public=public_visibility&icon_url=url_of_the_icon&tags=tags%2Ccomma%2Cseparated&supercategory=style'

https://api.pushed.co/1/app POST

This method allows you to edit an application.

Parameter Name Type Required Description
app_key string Yes Your application key. You can find your app_key on the settings section of your application inside the developer portal.
app_secret string Yes Your application secret. You can find your app_secret on the settings section of your application inside the developer portal.
name string Optional App name.
description string Optional App description.
public boolean Optional Wether your app will be publicly available or not (1 means public, 0 means private).
icon_url string Optional App icon url (will be saved to Pushed).
curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "name=name_of_the_app" \
  --form-string "description=description_of_the_app" \
  --form-string "public=public_visibility" \
  --form-string "icon_url=url_of_the_icon" \
  https://api.pushed.co/1/app

https://api.pushed.co/1/app

This method removes an applications.

Parameter Name Type Required Description
pushed_id string yes Your account PushedID (you can get it from your account settings page).
api_key string yes Your account api key (you can get it from your account settings page).
app_alias string required App alias.
curl -X DELETE -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  --form-string "app_alias=alias_of_the_app" \
  https://api.pushed.co/1/app

Example of a valid app deletion response:

{
    "response": {
        "type": "app_deleted_succesfully",
        "message": "App (app name) deleted successfully."
    }
}

https://api.pushed.co/1/app/subscriptions

This method retrieves application subscriptions.

Parameter Name Type Required Description
pushed_id string yes Your account PushedID (you can get it from your account settings page).
api_key string yes Your account api key (you can get it from your account settings page).
alias string required App alias.
curl -X GET -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  --form-string "alias=alias_of_the_app" \
  https://api.pushed.co/1/app/subscriptions

Example of a valid app/subscriptions response:

{
    "response": {
        "type": "subscribers_successfully_fetched",
        "message": "App subscribers successfully fetched.",
        "data": {
            "subscriptions": [
                {
                    "alias": "subscription_alias",
                    "email": "hello@pushed.co",
                    "subscribed_at": {
                        "date": "2018-08-30 12:13:44.000000",
                        "timezone_type": 3,
                        "timezone": "UTC"
                    }
                },
            ]
        }
    }
}

https://api.pushed.co/1/app/subscription

This method retrieves an specific app subscription. You must send either subscription_alias or subscription_email in order to get the subscription data.

Parameter Name Type Required Description
pushed_id string yes Your account PushedID (you can get it from your account settings page).
api_key string yes Your account api key (you can get it from your account settings page).
app_alias string required App alias.
subscription_alias string optional (one search needle required) Subscription alias.
subscription_email string optional (one search needle required) Subscription email.
curl -X GET -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  --form-string "subscription_alias=alias_of_the_subscription" \
  --form-string "subscription_email=email_of_the_subscription" \
  https://api.pushed.co/1/app/subscription

Example of a valid app/subscription response:

{
    "response": {
        "type": "subscription_successfully_fetched",
        "message": "App subscription successfully fetched.",
        "data": {
            "subscription": {
                "alias": "subscription_alias",
                "email": "hello@pushed.co",
                "subscribed_at": {
                    "date": "2018-05-08 15:24:08.000000",
                    "timezone_type": 3,
                    "timezone": "UTC"
                }
            }
        }
    }
}

https://api.pushed.co/1/app/subscription

This method removes an specific app subscription. You must send either subscription_alias or subscription_email in order to unsubscribe the user from the app.

Parameter Name Type Required Description
pushed_id string yes Your account PushedID (you can get it from your account settings page).
api_key string yes Your account api key (you can get it from your account settings page).
app_alias string required App alias.
subscription_alias string optional (one search needle required) Subscription alias.
subscription_email string optional (one search needle required) Subscription email.
curl -X DELETE -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  --form-string "subscription_alias=alias_of_the_subscription" \
  --form-string "subscription_email=email_of_the_subscription" \
  https://api.pushed.co/1/app/subscription

Example of a valid app/subscription response:

{
    "response": {
        "type": "subscription_successfully_deleted",
        "message": "App subscription successfully deleted."
    }
}
 

Channels Management

https://api.pushed.co/1/channel

This method lists all your channels.

Parameter Name Type Required Description
pushed_id string Yes Your account PushedID (you can get it from your account settings page).
api_key string Yes Your account api key (you can get it from your account settings page).
curl -X GET -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  https://api.pushed.co/1/channel

Example of a valid channel response listing:

{
  "response": {
    "type": "account_channels_fetched_successfully",
    "message": "Account channels fetched successfully.",
    "data": {
      "channels": {
        {
            "name": "Channel name",
            "alias": "channel_alias",
            "public": 1,
            "members_only": 0,
            "icon": "https://s3-eu-west-1.amazonaws.com/pushed.co/media/pushed.png",
            "created_at": "2018-05-08 15:24:06",
            "app": {
                "name": "App name",
                "description": "App description",
                "alias": "app_alias",
                "created_at": "2018-05-08 15:24:04"
            }
        }
      }
    }
  }
}

https://api.pushed.co/1/app/channel PUT

This method allows you to create a new channel.

Parameter Name Type Required Description
pushed_id string Yes Your account PushedID (you can get it from your account settings page).
api_key string Yes Your account api key (you can get it from your account settings page).
app string Yes App alias (where you want to create the child channel).
name string Yes App name.
public boolean Optional Wether your channel will be publicly available or not (Private by default).
icon_url string Optional App icon url (will be saved to Pushed).
members_only integer Optional Wether the channel will be available for members only. Accepted values: 1 or 0.
curl -X PUT \
  https://api.pushed.co/1/app/channel \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'pushed_id=user_pushed_id&api_key=user_api_key&app=alias_of_the_origin_app&name=name_of_the_channel&public=public_visibility&icon_url=url_of_the_icon'

https://api.pushed.co/1/app/channel POST

This method allows you to edit a channel.

Parameter Name Type Required Description
app_key string Yes Your application key. You can find your app_key on the settings section of your application inside the developer portal.
app_secret string Yes Your application secret. You can find your app_secret on the settings section of your application inside the developer portal.
alias string required Channel alias.
name string Yes App name.
public boolean Optional Wether your app will be publicly available or not (1 means public, 0 means private).
icon_url string Optional Channel icon url (will be saved to Pushed).
curl -X POST -s \
  --form-string "app_key=your_app_key" \
  --form-string "app_secret=your_app_secret" \
  --form-string "channel_alias=alias_of_the_channel" \
  --form-string "name=name_of_the_app" \
  --form-string "public=public_visibility" \
  --form-string "icon_url=url_of_the_icon" \
  https://api.pushed.co/1/channel

https://api.pushed.co/1/app/channel

This method removes a channel.

Parameter Name Type Required Description
pushed_id string Yes Your account PushedID (you can get it from your account settings page).
api_key string Yes Your account api key (you can get it from your account settings page).
channel_alias string required Channel alias.
curl -X DELETE -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  --form-string "alias=alias_of_the_channel" \
  https://api.pushed.co/1/app/channel

Example of a valid channel deletion response:

{
    "response": {
        "type": "channel_deleted_succesfully",
        "message": "Channel (channel name) deleted successfully."
    }
}

https://api.pushed.co/1/channel/subscriptions

This method retrieves channel subscriptions.

Parameter Name Type Required Description
pushed_id string Yes Your account PushedID (you can get it from your account settings page).
api_key string Yes Your account api key (you can get it from your account settings page).
channel_alias string required Channel alias.
curl -X GET -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  --form-string "channel_alias=alias_of_the_channel" \
  https://api.pushed.co/1/channel/subscriptions

Example of a valid channel subscriptions response:

{
    "response": {
        "type": "subscribers_successfully_fetched",
        "message": "Channel subscribers successfully fetched.",
        "data": {
            "subscriptions": [
                {
                    "alias": "subscription_alias",
                    "email": "hello@pushed.co",
                    "subscribed_at": {
                        "date": "2018-08-30 12:13:44.000000",
                        "timezone_type": 3,
                        "timezone": "UTC"
                    }
                },
            ]
        }
    }
}

https://api.pushed.co/1/channel/subscription

This method retrieves an specific channel subscription. You must send either subscription_alias or subscription_email in order to get the subscription data.

Parameter Name Type Required Description
pushed_id string Yes Your account PushedID (you can get it from your account settings page).
api_key string Yes Your account api key (you can get it from your account settings page).
channel_alias string required Channel alias.
subscription_alias string optional (one search needle required) Subscription alias.
subscription_email string optional (one search needle required) Subscription email.
curl -X GET -s \
  --form-string "pushed_id=user_pushed_id" \
  --form-string "api_key=user_api_key" \
  --form-string "subscription_alias=alias_of_the_subscription" \
  --form-string "subscription_email=email_of_the_subscription" \
  https://api.pushed.co/1/channel/subscription

Example of a valid channel subscription response:

{
    "response": {
        "type": "subscription_successfully_fetched",
        "message": "Channel subscription successfully fetched.",
        "data": {
            "subscription": {
                "alias": "subscription_alias",
                "email": "hello@pushed.co",
                "subscribed_at": {
                    "date": "2018-05-08 15:24:08.000000",
                    "timezone_type": 3,
                    "timezone": "UTC"
                }
            }
        }
    }
}
 

Account Management

# account https://api.pushed.co/1/account

This method allows you to programatically create a new account in Pushed and then subscribe to the selected app or channel.

Parameter Name Type Required Description
pushed_id string yes Your account PushedID (you can get it from your account settings page).
api_key string yes Your account api key (you can get it from your account settings page).
email string Yes The email of the new account.
password string Yes The password of the new account. Minimum lentgh: 8
subscribe_to_alias string Yes The alias of your source (can be an app or a channel).
subscribe_to_type string Yes The type of your source (app or channel).
timezone string No A valid timezone. List of supported timezones.
Example of a valid account response for adding new account:
{
  "response": {
    "type": "account_successfully_added",
    "message": "Account successfully added.",
    "data": {
        {
            "alias": "Drc37p"
        }
    }
  }
}
curl -X PUT \
  https://api.pushed.co/1/account \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'pushed_id=user_pushed_id&api_key=user_api_key&email=john%40doe.com&password=secret1234&subscribe_to_alias=your_app_or_channel_alias&subscribe_to_type=your_source_type'

# account https://api.pushed.co/1/account

This method allows you to programatically fetch an account basic data in Pushed. To use this method you need an OAuth access token. Learn More.

Parameter Name Type Required Description
access_token string Yes The code provided by https://api.pushed.co/1/oauth.
Example of a valid account response for fetching account data:
{
  "response": {
    "type": "account_successfully_fetched",
    "message": "Account successfully fetched.",
    "data": {
        {
            "account": {
                "email": "hello@pushed.co",
                "alias": "0Phlh9",
                "timezone": "UTC",
                "language": "en"
            }
        }
    }
  }
}
curl -X GET -s \
  --form-string "access_token=access_token_code_given_by_pushed" \
  https://api.pushed.co/1/account
 

Analytics

Available soon.

 

 

Lastest Update: Fri, 01 Mar 2024 22:03:46