GET /v1/organizations
The organization sits at the top of the hierarchy: every project belongs to an organization. Since an API key belongs to one organization, the typical flow follows this hierarchy: organization → projects → stack / alerts / EOL.
My organization
Section titled “My organization”GET /api/v1/organizationsAuthorization: Bearer twa_your_key_hereReturns the organization the key belongs to (always a single-element array).
No parameters
Section titled “No parameters”Response 200 OK
Section titled “Response 200 OK”[ { "id": "018e5678-abcd-7000-8000-000000000001", "name": "ACME Corp", "role": "OWNER", "is_personal": false, "created_at": "2024-05-02T09:00:00Z" }]Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
id | string (UUID) | Organization identifier — used in /organizations/{id}/projects |
name | string | Organization name |
role | string | Always OWNER (the key operates at the organization level) |
is_personal | boolean | true for a personal organization |
created_at | string (ISO 8601) | Creation date |
List the projects of an organization
Section titled “List the projects of an organization”GET /api/v1/organizations/{org_id}/projectsAuthorization: Bearer twa_your_key_hereReturns all projects of the organization (the key grants org-wide access). org_id must match the key’s organization.
Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
org_id | UUID | Organization identifier |
Response 200 OK
Section titled “Response 200 OK”[ { "id": "018e1234-abcd-7000-8000-000000000010", "name": "Prod infrastructure", "description": "Production servers and dependencies", "org_id": "018e5678-abcd-7000-8000-000000000001", "is_default": true, "created_at": "2024-03-15T10:22:00Z" }]Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
id | string (UUID) | Project identifier — used in every /organizations/{org_id}/projects/{id}/... endpoint |
name | string | Project name |
description | string | null | Description (null if not set) |
org_id | string (UUID) | null | Organization the project belongs to |
is_default | boolean | true for the project created automatically at signup |
created_at | string (ISO 8601) | Creation date |
Errors
Section titled “Errors”| Code | Detail | Cause |
|---|---|---|
404 | Organisation introuvable | org_id does not match the key’s organization |
Examples
Section titled “Examples”Walk the whole organizations → projects hierarchy
curl -s \ -H "Authorization: Bearer twa_your_key_here" \ https://app.techwatchalert.com/api/v1/organizations \ | jq -r '.[].id' \ | while read ORG; do curl -s \ -H "Authorization: Bearer twa_your_key_here" \ "https://app.techwatchalert.com/api/v1/organizations/${ORG}/projects" \ | jq -r '.[] | "\(.name)\t\(.id)"' donePython — all projects, grouped by organization
import httpx
BASE_URL = "https://app.techwatchalert.com/api/v1"headers = {"Authorization": "Bearer twa_your_key_here"}
orgs = httpx.get(f"{BASE_URL}/organizations", headers=headers).json()projects_by_org = { org["name"]: httpx.get( f"{BASE_URL}/organizations/{org['id']}/projects", headers=headers ).json() for org in orgs}
for org_name, projects in projects_by_org.items(): print(org_name, "→", [p["name"] for p in projects])