Skip to main content
1 of 4

Items response empty after article POST request

Hey i'm trying to post an article using StackExchange's Teams api then try to pull that new article's id from the api response. The article gets posted but the items field is empty :

{"items":[], "has_more":false,"quota_max":10000,"quota_remaining":9999"}

this is weird because the docs state that the request is supposed to return an article block https://api.stackexchange.com/docs/create-article

what am i doing wrong? here's my code (in Python):

import requests
base_url = "https://api.stackexchange.com/"
payload = {'title' : title, 'body' : body, 'article_type' : article_type, 'tags' : tags, 'key' : key, 'site' : 'stackoverflow', 'team' : team}
r = requests.post(base_url + "2.3/articles/add", headers = {"X-API-Access-Token" : access_token}, data = payload)
print(r.text)

Note that i've hidden only the variables i pass to the payload dictionary. but those variables are correct because as i said, the article gets posted successfully. i tried adding {"filter" : "default"} to the payload but i get the same response.