> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

## Group Space Memberships

**Space memberships** represent the relationship between a single Contentful user and a space within your organization. In other words, they are the data object that defines explicitly who is a member of which space.

### Get all space memberships in a space

[Get all space memberships in a space](/references/user-management-api/space-memberships/get-all-space-memberships-for-a-space)

This endpoint returns a paginated list of all the space memberships in a space.

All space members can access this endopint.

#### Query Parameters

| Name            | Details                      | Description                                                                                                                                      |
| --------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `skip`, `limit` | -                            | Specify requested page of result set. See [Pagination](#/introduction/pagination) for more details.                                              |
| `include`       | Supported values: `sys.user` | Specify linked resources to include in response. See [Including Related Resources](#/introduction/including-related-resources) for more details. |

#### Response

```js
{
    "total": 1,
    "limit": 25,
    "skip": 0,
    "sys": {
        "type": "Array"
    },
    "items": [
        {
            "admin": false,
            "sys": {
                "type": "SpaceMembership",
                "id": "jn066pnp3hgr-7uqvFPPLzgtVaezGvjA9U6",
                "version": 0,
                "createdAt": "2013-04-11T20:04:37Z",
                "updatedAt": "2014-05-11T20:04:37Z",
                "createdBy": {
                    "sys": {
                        "type": "Link",
                        "linkType": "User",
                        "id": "3Z6OpTgoCqMTwQ331UvyF4"
                    }
                },
                "updatedBy": {
                    "sys": {
                        "type": "Link",
                        "linkType": "User",
                        "id": "6i5or8iabD6qwHCK7JgGLn"
                    }
                },
                "space": {
                    "sys": {
                        "type": "Link",
                        "linkType": "Space",
                        "id": "jn066pnp3hgr"
                    }
                },
                "user": {
                    "sys": {
                        "type": "Link",
                        "linkType": "User",
                        "id": "7uqvFPPLzgtVaezGvjA9U6"
                    }
                },
            },
            "roles": [
                {
                    "sys": {
                        "type": "Link",
                        "linkType": "Role",
                        "id": "1ElgCn1mi1UHSBLTP2v4TD"
                    }
                }
            ]
        }
    ]
}
```

### Get all space memberships in an organization

[Get all space memberships in an organization](/references/user-management-api/space-memberships/get-all-space-memberships-for-an-organization)

This endpoint returns a paginated list of all space memberships across all spaces in the organization.

Only organization admins and owners can access this endpoint.

#### Query Parameters

| Name            | Details                                                                                        | Description                                                                                                                                                                                                       |
| --------------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `skip`, `limit` | -                                                                                              | Specify requested page of result set. See [Pagination](#/introduction/pagination) for more details.                                                                                                               |
| `order`         | Supported values: `sys.createdAt`, `sys.user.firstName`, `sys.user.lastName`, `sys.user.email` | Specify sort order of result set. See [Sorting Results](#/introduction/sorting-results) for more details.                                                                                                         |
| `include`       | Supported values: `roles`, `sys.user`, `sys.createdBy`, `sys.updatedBy`, `sys.space`           | Specify linked resources to include in response. See [Including Related Resources](#/introduction/including-related-resources) for more details.                                                                  |
| `query`         | Fields searched: `sys.user.id`, `sys.user.firstName`, `sys.user.lastName`, `sys.user.email`    | Specify a string to search for matching resources against. See [Searching Multiple Attributes](#/introduction/searching-multiple-attributes) for more details.                                                    |
| Filters         | See section below                                                                              | Specify a value to filter against for the provided attribute. See [Filtering Results](#/introduction/filtering-results) for more information, and below for details about supported attributes for this endpoint. |

#### Filter Parameters

See [Filtering Results](#/introduction/filtering-results) for details about how to use attributes and operators to construct query filters.

| Attribute                           | Supported Operators        | Supported Values |
| ----------------------------------- | -------------------------- | ---------------- |
| `admin`                             | `eq`, `ne`                 | Boolean          |
| `roles.sys.id`                      | `eq`, `in`                 | String (id)      |
| `roles.name`                        | `eq`, `ne`, `nin`, `match` | String           |
| `sys.user.sys.id`                   | `eq`, `ne`, `in`, `nin`    | String (id)      |
| `sys.space.sys.id`                  | `eq`, `ne`, `in`, `nin`    | String (id)      |
| `sys.space.name`                    | `eq`, `ne`, `in`, `nin`    | String           |
| `sys.organizationMembership.sys.id` | `eq`, `ne`, `in`, `nin`    | String (id)      |
| `sys.createdAt`                     | `lt`, `lte`, `gt`, `gte`   | Datetime string  |
| `sys.updatedAt`                     | `lt`, `lte`, `gt`, `gte`   | Datetime string  |

#### Response

```js
{
    "total": 1,
    "limit": 25,
    "skip": 0,
    "sys": {
        "type": "Array"
    },
    "items": [
        {
            "admin": false,
            "sys": {
                "type": "SpaceMembership",
                "id": "jn066pnp3hgr-7uqvFPPLzgtVaezGvjA9U6",
                "version": 0,
                "createdAt": "2013-04-11T20:04:37Z",
                "updatedAt": "2014-05-11T20:04:37Z",
                "createdBy": {
                    "sys": {
                        "type": "Link",
                        "linkType": "User",
                        "id": "3Z6OpTgoCqMTwQ331UvyF4"
                    }
                },
                "updatedBy": {
                    "sys": {
                        "type": "Link",
                        "linkType": "User",
                        "id": "6i5or8iabD6qwHCK7JgGLn"
                    }
                },
                "space": {
                    "sys": {
                        "type": "Link",
                        "linkType": "Space",
                        "id": "jn066pnp3hgr"
                    }
                },
                "user": {
                    "sys": {
                        "type": "Link",
                        "linkType": "User",
                        "id": "7uqvFPPLzgtVaezGvjA9U6"
                    }
                }
            },
            "roles": [
                {
                    "sys": {
                        "type": "Link",
                        "linkType": "Role",
                        "id": "1ElgCn1mi1UHSBLTP2v4TD"
                    }
                }
            ]
        }
    ]
}
```

### Get a single space membership

[Get a single space membership (space-scoped)](/references/user-management-api/space-memberships/get-a-space-membership-for-a-space)

[Get a single space membership (organization-scoped)](/references/user-management-api/space-memberships/get-a-space-membership-for-an-organization)

These endpoints return details about an existing space membership.

The first endpoint (scoped to a space) is accessible to all space members; the second (scoped to an organization) is accessible only to organization admin and owners.

#### Response

```js
{
    "admin": false,
    "sys": {
        "type": "SpaceMembership",
        "id": "jn066pnp3hgr-7uqvFPPLzgtVaezGvjA9U6",
        "version": 0,
        "createdAt": "2013-04-11T20:04:37Z",
        "updatedAt": "2014-05-11T20:04:37Z",
        "space": {
            "sys": {
                "type": "Link",
                "linkType": "Space",
                "id": "jn066pnp3hgr"
            }
        },
        "createdBy": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "34BcPDYW0r6kwCJV2lYevQ"
            }
        },
        "updatedBy": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "34BcPDYW0r6kwCJV2lYevQ"
            }
        },
        "user": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "7uqvFPPLzgtVaezGvjA9U6"
            }
        }
    },
    "roles": [
        {
            "sys": {
                "type": "Link",
                "linkType": "Role",
                "id": "1ElgCn1mi1UHSBLTP2v4TD"
            }
        }
    ]
}
```

### Create a space membership

[Create a space membership](/references/user-management-api/space-memberships/create-a-space-membership)

Use this endpoint to create a space membership. A user can either be designated as an admin or assigned to one or more roles. The user must already exist in the organization.

Only organization admins, owners, and space admins can access this endpoint.

**Note:** For legacy reasons, the user you are creating a space membership for needs to be identified by their email address. This email address *must* match the email address of the user associated with an existing organization membership in your organization.

#### Request Body

| Parameter | Type        | Usage                                                                                                                        |
| --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `admin`   | boolean     | required                                                                                                                     |
| `roles`   | array(Role) | required; must contain at least one role if admin is `false` (see also [Roles](/references/content-management-api/overview)) |
| `email`   | string      | required                                                                                                                     |

#### Response

```js
{
    "admin": false,
    "sys": {
        "type": "SpaceMembership",
        "id": "jn066pnp3hgr-7uqvFPPLzgtVaezGvjA9U6",
        "version": 0,
        "createdAt": "2013-04-11T20:04:37Z",
        "updatedAt": "2013-04-11T20:04:37Z",
        "space": {
            "sys": {
                "type": "Link",
                "linkType": "Space",
                "id": "jn066pnp3hgr"
            }
        },
        "createdBy": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "34BcPDYW0r6kwCJV2lYevQ"
            }
        },
        "updatedBy": null,
        "user": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "7uqvFPPLzgtVaezGvjA9U6"
            }
        }
    },
    "roles": [
        {
            "sys": {
                "type": "Link",
                "linkType": "Role",
                "id": "1ElgCn1mi1UHSBLTP2v4TD"
            }
        }
    ]
}
```

### Update a space membership

[Update a space membership](/references/user-management-api/space-memberships/update-a-space-membership)

This endpoint updates a space membership. Use this to change the roles for a user or make them an admin within the space.

Only organization admins, owners, and space admins can access this endpoint.

#### Request Body

| Parameter | Type        | Usage                                                                                                                        |
| --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `admin`   | boolean     | required                                                                                                                     |
| `roles`   | array(Role) | required; must contain at least one role if admin is `false` (see also [Roles](/references/content-management-api/overview)) |
| `email`   | string      | required                                                                                                                     |

#### Response

```js
{
    "admin": false,
    "sys": {
        "type": "SpaceMembership",
        "id": "jn066pnp3hgr-7uqvFPPLzgtVaezGvjA9U6",
        "version": 0,
        "createdAt": "2013-04-11T20:04:37Z",
        "updatedAt": "2014-05-11T20:04:37Z",
        "space": {
            "sys": {
                "type": "Link",
                "linkType": "Space",
                "id": "jn066pnp3hgr"
            }
        },
        "createdBy": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "34BcPDYW0r6kwCJV2lYevQ"
            }
        },
        "updatedBy": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "34BcPDYW0r6kwCJV2lYevQ"
            }
        },
        "user": {
            "sys": {
                "type": "Link",
                "linkType": "User",
                "id": "7uqvFPPLzgtVaezGvjA9U6"
            }
        }
    },
    "roles": [
        {
            "sys": {
                "type": "Link",
                "linkType": "Role",
                "id": "1ElgCn1mi1UHSBLTP2v4TD"
            }
        }
    ]
}
```

### Delete a space membership

[Delete a space membership](/references/user-management-api/space-memberships/delete-a-space-membership)

This endpoint deletes a space membership.

Only organization admins, owners, and space admins can access this endpoint. The user associated with the space membership also has access to this endpoint (so that they have permission to remove themselves from an organization).

#### Response

```headers
Status: 204 No Content
```