Skip to main content
GET
/
open
/
workspaces
/
{workspaceId}
/
invites
List Workspace Invites
curl --request GET \
  --url https://api.opnform.com/open/workspaces/{workspaceId}/invites \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.opnform.com/open/workspaces/{workspaceId}/invites"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.opnform.com/open/workspaces/{workspaceId}/invites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opnform.com/open/workspaces/{workspaceId}/invites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.opnform.com/open/workspaces/{workspaceId}/invites"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.opnform.com/open/workspaces/{workspaceId}/invites")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.opnform.com/open/workspaces/{workspaceId}/invites")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "id": 123,
    "email": "jsmith@example.com",
    "valid_until": "2023-11-07T05:31:56Z"
  }
]

List Workspace Invites

Retrieve all pending or accepted invitations for a workspace.

Authentication & Scope

Requires workspace admin access. For Personal Access Tokens, the token must include the workspaces-write ability and the token owner must be an admin of the workspace. Non-admin workspace members and tokens with only workspace-users-read cannot list invites.

Request

GET /open/workspaces/{workspaceId}/invites HTTP/1.1
Host: api.opnform.com
Authorization: Bearer <token>

Path Parameters

ParameterTypeDescription
workspaceIdnumberID of the workspace.

Response

200 OK – Array of Invite objects.
[
  {
    "id": 55,
    "email": "invitee@example.com",
    "role": "user",
    "status": "pending",
    "valid_until": "2024-06-25T23:59:59Z"
  }
]
403 Forbidden – You are not a workspace admin, or your token lacks workspaces-write.

Authorizations

Authorization
string
header
required

Personal Access Token

Path Parameters

workspaceId
string
required

Response

Successful

id
number
email
string<email>
role
enum<string>
Available options:
admin,
user,
readonly
status
enum<string>
Available options:
pending,
accepted
valid_until
string<date-time>

Expiration timestamp for the invite