List the organizations the user belongs to
GET
/v1/org/list
const url = 'https://your-tenant-host/v1/org/list';const options = { method: 'GET', headers: { cookie: 'ek.session_token=<ek.session_token>', 'x-edgekit-site-id': 'site_example' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://your-tenant-host/v1/org/list \ --header 'x-edgekit-site-id: site_example' \ --cookie ek.session_token=<ek.session_token>Every organization the signed-in user holds a membership in. Empty for a user who represents only themselves, which is most of them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-edgekit-site-id
required
The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
string
Example
site_exampleThe site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.
Responses
Section titled “Responses”The user’s organizations.
Media typeapplication/json
object
organizations
required
Array<object>
object
id
required
string format: uuid
name
required
string
slug
required
string
logo
required
string | null
Example
{ "organizations": [ { "id": "01926f3a-8b4e-7b33-a944-5e6f7a8b9c0d", "name": "Aperture Science", "slug": "aperture-science", "logo": null } ]}Invalid request.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Missing or invalid credential.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Not allowed.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Resource not found.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}