The deepgram.scopes object provides access to the scopes endpoints of the Deepgram API. Each request is project based and will require a project_id.

List Member Scopes

You can retrieve all scopes of a member on a given project using the scopes.get function.

List Member Scopes Parameters

ParameterTypeDescription
project_idStringA unique identifier for the project you wish to see the member scopes of
member_idStringA unique identifier for the member you wish to see member scopes of

List Member Scopes Example Request

const response = await deepgram.scopes.get(PROJECT_ID, MEMBER_ID);

List Member Scopes Response

{
  scopes: string[]
}

Update Member Scope

You can update the scope of a member on a given project using the scopes.update function.

Update Member Scope Parameters

ParameterTypeDescription
project_idStringA unique identifier for the project you wish to update the member scopes of
member_idStringA unique identifier for the member you wish to update member scopes of
scopesStringThe scope you wish to update the member to

Update Member Scope Example Request

const response = await deepgram.scopes.update(PROJECT_ID, MEMBER_ID, "member");

Update Member Scope Response

{
    message: string;
}