Account

Run in Postman
Import the SparkPost API as a Postman collection

Retrieve information regarding your SparkPost account and set account options.

Account Object

Example

{
  "customer_id": 102938,
  "company_name": "Example, Inc.",
  "country_code": "US",
  "anniversary_date": "2019-01-11T08:00:00.000Z",
  "created": "2015-01-11T08:00:00.000Z",
  "updated": "2018-04-11T08:00:00.000Z",
  "status": "active",
  "status_updated": "2018-04-11T08:00:00.000Z",
  "status_reason_category": "",
  "tfa_required": false,
  "service_level": "standard",
  "subscription": {
    "name": "500K",
    "code": "500K-0817",
    "plan_volume": 500000,
    "effective_date": "2018-04-11T08:00:00.000Z",
    "self_serve": true,
    "type": "default"
  },
  "options": {
    "smtp_tracking_default": true
  },
  "usage": {
    "timestamp": "2018-06-26T14:48:00.000Z",
    "day": {
      "limit": 50000,
      "used": 8367,
      "start": "2018-06-25T15:00:00.000Z",
      "end": "2018-06-26T15:00:00.000Z"
    },
    "month": {
      "limit": 500000,
      "used": 40321,
      "start": "2018-06-03T08:00:00.000Z",
      "end": "2018-07-03T08:00:00.000Z"
    }
  },
  "support": {
    "phone": false,
    "online": true
  }
}

Attributes

customer_id number

Account ID

company_name string

Account holder company name

country_code string

Account holder 2-letter country code

anniversary_date string

ISO date of billing anniversary

created string

ISO date account was created

updated string

ISO date account details were last updated

status string, default is active

Account status.

status_updated string

ISO date status was last updated

status_reason_category string

Category for some account statuses, e.g. 'NONPAYMENT'. Empty string by default

tfa_required boolean, default is false

Account wide two factor authentication requirement.

service_level string, default is standard

Account service level.

subscription object

Current subscription details.

pending_subscription object

Details regarding a pending subscription upgrade or downgrade.

options object

Account-level tracking settings.

usage object

Account quota usage details. Specify 'include=usage' in query string to include usage info. Usage data is not available for Enterprise accounts.

support object

Support entitlement details.

pending_cancellation object

Pending cancellation details.

Request

GET /api/v1/account?include=usage

Response

{
  "results": {
    "customer_id": 102938,
    "company_name": "Example Inc",
    "country_code": "US",
    "anniversary_date": "2019-01-11T08:00:00.000Z",
    "created": "2018-01-11T08:00:00.000Z",
    "updated": "2018-02-11T08:00:00.000Z",
    "status": "active",
    "tfa_required": false,
    "status_updated": "2018-12-21T13:21:41.442Z",
    "status_reason_category": "",
    "subscription": {
      "code": "150K-0817",
      "name": "150K",
      "plan_volume": 150000,
      "self_serve": true,
      "type": "manual"
    },
    "support": {
      "online": true,
      "phone": false
    },
    "pending_subscription": {
      "code": "2.5M-0817",
      "name": "2.5M",
      "effective_date": "2017-04-11T00:00:00.000Z"
    },
    "options": {
      "smtp_tracking_default": false
    },
    "usage": {
      "timestamp": "2016-03-17T05:19:00.932Z",
      "day": {
        "used": 22003,
        "limit": 50000,
        "start": "2016-03-16T05:30:00.932Z",
        "end": "2016-03-17T05:30:00.932Z"
      },
      "month": {
        "used": 122596,
        "limit": 1500000,
        "start": "2018-03-11T08:00:00.000Z",
        "end": "2016-04-11T08:00:00.000Z"
      },
      "sandbox": {
        "used": 3,
        "limit": 5
      }
    }
  }
}

Retrieve account information

GET/api/v1/account{?include}

Parameters

include string

Additional parts of account details to include. The only valid value is currently usage.

Request

PUT /api/v1/account
{
  "company_name": "SparkPost",
  "options": {
    "smtp_tracking_default": true
  }
}

Response

{
  "results": {
    "message": "Account has been updated"
  }
}

Update account information

PUT/api/v1/account

Request Body

company_name string

Company name

tfa_required boolean

Account wide two factor authentication requirement

options object

Account-level options.