# Contacts API: Memberships

## GET /api/contacts/memberships/{membership}

> Retrieves one specific membership

```json
{"openapi":"3.0.1","info":{"title":"Developer API","version":"v2.0.0"},"servers":[{"url":"/v2/e01"}],"security":[{"Bearer":[]},{"Cookie":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"-","name":"Bearer","in":"header"},"Cookie":{"type":"apiKey","description":"-","name":"InSite.WebToken","in":"cookie"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/contacts/memberships/{membership}":{"get":{"tags":["Contacts API: Memberships"],"summary":"Retrieves one specific membership","operationId":"retrieveMembership","parameters":[{"name":"membership","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## HEAD /api/contacts/memberships/{membership}

> Checks for the existence of one specific membership

```json
{"openapi":"3.0.1","info":{"title":"Developer API","version":"v2.0.0"},"servers":[{"url":"/v2/e01"}],"security":[{"Bearer":[]},{"Cookie":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"-","name":"Bearer","in":"header"},"Cookie":{"type":"apiKey","description":"-","name":"InSite.WebToken","in":"cookie"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/api/contacts/memberships/{membership}":{"head":{"tags":["Contacts API: Memberships"],"summary":"Checks for the existence of one specific membership","operationId":"assertMembership","parameters":[{"name":"membership","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## POST /api/contacts/memberships/collect

> Collects the list of memberships that match specific criteria

```json
{"openapi":"3.0.1","info":{"title":"Developer API","version":"v2.0.0"},"servers":[{"url":"/v2/e01"}],"security":[{"Bearer":[]},{"Cookie":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"-","name":"Bearer","in":"header"},"Cookie":{"type":"apiKey","description":"-","name":"InSite.WebToken","in":"cookie"}},"schemas":{"CollectMemberships":{"type":"object","properties":{"AccountScope":{"type":"string","nullable":true},"MembershipEffectiveSince":{"type":"string","format":"date-time","nullable":true},"MembershipEffectiveBefore":{"type":"string","format":"date-time","nullable":true},"MembershipExpirySince":{"type":"string","format":"date-time","nullable":true},"MembershipExpiryBefore":{"type":"string","format":"date-time","nullable":true},"ModifiedSince":{"type":"string","format":"date-time","nullable":true},"ModifiedBefore":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"MembershipModel":{"type":"object","properties":{"GroupId":{"type":"string","format":"uuid"},"MembershipId":{"type":"string","format":"uuid"},"ModifiedBy":{"type":"string","format":"uuid"},"UserId":{"type":"string","format":"uuid"},"MembershipFunction":{"type":"string","nullable":true},"MembershipEffective":{"type":"string","format":"date-time"},"MembershipExpiry":{"type":"string","format":"date-time","nullable":true},"Modified":{"type":"string","format":"date-time"}},"additionalProperties":false}}},"paths":{"/api/contacts/memberships/collect":{"post":{"tags":["Contacts API: Memberships"],"summary":"Collects the list of memberships that match specific criteria","operationId":"collectMemberships","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}},"application/json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}},"text/json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MembershipModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MembershipModel"}}}}}}}}}}
```

## POST /api/contacts/memberships/count

> Counts the memberships that match specific criteria

```json
{"openapi":"3.0.1","info":{"title":"Developer API","version":"v2.0.0"},"servers":[{"url":"/v2/e01"}],"security":[{"Bearer":[]},{"Cookie":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"-","name":"Bearer","in":"header"},"Cookie":{"type":"apiKey","description":"-","name":"InSite.WebToken","in":"cookie"}},"schemas":{"CountMemberships":{"type":"object","properties":{"AccountScope":{"type":"string","nullable":true},"MembershipEffectiveSince":{"type":"string","format":"date-time","nullable":true},"MembershipEffectiveBefore":{"type":"string","format":"date-time","nullable":true},"MembershipExpirySince":{"type":"string","format":"date-time","nullable":true},"MembershipExpiryBefore":{"type":"string","format":"date-time","nullable":true},"ModifiedSince":{"type":"string","format":"date-time","nullable":true},"ModifiedBefore":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"CountResult":{"type":"object","properties":{"Count":{"type":"integer","format":"int32"},"Summary":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/api/contacts/memberships/count":{"post":{"tags":["Contacts API: Memberships"],"summary":"Counts the memberships that match specific criteria","operationId":"countMemberships","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CountMemberships"}},"application/json":{"schema":{"$ref":"#/components/schemas/CountMemberships"}},"text/json":{"schema":{"$ref":"#/components/schemas/CountMemberships"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CountMemberships"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResult"}},"text/json":{"schema":{"$ref":"#/components/schemas/CountResult"}}}}}}}}}
```

## POST /api/contacts/memberships/download

> Downloads the list of memberships that match specific criteria

```json
{"openapi":"3.0.1","info":{"title":"Developer API","version":"v2.0.0"},"servers":[{"url":"/v2/e01"}],"security":[{"Bearer":[]},{"Cookie":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"-","name":"Bearer","in":"header"},"Cookie":{"type":"apiKey","description":"-","name":"InSite.WebToken","in":"cookie"}},"schemas":{"CollectMemberships":{"type":"object","properties":{"AccountScope":{"type":"string","nullable":true},"MembershipEffectiveSince":{"type":"string","format":"date-time","nullable":true},"MembershipEffectiveBefore":{"type":"string","format":"date-time","nullable":true},"MembershipExpirySince":{"type":"string","format":"date-time","nullable":true},"MembershipExpiryBefore":{"type":"string","format":"date-time","nullable":true},"ModifiedSince":{"type":"string","format":"date-time","nullable":true},"ModifiedBefore":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}},"paths":{"/api/contacts/memberships/download":{"post":{"tags":["Contacts API: Memberships"],"summary":"Downloads the list of memberships that match specific criteria","operationId":"downloadMemberships","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}},"application/json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}},"text/json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CollectMemberships"}}}},"responses":{"200":{"description":"OK"}}}}}}
```

## POST /api/contacts/memberships/search

> Searches for the list of memberships that match specific criteria

```json
{"openapi":"3.0.1","info":{"title":"Developer API","version":"v2.0.0"},"servers":[{"url":"/v2/e01"}],"security":[{"Bearer":[]},{"Cookie":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"-","name":"Bearer","in":"header"},"Cookie":{"type":"apiKey","description":"-","name":"InSite.WebToken","in":"cookie"}},"schemas":{"SearchMemberships":{"type":"object","properties":{"AccountScope":{"type":"string","nullable":true},"MembershipEffectiveSince":{"type":"string","format":"date-time","nullable":true},"MembershipEffectiveBefore":{"type":"string","format":"date-time","nullable":true},"MembershipExpirySince":{"type":"string","format":"date-time","nullable":true},"MembershipExpiryBefore":{"type":"string","format":"date-time","nullable":true},"ModifiedSince":{"type":"string","format":"date-time","nullable":true},"ModifiedBefore":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"MembershipMatch":{"type":"object","properties":{"MembershipId":{"type":"string","format":"uuid"}},"additionalProperties":false}}},"paths":{"/api/contacts/memberships/search":{"post":{"tags":["Contacts API: Memberships"],"summary":"Searches for the list of memberships that match specific criteria","operationId":"searchMemberships","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/SearchMemberships"}},"application/json":{"schema":{"$ref":"#/components/schemas/SearchMemberships"}},"text/json":{"schema":{"$ref":"#/components/schemas/SearchMemberships"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/SearchMemberships"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MembershipMatch"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MembershipMatch"}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shiftiq.com/developers/api-v2/navigating-the-api/contacts-api-memberships.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
