List organizations available to the authenticated user.

IAM tokens and regular personal access tokens (PATs) discover the user's
organizations using the same mechanism as the private organization list.
Only organizations already registered in SourceCraft are selected; missing
organizations are not imported. Discovery may return a partial or empty
list when an organization backend fails.
Requires permission to list the user's organizations. The list is not
additionally filtered by the PAT's object scope.
Federated users are supported with IAM tokens. PATs for federated users
and delegated PATs are not supported.

Request

GET

https://api.sourcecraft.tech/me/orgs

Responses

200 OK

A successful response.

Body

application/json
{
  "organizations": [
    {
      "id": "example",
      "slug": "example",
      "display_name": "example",
      "visibility": "public",
      "logo": {
        "url": "example"
      },
      "web_url": "example"
    }
  ]
}

Name

Description

organizations

Type: Organization[]

Example
[
  {
    "id": "example",
    "slug": "example",
    "display_name": "example",
    "visibility": "public",
    "logo": {
      "url": "example"
    },
    "web_url": "example"
  }
]

Organization.Visibility

Type: string

Enum: public, internal, private

Image

Name

Description

url

Type: string

Example: example

Example
{
  "url": "example"
}

Organization

Name

Description

display_name

Type: string

Example: example

id

Type: string

Example: example

logo

Type: Image

Example
{
  "url": "example"
}

slug

Type: string

Example: example

visibility

Type: Organization.Visibility

Enum: public, internal, private

web_url

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example",
  "display_name": "example",
  "visibility": "public",
  "logo": {
    "url": "example"
  },
  "web_url": "example"
}

default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

Body

application/json
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}

Name

Description

details

Type: unknown

Example: null

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example

Предыдущая
Следующая