---
updatedAt: 2025-08-11T18:18:17.000Z
agentTools:
  projectIndex: https://docs.keycafe.com/llms.txt
---

# Search Organization Memberships

Retrieve data for multiple memberships with a GET request to the endpoint.

## Search by Organization ID

Retrieve all memberships associated with a specific organization.

**Example**

```Text curl
curl -u 'test@yourdomain.com:{password}' "https://www.keycafe.com/v0/organizationMembership?organization=123456" -H "Accept: application/json"

```

## Search by User ID

Retrieve all memberships associated with a specific user.

**Example**

```Text curl
curl -u 'test@yourdomain.com:{password}' "https://www.keycafe.com/v0/organizationMembership?user=123456" -H "Accept: application/json"

```

## Retrieve All Memberships

If no search parameters are provided, the API will return all organization memberships.

## Pagination

Results are paginated, with a maximum of 50 memberships per page. Additional pages can be accessed using the Link response header

**Example**

```Text curl
Link: <https://www.keycafe.com/v0/organizationMembership?organization=123456&page=2>; rel="next", <https://www.keycafe.com/v0/organizationMembership?organization=123456&page=5>; rel="last"

```

* <code>rel="first"</code>: URL to retrieve the first page of results.
* <code>rel="prev"</code>: URL to retrieve the previous page of results.
* <code>rel="next"</code>: URL to retrieve the next page of results.
* <code>rel="last"</code>: URL to retrieve the final page of results.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Keycafe API",
    "version": "0"
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-languages": [
    "shell",
    "python",
    "go"
  ],
  "servers": [
    {
      "url": "https://www.keycafe.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "paths": {
    "/v0/organizationMembership": {
      "get": {
        "tags": [
          "Organization Membership"
        ],
        "summary": "Search Organization Memberships",
        "description": "Retrieve data for multiple memberships with a GET request to the endpoint.",
        "operationId": "search-organization-memberships",
        "parameters": [
          {
            "name": "organization",
            "in": "query",
            "required": false,
            "description": "Filter results by organization ID. </br> Example: 123456",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": ""
            }
          },
          {
            "name": "user",
            "in": "query",
            "required": false,
            "description": "Filter results by user ID. </br> Example: 123456",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of organization memberships matching the search query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Unique identifier for the organization membership.",
                        "example": 123456
                      },
                      "code": {
                        "type": "string",
                        "description": "Access code or identifier for the membership.",
                        "example": "111222"
                      },
                      "user": {
                        "type": "object",
                        "description": "User associated with this membership.",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Unique identifier of the user.",
                            "example": 12345678
                          },
                          "firstName": {
                            "type": "string",
                            "description": "First name of the user.",
                            "example": "Bob"
                          },
                          "lastName": {
                            "type": "string",
                            "description": "Last name of the user.",
                            "example": "Smith"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of user (e.g., FULL, SMARTBOX).",
                            "example": "FULL"
                          },
                          "email": {
                            "type": "string",
                            "format": "email",
                            "description": "User’s email address (used for FULL type users).",
                            "example": "user1@yourdomain.com"
                          },
                          "contactEmail": {
                            "type": "string",
                            "format": "email",
                            "description": "Contact email for SMARTBOX users.",
                            "example": "user2@yourdomain.com"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": "[\n    {\n        \"id\": 123456,\n        \"code\": \"111222\",\n        \"user\": {\n            \"id\": 12345678,\n            \"firstName\": \"Bob\",\n            \"lastName\": \"Smith\",\n            \"type\": \"FULL\",            \n            \"email\": \"user1@yourdomain.com\"\n        }\n    },\n    {\n        \"id\": 654321,\n        \"code\": \"333444\",\n        \"user\": {\n            \"id\": 6543210,\n            \"firstName\": \"John\", \n            \"lastName\": \"Doe\",\n            \"type\": \"SMARTBOX\",\n            \"contactEmail\": \"user2@yourdomain.com\"            \n        }\n    }\n]"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```