Overview

INBOX provides you with API methods. With these methods, you can perform INBOX operations through your own application. Each method takes a request in JSON format and returns a response. You also need to supply standard header values when sending requests.

Base points about INBOX API

  • API is built on HTTP and it is RESTful.
  • There is no need to learn yet another 3rd party library to use the API.
  • You can use your favourite HTTP/REST library available for your programming language to make HTTP calls.
  • All endpoints authenticated with Bearer token and you can generate token with your INBOX Account username and password.
  • Each method takes a request in JSON format and returns a response. You also need to supply standard header values when sending requests.

Prerequests

API Reference

The API endpoints are referenced here https://reference.useinbox.com

Base Url

INBOX Account (account informations, payments, getting token etc.)
https://useapi.useinbox.com/
INBOXNotify (transactional emails)
https://useapi.useinbox.com/notify/v1
INBOX (email marketing)
https://useapi.useinbox.com/inbox/v1

Acceptable Content Types

We accept the following Content-Type header values when using POST, PUT or PATCH methods:

application/json (recommended)
multipart/form-data
application/x-www-form-urlencoded

HTTP Methods

Verb Description
GET Obtain information. Query path parameters are allowed.
POST Add new information. Body is allowed.
PUT Modify existing information. Body is allowed.
PATCH Applies partial modifications to a resource.
DELETE Remove information.

HTTP Status Codes

Code Description
200 OK The request has succeeded.
201 Created The request has been fulfilled and resulted in a new resource being created.
400 Bad Request The request has been fulfilled and resulted in a new resource being created.
401 Unauthorized The request requires user authentication.
404 Not Found The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
500 Internal Server Error RThe server encountered an unexpected condition which prevented it from fulfilling the request.

Responses

API response is JSON formatted and it has Content-Type: application/json header.

{
    "version": "1.0.0",
    "resultStatus": true,
    "resultCode": 200,
    "resultMessage": "Your operation has been completed successfully.",
    "resultObject": {
        "id": "5d3edcfad93b7900011096cd",
        "createTime": "2019-07-29T11:48:13.265Z",
        "createUserId": "5bbc5ba86ca84691645696ce",
        "updateTime": "2019-08-07T08:49:30.17Z",
        "updateUserId": "5bbc5ba86ca84691645696ce",
        "isDeleted": false
    }
}

Authentication

Every request to INBOX API should have HTTP header containing a valid Bearer token that we use to authenticate.

Getting Token

Endpoint

https://useapi.useinbox.com/token

Request

curl -X POST https://useapi.useinbox.com/token/ \
   -H 'Cache-Control: no-cache' \
   -H 'Content-Type: application/json' \
   -d '{
 	"EmailAddress": "YOUR_INBOX_ACCOUNT_EMAIL_ADDRESS",
 	"Password": "YOUR_INBOX_ACCOUNT_PASSWORD"}'
 }

Response

{
    "version": "1.0.0",
    "resultStatus": true,
    "resultCode": 200,
    "resultMessage": "Your operation has been completed successfully.",
    "resultObject": {
        "access_token": "eyJhbGciOiJSUzI1NiIsI...xxXDw4KAPvu7KrI5rl8O1dhQ",
        "expires_in": 3600,
        "token_type": "Bearer"
    }
}

Quick Sample

Now we'll get the defined sender list. You must have a valid token for this request. For more info go to Authentication section.

Endpoint

https://useapi.useinbox.com/notify/v1/senders

Request

curl -X GET \
 https://useapi.useinbox.com/notify/v1/senders \
 -H 'Authorization: Bearer YOUR_TOKEN' \
 -H 'Cache-Control: no-cache' \

Response

{
    "version": "1.0.0",
    "resultStatus": true,
    "resultCode": 200,
    "resultMessage": "Your operation has been completed successfully.",
    "resultObject": {
        "displayCount": 1,
        "totalCount": 1,
        "items": [
            {
				"id": "5db7zeec92bz6500010za0aa",
                "createTime": "2019-10-28T18:09:48.924Z",
                "updateTime": "2019-12-11T12:04:53.766Z"
                "customerId": "8e8zc2a31za9ea0zp10s85a7",
                "displayName": "John Doe",
                "email": "john.doe@johndoe.com",
                "notifyDedicatedIps": null
            }
        ]
    }
}