Developers

Platform API

Accounts

Get a single account

GET /accounts/1?accountId=1

Example cURL request

curl \
  -X GET \
  -H "Authorization: Bearer YWIxMjdi341GHhnDnjsdKAJQxNjdjYuOJABbg6HdI.8V6HhxW-" \
  "https://api.mparticle.com/v1/accounts/1?accountId=1"

Response

{
  "data": [
    {
      "name": "My Account",
      "last_modified_on": "2014-11-14T22:46:38.673",
      "data_type": "account",
      "id": 1,
      "created_on": "2013-07-23T18:49:38.547"
    }
  ],
  "dataType": "account",
  "errors": null
}

Get all accounts

GET /accounts?accountId=1

Example cURL request

curl \
  -X GET \
  -H "Authorization: Bearer YWIxMjdi341GHhnDnjsdKAJQxNjdjYuOJABbg6HdI.8V6HhxW-" \
  "https://api.mparticle.com/v1/accounts?accountId=1"

Response

{
  "data": [
    {
      "name": "My Account 1",
      "last_modified_on": "2014-11-14T22:46:38.673",
      "data_type": "account",
      "id": 1,
      "created_on": "2013-07-23T18:49:38.547"
    },
    {
      "name": "My Account 2",
      "last_modified_on": "2014-11-14T22:46:38.673",
      "data_type": "account",
      "id": 2,
      "created_on": "2013-07-25T18:49:38.547"
    }
  ],
  "dataType": "account",
  "errors": null
}

Update an account

PUT /accounts/1?accountId=1

Example cURL request

curl \
  -X PUT \
  -H "Authorization: Bearer YWIxMjdi883GHBBDnjsdKAJQxNjdjYUUJABbg6hdI.8V6HhxW-" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"Updated Name\"}" \
  "https://api.mparticle.com/v1/accounts/1?accountId=1" \

Parameters

Name Type Description
name string The display name of the account.

Errors

Name
Account name is not unique.

Create an account

POST /accounts

Example cURL request

curl
  -X POST \
  -H "Authorization: Bearer YWIxMjdi883GHBBDnjsdKAJQxNjdjYUUJABbg6hdI.8V6HhxW-" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"New Account\"}" \
  "https://api.mparticle.com/v1/accounts"

Parameters

Name Type Description
name string The display name of the account.

Delete an account

DELETE /accounts

Example cURL request

curl -H "Authorization: Bearer YWIxMjdi883GHBBDnjsdKAJQxNjdjYUUJABbg6hdI.8V6HhxW-" -H "Content-Type: application/json" -X DELETE https://api.mparticle.com/v1/accounts?accountId=1

Errors

Name
All applications must be deleted before deleting account.

Was this page helpful?