# Read the search profile membership of a record

`POST /membership/references/query`



[AI Search API guide](https://docs.contextual.io/tenants/tenant-apis/ai-search-api.md)

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "AI Search Api",
    "description": " ",
    "version": "1.7.5"
  },
  "security": [
    {
      "jwt": []
    }
  ],
  "servers": [
    {
      "url": "https://ai-search.{tenantId}.my.contextual.io/api/v1",
      "variables": {
        "tenantId": {
          "default": "YOUR-TENANT-ID"
        }
      }
    }
  ],
  "paths": {
    "/membership/references/query": {
      "post": {
        "tags": [
          "Membership"
        ],
        "summary": "Read the search profile membership of a record",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recordUri": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "recordUri"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchProfileMembershipResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid membership query",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "SearchProfileMembershipResult": {
        "type": "object",
        "properties": {
          "orgId": {
            "type": "string",
            "maxLength": 63,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "recordUri": {
            "type": "string",
            "minLength": 1
          },
          "profileIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 3,
              "maxLength": 64,
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          }
        },
        "required": [
          "orgId",
          "recordUri",
          "profileIds"
        ],
        "additionalProperties": false
      },
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      }
    }
  }
}
```