GET
/dashboard/organizations List organizations
Returns all organizations the user owns or is a member of.
Response
200
401
successbooleandataobjectorganizationsarrayRequest
curl -X GET "https://api.royalehosting.net/dashboard/organizations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID"Request
const response = await fetch("https://api.royalehosting.net/dashboard/organizations", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
},
});
const data = await response.json();Request
import requests
response = requests.get(
"https://api.royalehosting.net/dashboard/organizations",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true,
"data": {
"organizations": [
{
"id": 1,
"name": "My Company",
"description": "Main organization",
"icon": "string",
"business": true,
"created_at": "2024-01-15T10:30:00Z",
"role": "owner",
"isOwner": true
}
]
}
}