All URIs are relative to https://api.pandadoc.com
Method | HTTP request | Description |
---|---|---|
addMember | POST /public/v1/workspaces/{workspace_id}/members | Add member |
createUser | POST /public/v1/users | Create User |
createWorkspace | POST /public/v1/workspaces | Create Workspace |
AddMemberResponse addMember(addMemberRequest)
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: "Admin",
},
// 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: true,
};
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]
CreateUserResponse createUser(createUserRequest)
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 protected]",
firstName: "John",
lastName: "Doe",
phoneNumber: "+14842634627",
},
workspaces: [
{
workspaceId: "2eWSKSvVqmuVCnuUK3iWwD",
role: "Admin",
},
],
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: true,
};
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)
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 | - |