All URIs are relative to https://api.pandadoc.com
| Method | HTTP request | Description |
|---|---|---|
| addMember | POST /public/v1/workspaces/{workspace_id}/members | Add Member to Workspace |
| createApiKey | POST /public/v1/workspaces/{workspace_id}/api-keys | Create API Key |
| createUser | POST /public/v1/users | Create User |
| createWorkspace | POST /public/v1/workspaces | Create Workspace |
| deactivateWorkspace | POST /public/v1/workspaces/{workspace_id}/deactivate | Deactivate Workspace |
| getWorkspacesList | GET /public/v1/workspaces | List Workspaces |
| listUsers | GET /public/v1/users | List Users |
| removeMember | DELETE /public/v1/workspaces/{workspace_id}/members/{member_id} | Remove Member from Workspace |
AddMemberResponse addMember(addMemberRequest)
Add an existing user to a workspace. - You must be an organization admin or a workspace admin to add members.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiAddMemberRequest = {
// string
workspaceId: "BhVzRcxH9Z2LgfPPGXFUBa",
// AddMemberRequest
addMemberRequest: {
userId: "2eWSKSvVqmuVCnuUK3iWwD",
role: "Member",
},
// boolean | Send a confirmation email to the user that was added to workspace(s). (optional)
notifyUser: true,
// boolean | Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. (optional)
notifyWsAdmins: false,
};
apiInstance.addMember(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| addMemberRequest | AddMemberRequest | ||
| workspaceId | [string] | defaults to undefined | |
| notifyUser | [boolean] | Send a confirmation email to the user that was added to workspace(s). | (optional) defaults to undefined |
| notifyWsAdmins | [boolean] | Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. | (optional) defaults to undefined |
AddMemberResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | OK | - |
| 400 | Bad Request | - |
| 401 | Authentication error | - |
| 403 | Permission error | - |
| 404 | Not found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
CreateApiKeyResponse createApiKey(createApiKeyRequest)
Generate a new API key for the workspace. Check out API Key Authentication article for detailed API Keys description. > 📘 > - Only an Org Admin can generate an API keys. > - To make another user a key's owner, pass user_id of this user. The user should has an Admin role in the workspace. > - Generating a new key invalidates existing key with the same type. Using this request, you can deactivate the key you're using for the request.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiCreateApiKeyRequest = {
// string | Workspace id.
workspaceId: "BhVzRcxH9Z2LgfPPGXFUBa",
// CreateApiKeyRequest
createApiKeyRequest: {
userId: "2eWSKSvVqmuVCnuUK3iWwD",
type: "sandbox",
},
};
apiInstance.createApiKey(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| createApiKeyRequest | CreateApiKeyRequest | ||
| workspaceId | [string] | Workspace id. | defaults to undefined |
CreateApiKeyResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Authentication error | - |
| 403 | Permission error | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
CreateUserResponse createUser(createUserRequest)
Create users, and assign them roles, licenses, and workspaces. - You must be an organization admin to create users. - We check that the user email domain matches your organization domain. - We check that the user email and phone number have a valid format.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiCreateUserRequest = {
// CreateUserRequest
createUserRequest: {
user: {
email: "email@example.com",
firstName: "John",
lastName: "Doe",
phoneNumber: "+14842634627",
},
workspaces: [
{
workspaceId: "2eWSKSvVqmuVCnuUK3iWwD",
role: "Member",
},
],
license: "Full",
},
// boolean | Send a confirmation email to the user that was added to workspace(s). (optional)
notifyUser: true,
// boolean | Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. (optional)
notifyWsAdmins: false,
};
apiInstance.createUser(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| createUserRequest | CreateUserRequest | ||
| notifyUser | [boolean] | Send a confirmation email to the user that was added to workspace(s). | (optional) defaults to undefined |
| notifyWsAdmins | [boolean] | Send a confirmation email to all workspace admins indicating that the user has been added to the workspace. | (optional) defaults to undefined |
CreateUserResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | OK | - |
| 400 | Bad Request | - |
| 401 | Authentication error | - |
| 403 | Permission error | - |
| 404 | Not found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
CreateWorkspaceResponse createWorkspace(createWorkspaceRequest)
Create a workspace in your organization. - You need to be an Org Admin to create a workspace. - You will be added to the new workspace with an Admin role.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiCreateWorkspaceRequest = {
// CreateWorkspaceRequest
createWorkspaceRequest: {
name: "A new workspace",
},
};
apiInstance.createWorkspace(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| createWorkspaceRequest | CreateWorkspaceRequest |
CreateWorkspaceResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | OK | - |
| 401 | Authentication error | - |
| 403 | Permission error | - |
| 404 | Not found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
any deactivateWorkspace()
Deactivate the workspace, remove all the members from it and make it unavailable.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiDeactivateWorkspaceRequest = {
// string
workspaceId: "BhVzRcxH9Z2LgfPPGXFUBa",
// any (optional)
body: {},
};
apiInstance.deactivateWorkspace(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| body | any | ||
| workspaceId | [string] | defaults to undefined |
any
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Workspace was deactivated successfully. | - |
| 401 | Authentication error | - |
| 403 | Permission error | - |
| 404 | Not found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
ListWorkspacesResponse getWorkspacesList()
Get a list of all the active workspaces in the organization.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiGetWorkspacesListRequest = {
// number | Number of elements in page. (optional)
count: 10,
// number | Page number. (optional)
page: 1,
};
apiInstance.getWorkspacesList(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| count | [number] | Number of elements in page. | (optional) defaults to 50 |
| page | [number] | Page number. | (optional) defaults to 1 |
ListWorkspacesResponse
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Page of workspaces | - |
| 401 | Authentication error | - |
| 403 | Permission error | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
ListUsersResponse listUsers()
Get a list of all users with membership in your organization, with their contact information, license type, and workspace roles. You must be an organization admin to list users.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiListUsersRequest = {
// number | Number of elements in page. (optional)
count: 10,
// number | Page number. (optional)
page: 1,
// boolean | Filter option - show users with removed memberships. (optional)
showRemoved: false,
};
apiInstance.listUsers(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| count | [number] | Number of elements in page. | (optional) defaults to 50 |
| page | [number] | Page number. | (optional) defaults to 1 |
| showRemoved | [boolean] | Filter option - show users with removed memberships. | (optional) defaults to true |
ListUsersResponse
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Page of users. | - |
| 401 | Authentication error | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to README]
void removeMember()
This operation removes a specified member from a workspace by providing the workspace ID and member ID.
import * as pd_api from 'pandadoc-node-client';
// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
{ authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.UserAndWorkspaceManagementApi(configuration);
const body:pd_api.UserAndWorkspaceManagementApiRemoveMemberRequest = {
// string | Workspace id
workspaceId: "BhVzRcxH9Z2LgfPPGXFUBa",
// string | Member id
memberId: "nPh2PDhFdDqAES9k64h9qX",
};
apiInstance.removeMember(body).then((data) => {
console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| workspaceId | [string] | Workspace id | defaults to undefined |
| memberId | [string] | Member id | defaults to undefined |
void
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
| 400 | Bad Request | - |
| 401 | Authentication error | - |
| 403 | Permission error | - |
| 404 | Bad Request | - |
| 429 | Too Many Requests | - |