---
title: "POST /CreateMembership"
method: POST
path: "/CreateMembership"
---

# POST /CreateMembership

`POST /CreateMembership`

Creates a new membership, granting a user access to an agent space within an application.

## Request body

- object
  - `applicationId` string, required — Application identifier.
  - `agentSpaceId` string, required — Unique identifier of the agent space.
  - `membershipId` string, required — Member identifier.
  - `memberType` 'USER', required — Type of membership.
  - `config` object — The configuration for a membership. This is a union type that contains member-type-specific configuration.
    - `user` object — The user configuration for the membership.
      - `role` 'MEMBER' — The role assigned to the user. Currently, only MEMBER is supported.

## Response `200`

Success

- CreateMembershipResponse — Response structure for adding a single member to an agent space.

---

[API](https://skmtc.net/aws/apis/securityagent.md) · [All operations](https://skmtc.net/aws/apis/securityagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/securityagent/versions/cad56717d636/schema)
