> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mapp.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get a membership by email
> Retrieves the membership information of a contact identified by email in a group specified by groupId.
## OpenAPI
````json GET /membership/getByEmail
{
"openapi": "3.0.4",
"info": {
"title": "Engage public API",
"version": "1"
},
"servers": [
{
"url": "https://your-engage-domain.com/api/rest"
}
],
"tags": [
{
"name": "Address Attributes"
},
{
"name": "Async"
},
{
"name": "Audit Log"
},
{
"name": "Automation"
},
{
"name": "Blacklist"
},
{
"name": "CMS (legacy)"
},
{
"name": "CMS Blocks"
},
{
"name": "CMS Frameworks"
},
{
"name": "CMS Messages"
},
{
"name": "CMS Templates"
},
{
"name": "Contact"
},
{
"name": "Content"
},
{
"name": "Coupon"
},
{
"name": "Draft Message"
},
{
"name": "Ecommerce"
},
{
"name": "Group"
},
{
"name": "Group Attributes"
},
{
"name": "Landing Page"
},
{
"name": "Member Attributes"
},
{
"name": "Membership"
},
{
"name": "Message"
},
{
"name": "Meta"
},
{
"name": "Mobile Push"
},
{
"name": "Prepared Message"
},
{
"name": "Process"
},
{
"name": "Profile Attributes"
},
{
"name": "Related Data"
},
{
"name": "Segmentation"
},
{
"name": "System"
},
{
"name": "System User"
},
{
"name": "Usage Statistics"
},
{
"name": "User"
},
{
"name": "Whiteboard"
}
],
"paths": {
"/membership/getByEmail": {
"get": {
"tags": [
"Membership"
],
"summary": "Get a membership by email",
"description": "Retrieves the membership information of a contact identified by email in a group specified by groupId.",
"operationId": "getByEmail",
"parameters": [
{
"name": "email",
"in": "query",
"description": "Email of the user.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "groupId",
"in": "query",
"description": "ID of the group.",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "Example response:
{
\"userId\": 18223800009,
\"groupId\": 1800190005,
\"attributes\": [{
\"name\": \"member.bounceCounter\",
\"value\": \"0\"
}, {
\"name\": \"member.type\",
\"value\": \"normal\"
}, {
\"name\": \"member.readMode\",
\"value\": \"mail\"
}, {
\"name\": \"member.creationDate\",
\"value\": \"2015-07-21 16:10:30.0\"
}, {
\"name\": \"member.bounced\",
\"value\": \"false\"
}, {
\"name\": \"member.role\",
\"value\": \"member\"
}, {
\"name\": \"member.messageCounter\",
\"value\": \"0\"
}, {
\"name\": \"member.systemWideDeactivated\",
\"value\": \"false\"
}]
}",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Membership"
}
}
}
},
"400": {
"description": "Bad email or group, for example:
{
\"errorActor\": \"CLIENT\",
\"errorCode\": \"NO_SUCH_OBJECT\",
\"message\": \"User with email=no.email@example.com does not exist.\",
\"objectType\": \"User\",
\"propertyName\": \"email\",
\"propertyValue\": \"no.email@example.com\"
}{
\"errorActor\": \"CLIENT\",
\"errorCode\": \"NO_SUCH_OBJECT\",
\"message\": \"Membership with membership=userId:18152367016/groupId:2400792595 does not exist.\",
\"objectType\": \"Membership\",
\"propertyName\": \"membership\",
\"propertyValue\": \"userId:18152367016/groupId:2400792595\"
}",
"content": {
"application/json": {}
}
}
}
}
}
},
"components": {
"schemas": {
"Membership": {
"type": "object",
"properties": {
"userId": {
"type": "integer",
"format": "int64"
},
"groupId": {
"type": "integer",
"format": "int64"
},
"attributes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attribute"
}
}
}
},
"Attribute": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}
}
````