As a developer you can register and unregister subscriptions to you by using the API. You need to have an API key; if not, please generate some random bytes, hash it with sha256 and send the hash to us. There are currently two API endpoints: subscribe and unsubscribe.
All calls are sent as POST and the parameters are encoded like form data (form-urlencoded without the plus encoding). The server responds with HTTP 200 status code if the action was successful.
URL: https://1sub.dev/api/subscribe
Subscribes specified account to you. Remember to keep track of how many subscriptions you have left to sell by checking the `credits` response value (divide by 100).
Request parameters:
caller | Your account number that will be subscribed to |
apikey | Unhashed API key |
account | Account number that will subscribe |
Response parameters:
credits | The number of credits on your account after this action |
subscribers | The number of subscribers you have after this action |
Example command:curl https://1sub.dev/api/subscribe -d 'caller=a.123&apikey=somethingsecret&account=a.456'
URL: https://1sub.dev/api/unsubscribe
Unsubscribes specified account from you.
Request parameters:
caller | Your account number that is subscribed to |
apikey | Unhashed API key |
account | Account number that will unsubscribe |
Response parameters:
credits | The number of credits on your account after this action |
subscribers | The number of subscribers you have after this action |
Example command:curl https://1sub.dev/api/unsubscribe -d 'caller=a.123&apikey=somethingsecret&account=a.456'
URL: https://1sub.dev/api/info
Shows information about your account. Makes no changes.
Request parameters:
caller | Your account number |
apikey | Unhashed API key |
Response parameters:
credits | The number of credits on your account |
subscribers | The number of subscribers you have |
Example command:curl https://1sub.dev/api/info -d 'caller=a.123&apikey=somethingsecret'