POST
/
open
/
workspaces
/
{workspaceId}
/
users
/
add
curl --request POST \
  --url https://api.opnform.com/open/workspaces/{workspaceId}/users/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jsmith@example.com",
  "role": "admin"
}'

Add Workspace User

Invite an existing OpnForm user to a workspace or send an email invite if the user doesn’t yet have an account.

Authentication & Scope

Requires the workspace-users-write ability and admin privileges in the workspace.

Request

POST /open/workspaces/{workspaceId}/users/add HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>

Path Parameters

ParameterTypeDescription
workspaceIdnumberID of the target workspace.

Body Parameters

FieldTypeRequiredDescription
emailstringYesEmail address of the user to add/invite.
rolestringYesRole to assign (admin, user, or readonly).

Example:

{
  "email": "jane@example.com",
  "role": "user"
}

Response

200 OK – One of the following messages:

  • "User has been successfully added to workspace." – when the user account already exists.
  • "Registration invitation email sent to user." – when an invitation email was sent.
  • "User is already in workspace." – if the user is already a member.

The response structure:

{
  "message": "User has been successfully added to workspace."
}

403 Forbidden – Token lacks workspace-users-write or insufficient privileges.

Authorizations

Authorization
string
header
required

Personal Access Token

Path Parameters

workspaceId
string
required

Body

application/json

Response

200

User added