sendgrid/smtpapi-nodejs

Category List

Closed this issue · 2 comments

hello,
Trying to use your API for getting a list of all categories for my account
but it seems even the example at the web API page gives wrong results:

the code :
curl -X POST https://sendgrid.com/api/stats.get.json -d api_user=XXXXX@XXX.XXX -d api_key=XXXXXXXX

should " Retrieve a list of all the categories used in your account." (quote)
the actual result is :

[
{
"delivered": 0,
"unsubscribes": 0,
"invalid_email": 0,
"bounces": 0,
"repeat_unsubscribes": 0,
"unique_clicks": 0,
"blocked": 0,
"spam_drop": 0,
"repeat_bounces": 0,
"repeat_spamreports": 0,
"date": "2014-11-13",
"requests": 0,
"spamreports": 0,
"clicks": 0,
"opens": 3,
"unique_opens": 1
}
]

How do I get a list of all active categories on my account?

You are missing the list=true param.

curl -X POST https://api.sendgrid.com/api/stats.get.json -d api_user=$SENDGRID_USERNAME -d api_key=$SENDGRID_PASSWORD -d list=true

https://sendgrid.com/docs/API_Reference/Web_API/Statistics/index.html#-Category-List

is there a limit to the number of categories I can add?
currently i have 17 categories, and im adding new ones using :

api_user=USERNAME&api_key=KEY&category=CATEGORY

i receive success message , but the category wont show in the query from
the link you provided (https://sendgrid.com/docs/API_
Reference/Web_API/Statistics/index.html#-Category-List)

(p,s I've also tried adding the category via
https://sendgrid.com/docs/API_Reference/Marketing_Emails_API/categories.html
same result : getting success msg, but the category wont appear)

On Thu, Nov 13, 2014 at 8:16 PM, Eddie Zaneski notifications@github.com
wrote:

You are missing the list=true param.

curl -X POST https://api.sendgrid.com/api/stats.get.json -d api_user=$SENDGRID_USERNAME -d api_key=$SENDGRID_PASSWORD -d list=true

https://sendgrid.com/docs/API_Reference/Web_API/Statistics/index.html#-Category-List


Reply to this email directly or view it on GitHub
#9 (comment)
.