Cosmoner Docs
API Reference

Members

API reference for project membership, invitations, and billing responsibility.

Get My Role

GET /v1/projects/:projectId/members/me

Returns the current user's role in the project.

Auth: Required (member)

List Members

GET /v1/projects/:projectId/members

Returns all members, pending invitations, and biller info.

Auth: Required (member, scope: members:read)

Invite Member

POST /v1/projects/:projectId/members

Auth: Required (write access, scope: members:write)

Request Body:

{
  "email": "[email protected]",
  "role": "developer"
}

Remove Member

DELETE /v1/projects/:projectId/members/:memberId

Auth: Required (write access, scope: members:write)

The project's biller cannot be removed while they hold billing responsibility. Attempting to remove them returns 409 with a code of BILLER_CANNOT_LEAVE — transfer billing to another member first.

Update Member Role

PATCH /v1/projects/:projectId/members/:memberId/role

Auth: Required (write access, scope: members:write)

Request Body:

{
  "role": "admin"
}

Valid roles: viewer, developer, admin, owner

Cancel Invitation

DELETE /v1/projects/:projectId/members/invitations/:invitationId

Auth: Required (write access, scope: members:write)


Billing Responsibility Transfer

Initiate Transfer

POST /v1/projects/:projectId/members/biller/transfer

Transfers billing responsibility to another member. The nominated member is notified (email + in-app) with a link to accept. Accepting and declining also notify the outgoing biller.

Before initiating a transfer, the outgoing biller can optionally refund any remaining project credit to their payment method via Refund Credit Balance — otherwise the credit stays with the project for the incoming biller. That refund is issued minus non-recoverable payment-processing (transaction) fees, so the amount received is less than the credit balance; see Refund Credit Balance for details.

Accept Transfer

POST /v1/projects/:projectId/members/biller/accept

Accepting a transfer requires the new biller to add a payment method to the project. First create an org setup intent (POST /v1/projects/:projectId/billing/setup-intent) and confirm the card in the browser, then pass the resulting payment method id here.

Request Body:

{
  "paymentMethodId": "pm_..."
}

The supplied card becomes the project's new default. The previous biller's card is detached once the transfer commits.

Decline Transfer

POST /v1/projects/:projectId/members/biller/decline

On this page