Skip to main content

Overview

Team Members

View and manage all workspace members

Invitations

Send email invitations to new team members

Role Management

Assign owner, admin, or member roles

List Members

GET/v1/members
Retrieve all members of a workspace.

Query Parameters

workspaceId
string
required
The workspace ID to list members for
curl "https://www.unosend.co/api/v1/members?workspaceId=org_550e8400-e29b-41d4-a716" \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "data": [
    {
      "id": "mem_123",
      "role": "owner",
      "joined_at": "2024-01-01T00:00:00.000Z",
      "user": {
        "id": "user_123",
        "email": "owner@example.com",
        "full_name": "John Owner",
        "avatar_url": "https://..."
      }
    },
    {
      "id": "mem_456",
      "role": "admin",
      "joined_at": "2024-01-15T00:00:00.000Z",
      "user": {
        "id": "user_456",
        "email": "admin@example.com",
        "full_name": "Jane Admin",
        "avatar_url": null
      }
    }
  ]
}

Invite Member

POST/v1/members
Send an email invitation to add a new member to the workspace.

Request Body

email
string
required
Email address of the person to invite
workspaceId
string
required
Workspace to invite them to
role
string
default:"member"
Role to assign: admin or member
curl -X POST https://www.unosend.co/api/v1/members \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newmember@example.com",
    "workspaceId": "org_550e8400-e29b-41d4-a716",
    "role": "member"
  }'

Response

201 Created
{
  "data": {
    "id": "inv_789",
    "email": "newmember@example.com",
    "role": "member",
    "expires_at": "2024-01-22T00:00:00.000Z",
    "created_at": "2024-01-15T00:00:00.000Z"
  }
}
Invitations expire after 7 days. The invited person will receive an email with a link to join the workspace.

Update Member Role

PATCH/v1/members/:id
Change a member’s role in the workspace. Requires owner or admin role.
curl -X PATCH https://www.unosend.co/api/v1/members/mem_456 \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "workspaceId": "org_550e8400-e29b-41d4-a716",
    "role": "admin"
  }'

Response

200 OK
{
  "data": {
    "id": "mem_456",
    "role": "admin",
    "updated_at": "2024-01-16T00:00:00.000Z"
  }
}

Remove Member

DELETE/v1/members/:id
Remove a member from the workspace. Requires owner or admin role.
curl -X DELETE "https://www.unosend.co/api/v1/members/mem_456?workspaceId=org_550e8400-e29b-41d4-a716" \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "data": {
    "removed": true,
    "id": "mem_456"
  }
}
Removing a member immediately revokes their access to the workspace. They will need a new invitation to rejoin.

List Pending Invitations

GET/v1/invitations
Retrieve all pending invitations for a workspace.
curl "https://www.unosend.co/api/v1/invitations?workspaceId=org_550e8400-e29b-41d4-a716" \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "data": [
    {
      "id": "inv_789",
      "email": "pending@example.com",
      "role": "member",
      "created_at": "2024-01-15T00:00:00.000Z",
      "expires_at": "2024-01-22T00:00:00.000Z",
      "invited_by": {
        "full_name": "John Owner",
        "email": "owner@example.com"
      }
    }
  ]
}

Cancel Invitation

DELETE/v1/invitations/:id
Cancel a pending invitation before it’s accepted.
curl -X DELETE "https://www.unosend.co/api/v1/invitations?invitationId=inv_789&workspaceId=org_550e8400-e29b-41d4-a716" \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "data": {
    "cancelled": true,
    "id": "inv_789"
  }
}
Cancelled invitations cannot be reinstated. You’ll need to send a new invitation if needed.