Members
Members are users who have been given access to a specified Deepgram Project. Members are assigned Scopes, which determine what they can do in their assigned Project. Members can be assigned to multiple Projects and have different Scopes for each Project.
Get Members Retrieves account objects for all of the accounts in the specified project.
Required account scope(s): project:read
. Required project scope(s): project:read
, members:read
, admins:read
, owners:read
.
Path Parameters Unique identifier of the project for which you want to get members.
Responses Status
Description 200 Success
Members found.
Response Schema members: array
Array of Members.
member_id: uuid
Unique identifier of member.
first_name: string
First name of member. Optional.
last_name: string
Last name of member. Optional.
scopes: array
Project scopes associated with member.
email: string
Email address of member.
GET /projects/ {project_id}/members
Get Members
curl Node.js Python .NET Ruby PHP
# cURL
curl --request GET \
--url 'https://api.deepgram.com/v1/projects/{project_id}/members' \
--header 'Authorization: Token <YOUR_DEEPGRAM_API_KEY>' \
--header 'content-type: application/json'
# python
import http.client
conn = http.client.HTTPSConnection( "api.deepgram.com" )
headers = {
'Authorization' : "Token <YOUR_DEEPGRAM_API_KEY>" ,
'content-type' : "application/json"
}
conn.request( "GET" , "/v1/projects/ {project_id} /members" , headers = headers)
res = conn.getresponse()
data = res.read()
print (data.decode( "utf-8" ))
// .NET
var client = new RestClient ( "https://api.deepgram.com/v1/projects/{project_id}/members" );
var request = new RestRequest (Method.GET);
request. AddHeader ( "Authorization" , "Token <YOUR_DEEPGRAM_API_KEY>" );
request. AddHeader ( "content-type" , "application/json" );
IRestResponse response = client. Execute (request);
// Node.js
const http = require ( 'https' )
const options = {
method: 'GET' ,
hostname: 'api.deepgram.com' ,
port: null ,
path: '/v1/projects/{project_id}/members' ,
headers: {
Authorization: 'Token <YOUR_DEEPGRAM_API_KEY>' ,
'content-type' : 'application/json' ,
},
}
const req = http. request (options, function ( res ) {
const chunks = []
res. on ( 'data' , function ( chunk ) {
chunks. push (chunk)
})
res. on ( 'end' , function () {
const body = Buffer. concat (chunks)
console. log (body. toString ())
})
})
req. end ()
# PHP
<? php
$curl = curl_init ();
curl_setopt_array ($curl, [
CURLOPT_URL => "https://api.deepgram.com/v1/projects/{project_id}/members" ,
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: Token <YOUR_DEEPGRAM_API_KEY>" ,
"content-type: application/json"
],
]);
$response = curl_exec ($curl);
$err = curl_error ($curl);
curl_close ($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
# Ruby
require 'uri'
require 'net/http'
require 'openssl'
url = URI ( "https://api.deepgram.com/v1/projects/{project_id}/members" )
http = Net :: HTTP . new (url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL :: SSL :: VERIFY_NONE
request = Net :: HTTP :: Get . new (url)
request[ "Authorization" ] = 'Token <YOUR_DEEPGRAM_API_KEY>'
request[ "content-type" ] = 'application/json'
response = http.request(request)
puts response.read_body
{
"members" : [
{
"member_id" : "uuid" ,
"first_name" : "string" ,
"last_name" : "string" ,
"scopes" : [
"string"
],
"email" : "string"
}
]
}
Remove Member Removes the specified account from the specified project. API keys created by this member for the specified project will also be deleted.
If the account being removed has scope member
, then the requesting account must have scope members:write:kick
. If the account being removed has scope admin, then the requesting account must have scope admins:write:kick
. If the account being removed has scope owner
, then the requesting account must have scope owners:write:kick. The account being removed must not be the sole account with the scope owner.
Required account scope(s): project:write
. Required project scopes(s): members:write:kick
or admins:write:kick
or owners:write:kick
.
Path Parameters Unique identifier of the project that contains the account you want to remove.
Unique identifier of the account that you want to remove.
Responses Status
Description 200 Success
Account removed.
DELETE /projects/ {project_id} /members/ {member_id}
Remove Member
curl Node.js Python .NET Ruby PHP
# cURL
curl --request DELETE \
--url 'https://api.deepgram.com/v1/projects/{project_id}/members/{member_id}' \
--header 'Authorization: Token <YOUR_DEEPGRAM_API_KEY>' \
--header 'content-type: application/json'
# python
import http.client
conn = http.client.HTTPSConnection( "api.deepgram.com" )
headers = {
'Authorization' : "Token <YOUR_DEEPGRAM_API_KEY>" ,
'content-type' : "application/json"
}
conn.request( "DELETE" , "/v1/projects/ {project_id} /members/ {member_id} " , headers = headers)
res = conn.getresponse()
data = res.read()
print (data.decode( "utf-8" ))
// .NET
var client = new RestClient ( "https://api.deepgram.com/v1/projects/{project_id}/members/{member_id}" );
var request = new RestRequest (Method.DELETE);
request. AddHeader ( "Authorization" , "Token <YOUR_DEEPGRAM_API_KEY>" );
request. AddHeader ( "content-type" , "application/json" );
IRestResponse response = client. Execute (request);
// Node.js
const http = require ( 'https' )
const options = {
method: 'DELETE' ,
hostname: 'api.deepgram.com' ,
port: null ,
path: '/v1/projects/{project_id}/members/{member_id}' ,
headers: {
Authorization: 'Token <YOUR_DEEPGRAM_API_KEY>' ,
'content-type' : 'application/json' ,
},
}
const req = http. request (options, function ( res ) {
const chunks = []
res. on ( 'data' , function ( chunk ) {
chunks. push (chunk)
})
res. on ( 'end' , function () {
const body = Buffer. concat (chunks)
console. log (body. toString ())
})
})
req. end ()
# PHP
<? php
$curl = curl_init ();
curl_setopt_array ($curl, [
CURLOPT_URL => "https://api.deepgram.com/v1/projects/{project_id}/members/{member_id}" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => " DELETE " ,
CURLOPT_HTTPHEADER => [
"Authorization: Token <YOUR_DEEPGRAM_API_KEY>" ,
"content-type: application/json"
],
]);
$response = curl_exec ($curl);
$err = curl_error ($curl);
curl_close ($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
# Ruby
require 'uri'
require 'net/http'
require 'openssl'
url = URI ( "https://api.deepgram.com/v1/projects/{project_id}/members/{member_id}" )
http = Net :: HTTP . new (url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL :: SSL :: VERIFY_NONE
request = Net :: HTTP :: Delete . new (url)
request[ "Authorization" ] = 'Token <YOUR_DEEPGRAM_API_KEY>'
request[ "content-type" ] = 'application/json'
response = http.request(request)
puts response.read_body