List environments
List all environments for the current organization.
GET
/environments
List all environments for the current organization.
Authentication
API Key (header: X-API-Key) API Key (cookie: better-auth.session_token)
Responses
200
List of environments
application/jsonenvironments
object[]
REQUIRED
Array of:
id
string
REQUIRED
org_id
string
REQUIRED
name
string
REQUIRED
slug
string
REQUIRED
created_at
string
REQUIRED
401
Unauthorized
curl -X GET 'https://hookstream.io/v1/environments' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://hookstream.io/v1/environments', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://hookstream.io/v1/environments', headers=headers)print(response.json())
package mainimport ( "fmt" "io" "net/http")func main() { req, _ := http.NewRequest("GET", "https://hookstream.io/v1/environments", nil) req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() result, _ := io.ReadAll(resp.Body) fmt.Println(string(result))}
200
Response
{ "environments": [ { "id": "<string>", "org_id": "<string>", "name": "<string>", "slug": "<string>", "created_at": "<string>" } ]}
API Playground
Try this endpoint
GET
/environments