SmartDocumentor
  • Overview
    • SmartDocumentor
  • GETTING STARTED
    • About SmartDocumentor
    • How SmartDocumentor Works
    • Main concepts
      • Workspaces
      • Organization
    • Quickstart 101
    • Licenses
      • How to Buy?
      • Support
    • Privacy
    • Security
  • Technical
    • Initial Setup
    • Mappings
    • API Reference
      • [POST] Client Credentials Access Token
      • [GET] Task Status
      • [GET] Task Status List
      • [GET] Task Status List Paginated
      • [GET] Get Workspaces
      • [PATCH] Reprocess Task
      • [POST] Create Task
      • [POST] Create Batch
      • [GET] Get Batch
      • [GET] Get Batch Paginated
      • Transcripts
        • Speakers
          • Workspaces
            • [GET] Workspace Speakers
            • [PUT] Workspace Speakers
          • Tasks
            • [GET] Task Speakers
            • [POST] Task Speaker
            • [PUT] Task Speaker
            • [DELETE] Task Speaker
      • Invite Users
        • [GET] List Available Roles
        • Tenants
          • [GET] List All Tenant Users
          • [POST] Invite Users
        • Workspaces
          • [GET] List All Workspace Users
          • [POST] Invite Users
    • Folder Worker
    • Export
      • Webhooks
        • Webhook (Text Documents)
        • Webhook (Transcripts)
        • Webhook Url To File (Transcripts)
        • Webhook Url to File (Anonymization)
    • Changelog
  • FAQs
    • FAQs
Powered by GitBook
On this page
  • Invite Users
  • Body application/json InviteUsersRequest
  • Body application/json ExternalUserModel
  • Example Request
  • Responses
  1. Technical
  2. API Reference
  3. Invite Users
  4. Workspaces

[POST] Invite Users

Use this request to invite one or more users to the current tenant and workspace by assigning them a role.

Invite Users

POST/api/v1.0/external/sdworkspace/inviteusers

Body application/json InviteUsersRequest

Name
Type
Description

users

array of ExternalUserModel

List of users to be invited to the current tenant. Each entry must contain a valid email and role name. Duplicate emails are not allowed.

workspaceId

integer

The ID of the workspace.

Body application/json ExternalUserModel

Name
Type
Description

email

string

The user's email address. Must be unique and properly formatted.

roleName

string

The name of the role to assign. Must match one of the available roles from the /availableroles endpoint.

Example Request

curl -X 'POST' \
'https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/inviteusers' \
  --header 'Authorization: Bearer {your access token here}' \
  --header 'accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "workspaceId": 1,
  "users": [
    {
      "email": "mail@email.com",
      "roleName": "Administrator"
    }
  ]
}'
var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Post, "https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/inviteusers");
request.Headers.Add("Authorization", "Bearer {your access token here}");
request.Headers.Add("Accept", "application/json");

var content = new StringContent("{\r\n  \"workspaceId\": 1,\r\n  \"users\": [\r\n    {\r\n      \"email\": \"mail@email.com\",\r\n      \"roleName\": \"Administrator\"\r\n    }\r\n  ]\r\n}", null, "application/json");
request.Content = content;

var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();

Console.WriteLine(await response.Content.ReadAsStringAsync());
import requests
import json

url = "https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/inviteusers"

payload = json.dumps({
  "workspaceId": 1,
  "users": [
    {
      "email": "mail@email.com",
      "roleName": "Administrator"
    }
  ]
})
headers = {
  'Authorization': 'Bearer {your access token here}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {your access token here}");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");

var raw = JSON.stringify({
  "workspaceId": 1,
  "users": [
    {
      "email": "mail@email.com",
      "roleName": "Some Name"
    }
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw
};

fetch("https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/inviteusers", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Responses

Response Body Empty

Indicates that the operation was successful and a invitation email will be sent to the invited user(s).

{
  "title": "Bad Request",
  "status": 400,
  "detail": "The email address 'string' is not valid."
}
{
  "title": "Internal Server Error",
  "status": 500,
  "detail": "A server error occurred while processing your request. Please try again later. Trace ID:"
}

Previous[GET] List All Workspace UsersNextFolder Worker

Last updated 24 days ago

Response Body

Response Body

Problem Detail JSON Object
Problem Detail JSON Object