Stoplight
stoplight · Developer Tools
Stoplight API
Authentication
Sample Requests
Export a version to your choice of API specification. ### Allowed Formats: - oas.json - oas.yaml - raml08.yaml - raml10.yaml - stoplight.json - stoplight.yaml The stoplight format actually returns OAS (Swagger 2) with x-stoplight annotations. If you are exporting with the intent on importing back
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/export/{format}"import requests
response = requests.get(
"https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/export/{format}",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/export/{format}';
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/export/{format}"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/export/{format}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/export/{format}";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Anonymously publish to API Docs. This endpoint will take a JSON spec or a URL to a swagger or raml spec. ``` { "specData": {...} } ``` or ``` { "url": "http://petstore.swagger.io/v2/swagger.json" } ``` The spec will be published to api-docs.io anonymously, which means you will not be able t
Hover any highlighted part to learn what it does
curl -X POST "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/publish/anon"
import requests
response = requests.post(
"https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/publish/anon",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/publish/anon';
const response = await fetch(url, {
method: 'POST',
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/publish/anon"
req, _ := http.NewRequest("POST", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/publish/anon")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/publish/anon";
$opts = ["http" => [
"method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Re-publish an API version in Stoplight. This will re-publish the given API version, with whatever publish settings have already been setup in the app. This will only work with APIs that have previously been published at least once. This works well with the #endpoint:957qEfc97BB5XGAeZ endpoint to a
Hover any highlighted part to learn what it does
curl -X POST "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/publish"import requests
response = requests.post(
"https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/publish",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/publish';
const response = await fetch(url, {
method: 'POST',
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/publish"
req, _ := http.NewRequest("POST", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/publish")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/stoplight.io/api-v1/versions/{versionId}/publish";
$opts = ["http" => [
"method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Stoplight?
Stoplight is a Developer Tools API. Developers commonly use developer tools APIs for:
- automating code review and quality checks
- integrating CI/CD pipelines and build systems
- managing feature flags and A/B tests
- monitoring errors and application performance
- generating and validating test data
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Stoplight is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide