Search for Organizations. If you send a request with no body params, no filtering will be applied and the endpoint will return all Organizations. All fuzzy search filters require a minimum of three characters.
Search for Organizations
POSThttps://test.stytch.com/v1/b2b/organizations/search
Body parameters
cursor string
limit int
query object
Response fields
request_id string
status_code int
results_metadata object
organizations array[objects]
curl --request POST \
--url https://test.stytch.com/v1/b2b/organizations/search \
-u 'PROJECT_ID:SECRET' \
-H 'Content-Type: application/json' \
-d '{
"limit": 200,
"query": {
"operator": "OR",
"operands": [
{
"filter_name": "allowed_domains",
"filter_value": ["stytch.com"]
},
{
"filter_name": "organization_name_fuzzy",
"filter_value": "example org"
}
]
}
}'
RESPONSE
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"results_metadata": {
"next_cursor": null,
"total": 5
},
"organizations": [
...
]
}
Common Error Types
- invalid_email
- organization_search_expected_array_of_strings
- organization_search_filter_name_not_recognized
- organization_search_member_email_fuzzy_too_short
- organization_search_missing_filter_name
- organization_search_organization_name_fuzzy_too_short
- search_timeout
- user_search_invalid_cursor
- user_search_invalid_operator