Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/zitadel/zitadel/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

POST /v2/organizations/_search

Description

Search for Organizations. By default, all organizations of the instance that you have permission to read will be returned. Make sure to include a limit and sorting for pagination.

Required Permission

  • org.read

Request Body

query
object
List limitations and ordering.
offset
string
Offset for pagination.
limit
integer
Maximum number of results to return.
asc
boolean
Sort in ascending order.
sortingColumn
string
The field the result is sorted by. Options:
  • ORGANIZATION_FIELD_NAME_NAME
  • ORGANIZATION_FIELD_NAME_CREATION_DATE
  • ORGANIZATION_FIELD_NAME_CHANGE_DATE
queries
array
Criteria the client is looking for.
nameQuery
object
Filter by organization name.
name
string
Name to search for.
method
string
Search method.
domainQuery
object
Filter by organization domain.
domain
string
Domain to search for.
method
string
Search method.
stateQuery
object
Filter by organization state.
state
string
State to filter by.

Response

details
object
Details of organizations results.
totalResult
string
Total number of organizations matching the query.
processedSequence
string
Processed sequence number.
timestamp
timestamp
Query timestamp.
sortingColumn
string
The sorting column used.
result
array
List of organizations matching the query.
id
string
Unique identifier of the organization.
details
object
Organization details.
state
string
Current state of the organization.
name
string
Name of the organization.
primaryDomain
string
Primary domain of the organization.

Example Request

curl -X POST https://your-domain.zitadel.cloud/v2/organizations/_search \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": {
      "limit": 100,
      "asc": true
    },
    "sortingColumn": "ORGANIZATION_FIELD_NAME_NAME",
    "queries": [
      {
        "stateQuery": {
          "state": "ORGANIZATION_STATE_ACTIVE"
        }
      }
    ]
  }'

Example Response

{
  "details": {
    "totalResult": "25",
    "processedSequence": "2000",
    "timestamp": "2024-03-15T14:00:00Z"
  },
  "sortingColumn": "ORGANIZATION_FIELD_NAME_NAME",
  "result": [
    {
      "id": "69629026806489455",
      "state": "ORGANIZATION_STATE_ACTIVE",
      "name": "ACME Corporation",
      "primaryDomain": "acme-corporation.zitadel.cloud"
    }
  ]
}

Error Responses

  • 400 Bad Request - Invalid list query
  • 403 Forbidden - Insufficient permissions