Members
List pending invitations
Lists invitations that have been sent but not yet accepted. Accepted members appear in GET /org/members instead; a pending invitation appears in neither until this endpoint. Revoke one with DELETE /org/members/{id}, passing the orginv_… id.
GET
/
api
/
v2
/
org
/
members
/
invitations
List pending invitations
curl --request GET \
--url https://app.octolens.com/api/v2/org/members/invitations \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.octolens.com/api/v2/org/members/invitations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.octolens.com/api/v2/org/members/invitations', 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://app.octolens.com/api/v2/org/members/invitations",
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://app.octolens.com/api/v2/org/members/invitations"
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://app.octolens.com/api/v2/org/members/invitations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octolens.com/api/v2/org/members/invitations")
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{
"data": [
{
"id": "orginv_3Ciq0qskipF0g0gxlfLckBtnXk2",
"email": "<string>",
"role": "member",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}Authorizations
Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>. Keys carry a scope — read, write (implies read) or admin (implies write) — chosen when the key is minted. Each operation's security requirement (and its x-required-scope extension) names the minimum scope it needs; request the least-privileged key that covers the operations you call.
Response
200 response
Invitations to the authenticated organization that have not been accepted yet.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
List pending invitations
curl --request GET \
--url https://app.octolens.com/api/v2/org/members/invitations \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.octolens.com/api/v2/org/members/invitations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.octolens.com/api/v2/org/members/invitations', 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://app.octolens.com/api/v2/org/members/invitations",
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://app.octolens.com/api/v2/org/members/invitations"
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://app.octolens.com/api/v2/org/members/invitations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octolens.com/api/v2/org/members/invitations")
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{
"data": [
{
"id": "orginv_3Ciq0qskipF0g0gxlfLckBtnXk2",
"email": "<string>",
"role": "member",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"status": 404,
"details": [
"<unknown>"
],
"upgradeUrl": "https://app.octolens.com/me/upgrade?src=agents",
"upgradeCommand": "octolens upgrade"
}
}