Organization ID

Retrieve data on your organizations, per organization ID.

Fetch User's Organizations ID

Retrieving the user's organization info is done through querying the user's information. One can query details inside the organization.

Note that you can fetch more than just the organization ID, all depending on what you're filling in the query.

query User($where: UserWhereUniqueInput!) {
  user(where: $where) {
    organizations {
      id
      name
    }
  }
}

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body (UserWhereUniqueInput object)

Name
Type
Description

id*

string

{
  "where": {
    "id": "userId123"
  }
}

Response

Returned values:

Name
Type
Description

id

string

Organization ID

name

string

Organization name

{
  "data": {
    "user": {
      "organizations": [
        {
          "id": "clilpvru98723678mwie82oihn9",
          "name": "Crypto Org 1"
        }
      ]
    }
  }
}

Try it out!