Support
Get up to speed quickly with the Stack Overflow Internal API v3.
Applies to:
Free
Basic
Business
Enterprise

Stack Overflow's API v3 opens up your Stack Internal Enterprise site to external integrations, allowing you to access your data, change content on your site, build reports, and much more.

You can access API v3 at https://[your_site].stackenterprise.co/api/v3 (replace [your_site] with your Enterprise site's subdomain). There you'll find a complete list of all API endpoints. This URL is also the base URL for all API v3 calls.

In this quickstart, you'll create a simple read-only API token. You'll then use that token to retrieve data from API v3 with the free Postman online tool or cURL.

Register an API application

Start by creating and registering a new API application on your Stack Overflow site. This generates a unique API key and grants that key access to the API.

To register a new API application:

  1. Log into your Stack Internal Enterprise site.

  2. Click on your avatar (profile picture) in the top navigation bar.

  3. Click Settings.

  4. Click API applications under the "APPS & INTEGRATIONS" heading.

  5. Enter a name for your API application in the Application name field.

  6. Leave Domain blank.

  7. Click Register API application.

  8. Copy the Key value. This is your API access key. Copy it for use later.

Use Postman to access the API

  1. Go to https://www.postman.com and sign in. If you don't already have an account and workspace, sign up and create them.

  2. Add a new request.

  3. Ensure that the request type is GET.

  4. To get question data from your Enterprise instance, enter this endpoint URL: https://[your_site].stackenterprise.co/api/v3/questions.

  5. On the "Authorization" tab for your new request, set Auth Type to Bearer Token.

  6. Paste your new Stack Internal API key into the Token field.

  7. Optional: click Save if you want to return to this request in the future.

  8. Click Send to make the request.

You should see a list of questions from your Stack Overflow site.

Use cURL to access the API

You can use your API token to access Stack Overflow API v3 with cURL. As with the Postman example above, this example queries your API endpoint for question data. The cURL command below is broken onto multiple lines for clarity.


curl -X GET "https://[your_site].stackenterprise.co/api/v3/questions" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Swagger UI API documentation

Your Enterprise site has interactive API documentation using Swagger UI. This documentation gives you information on all the API v3 endpoints, and also lets you make test calls to each endpoint. You can access your site's Swagger UI API interface at https://[your_site].stackenterprise.co/api/v3 (replace [your_site] with your site's subdomain).

For more information on API v3 and the Swagger UI interactive documentation, read the Stack Overflow Internal API v3 article.

https://doc-automation.netlify.app/pdfs/internal/enterprise/integrations_and_api/API_v3_quickstart.pdf

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article