---
title: "Create project memberships"
method: POST
path: "/admin/simple/accounts/projects/memberships/"
tags: ["Admin"]
---

# Create project memberships

`POST /admin/simple/accounts/projects/memberships/`

## Request body

- AdminSimpleAccountsProjectsMembershipsCreate
  - `options` AdminAccountCreateOptions
    - `dry_run` boolean, nullable
    - `idempotency_key` string, nullable
    - `create_identities` boolean, nullable
    - `create_api_keys` boolean, nullable
    - `return_api_keys` boolean, nullable
    - `seed_defaults` boolean, nullable
    - `reason` string, nullable
  - `membership` AdminProjectMembershipCreate, required
    - `project_ref` EntityRef, required — Polymorphic reference that can point to a request-local key, an existing persisted ID, a stable slug, or an email address. Exactly one field must be set.
      - `ref` string, nullable
      - `id` string, nullable
      - `slug` string, nullable
      - `email` string, nullable
    - `user_ref` EntityRef, required — Polymorphic reference that can point to a request-local key, an existing persisted ID, a stable slug, or an email address. Exactly one field must be set.
      - `ref` string, nullable
      - `id` string, nullable
      - `slug` string, nullable
      - `email` string, nullable
    - `role` string, required

## Response `200`

Successful Response

- AdminAccountsResponse
  - `accounts` AdminAccountRead[]
    - `users` object
    - `user_identities` object
    - `organizations` object
    - `workspaces` object
    - `projects` object
    - `organization_memberships` object
    - `workspace_memberships` object
    - `project_memberships` object
    - `subscriptions` object, nullable
    - `api_keys` object, nullable
  - `errors` AdminStructuredError[], nullable
    - `code` string, required
    - `message` string, required
    - `details` object, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-08** `5e6f53ce5d08` — 1 breaking, 2 info
  - removed `#/components/schemas/AdminAccountCreateOptionsDTO` from the `options` request property `anyOf` list
  - api operation id `admin_create_project_membership` removed and replaced with `create_project_membership_admin_simple_accounts_projects_memberships__post`
  - added `#/components/schemas/AdminAccountCreateOptions` to the `options` request property `anyOf` list
- **2026-04-16** `8b06b786c977` — 1 info
  - endpoint added
- **2025-06-27** `e3e84db47198` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/admin/simple/accounts/projects/memberships/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/713e4f3b7519/schema)
