Stack Overflow for Teams API v2.3
This is the documentation for the Stack Overflow for Teams API v2.3.
This API is available for the following subscription tiers:
- Basic - read only
- Business - read/write
Requests
All requests to the API require:
- A query string param
team
containing the slug of the team that will be target of the API call. For example, if your team lives instackoverflowteams.com/c/my-team
, the slug ismy-team
. - A header
X-API-Access-Token
with an access token. See authentication on how to get one.
Example request:
curl -X GET -H 'X-API-Access-Token: my-personal-access-token' 'https://api.stackoverflowteams.com/2.3/questions?team=my-team'
General
All API responses are JSON, we do support JSONP with the callback
query parameter.
Every response in the API is returned in a common "wrapper" object, for easier and more consistent parsing.
Additionally, all API responses are compressed. The Content-Encoding
header is always set, but some proxies will strip this out. The proper way to decode API responses can be found here.
Developers can trim API responses down to just the fields they are interested in using custom filters. Many types have fields that are not normally returned (question bodies, for example) that can likewise be requested via a custom filter.
A number of methods in the Stack Overflow for Teams API accept dates as parameters and return dates as properties, the format of these dates is consistent and documented. All dates are in unix epoch time.
Unless otherwise noted, the maximum size of any page is 100
, any {ids}
parameter likewise is capped at 100
elements, all indexes
start at 1.
If a parameter name is plural it accepts vectorized requests, otherwise a single value may be passed.
It is possible to compose reasonably complex queries against the sites using the min
, max
,
fromdate
, todate
, and sort
parameters. Most, but not all, methods accept some or all of these parameters,
the documentation for individual methods will highlight which do. Most methods also have a common set of paging parameters.
Per-Site Methods
Answers
Articles
Add/Edit/Delete Only available for Business Teams.