`
You should use the public keys on the SDKs and the secret keys to authenticate API requests.
**Do not share or include your secret API keys on client side code.** Your API keys carry significant privileges. Please ensure to keep them 100% secure and be sure to not share your secret API keys in areas that are publicly accessible like GitHub.
Learn how to set the Authorization header inside Postman https://learning.postman.com/docs/postman/sending-api-requests/authorization/#api-key
Go to Unify to grab your API KEY https://app.apideck.com/unify/api-keys
applicationId:
type: apiKey
in: header
name: x-apideck-app-id
description: The ID of your Unify application
consumerId:
type: apiKey
in: header
name: x-apideck-consumer-id
description: The ID of the consumer which you want to get or push data from
paths:
/crm/companies:
get:
tags:
- Companies
operationId: companiesAll
summary: List companies
description: List companies
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/companiesFilter'
- $ref: '#/components/parameters/companiesSort'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: When using a filter or sorting for companies, Hubspot will only return a maximum of 10.000 companies.
- connector: salesforce
description: If you set the limit below 200, Salesforce will only return a maximum of 2.000 companies. To retrieve more than 2.000 companies, it is recommended to fetch 200 items per page.
responses:
'200':
$ref: '#/components/responses/GetCompaniesResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.companiesAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Companies
operationId: companiesAdd
summary: Create company
description: Create company
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Company'
responses:
'201':
$ref: '#/components/responses/CreateCompanyResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
company: {
name: 'SpaceX',
owner_id: '12345',
image: 'https://www.spacex.com/static/images/share.jpg',
description:
'Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.',
vat_number: 'BE0689615164',
currency: 'USD',
status: 'Open',
fax: '+12129876543',
annual_revenue: '+$35m',
number_of_employees: '500-1000',
industry: 'Apparel',
ownership: 'Public',
sales_tax_number: '12456EN',
payee_number: '78932EN',
abn_or_tfn: '46 115 614 695',
abn_branch: '123',
acn: 'XXX XXX XXX',
first_name: 'Elon',
last_name: 'Musk',
bank_accounts: [
{
bank_name: 'Monzo',
account_number: '123465',
account_name: 'SPACEX LLC',
account_type: 'credit_card',
iban: 'CH2989144532982975332',
bic: 'AUDSCHGGXXX',
routing_number: '012345678',
bsb_number: '062-001',
branch_identifier: '001',
bank_code: 'BNH',
currency: 'USD'
}
],
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
row_type: {
id: '12345',
name: 'Customer Account'
},
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: ['New'],
read_only: false,
salutation: 'Mr',
birthday: '2000-08-12'
}
}
try {
const { data } = await apideck.crm.companiesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/companies/{id}:
get:
tags:
- Companies
operationId: companiesOne
summary: Get company
description: Get company
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetCompanyResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.companiesOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Companies
operationId: companiesUpdate
summary: Update company
description: Update company
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Company'
responses:
'200':
$ref: '#/components/responses/UpdateCompanyResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
company: {
name: 'SpaceX',
owner_id: '12345',
image: 'https://www.spacex.com/static/images/share.jpg',
description:
'Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.',
vat_number: 'BE0689615164',
currency: 'USD',
status: 'Open',
fax: '+12129876543',
annual_revenue: '+$35m',
number_of_employees: '500-1000',
industry: 'Apparel',
ownership: 'Public',
sales_tax_number: '12456EN',
payee_number: '78932EN',
abn_or_tfn: '46 115 614 695',
abn_branch: '123',
acn: 'XXX XXX XXX',
first_name: 'Elon',
last_name: 'Musk',
bank_accounts: [
{
bank_name: 'Monzo',
account_number: '123465',
account_name: 'SPACEX LLC',
account_type: 'credit_card',
iban: 'CH2989144532982975332',
bic: 'AUDSCHGGXXX',
routing_number: '012345678',
bsb_number: '062-001',
branch_identifier: '001',
bank_code: 'BNH',
currency: 'USD'
}
],
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
row_type: {
id: '12345',
name: 'Customer Account'
},
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: ['New'],
read_only: false,
salutation: 'Mr',
birthday: '2000-08-12'
}
}
try {
const { data } = await apideck.crm.companiesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Companies
operationId: companiesDelete
summary: Delete company
description: Delete company
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeleteCompanyResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.companiesDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/contacts:
get:
tags:
- Contacts
operationId: contactsAll
summary: List contacts
description: List contacts
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/contactsFilter'
- $ref: '#/components/parameters/contactsSort'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: When using a filter or sorting for contacts, Hubspot will only return a maximum of 10.000 contacts.
- connector: salesforce
description: If you set the limit below 200, Salesforce will only return a maximum of 2.000 contacts. To retrieve more than 2.000 contacts, it is recommended to fetch 200 items per page.
responses:
'200':
$ref: '#/components/responses/GetContactsResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.contactsAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Contacts
operationId: contactsAdd
summary: Create contact
description: Create contact
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: When creating a contact, it is advised to always include an unique email address since Hubspot uses it to prevent duplicate contacts in HubSpot. More info on the [Hubspot developer docs](https://developers.hubspot.com/docs/api/crm/contacts).
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
responses:
'201':
$ref: '#/components/responses/CreateContactResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
contact: {
name: 'Elon Musk',
owner_id: '54321',
type: 'personal',
company_id: '23456',
company_name: '23456',
lead_id: '34567',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
title: 'CEO',
department: 'Engineering',
language: 'EN',
gender: 'female',
birthday: '2000-08-12',
image: 'https://unavatar.io/elon-musk',
photo_url: 'https://unavatar.io/elon-musk',
lead_source: 'Cold Call',
fax: '+12129876543',
description: 'Internal champion',
current_balance: 10.5,
status: 'open',
active: true,
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
email_domain: 'gmail.com',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: ['New']
}
}
try {
const { data } = await apideck.crm.contactsAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/contacts/{id}:
get:
tags:
- Contacts
operationId: contactsOne
summary: Get contact
description: Get contact
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetContactResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.contactsOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Contacts
operationId: contactsUpdate
summary: Update contact
description: Update contact
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Contact'
responses:
'200':
$ref: '#/components/responses/UpdateContactResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
contact: {
name: 'Elon Musk',
owner_id: '54321',
type: 'personal',
company_id: '23456',
company_name: '23456',
lead_id: '34567',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
title: 'CEO',
department: 'Engineering',
language: 'EN',
gender: 'female',
birthday: '2000-08-12',
image: 'https://unavatar.io/elon-musk',
photo_url: 'https://unavatar.io/elon-musk',
lead_source: 'Cold Call',
fax: '+12129876543',
description: 'Internal champion',
current_balance: 10.5,
status: 'open',
active: true,
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
email_domain: 'gmail.com',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: ['New']
}
}
try {
const { data } = await apideck.crm.contactsUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Contacts
operationId: contactsDelete
summary: Delete contact
description: Delete contact
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeleteContactResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.contactsDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/opportunities:
get:
tags:
- Opportunities
operationId: opportunitiesAll
summary: List opportunities
description: List opportunities
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/opportunitiesFilter'
- $ref: '#/components/parameters/opportunitiesSort'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: When using a filter or sorting for opportunities, Hubspot will only return a maximum of 10.000 opportunities and omit the company_id, primary_contact_id, company_id, contact_ids, lead_id and contact_id.
- connector: salesforce
description: If you set the limit below 200, Salesforce will only return a maximum of 2.000 opportunities. To retrieve more than 2.000 opportunities, it is recommended to fetch 200 items per page.
responses:
'200':
$ref: '#/components/responses/GetOpportunitiesResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.opportunitiesAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Opportunities
operationId: opportunitiesAdd
summary: Create opportunity
description: Create opportunity
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Opportunity'
responses:
'201':
$ref: '#/components/responses/CreateOpportunityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
opportunity: {
title: 'New Rocket',
primary_contact_id: '12345',
description:
'Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.',
type: 'Existing Customer - Upgrade',
monetary_amount: 75000,
currency: 'USD',
win_probability: 40,
close_date: '2020-10-30',
loss_reason_id: '12345',
loss_reason: 'No budget',
won_reason_id: '12345',
won_reason: 'Best pitch',
pipeline_id: '12345',
pipeline_stage_id: '12345',
source_id: '12345',
lead_id: '12345',
lead_source: 'Website',
contact_id: '12345',
contact_ids: ['12345'],
company_id: '12345',
company_name: 'Copper',
owner_id: '12345',
priority: 'None',
status: 'Open',
status_id: '12345',
tags: ['New'],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
stage_last_changed_at: '2020-09-30T07:43:32.000Z'
}
}
try {
const { data } = await apideck.crm.opportunitiesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/opportunities/{id}:
get:
tags:
- Opportunities
operationId: opportunitiesOne
summary: Get opportunity
description: Get opportunity
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetOpportunityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.opportunitiesOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Opportunities
operationId: opportunitiesUpdate
summary: Update opportunity
description: Update opportunity
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Opportunity'
responses:
'200':
$ref: '#/components/responses/UpdateOpportunityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
opportunity: {
title: 'New Rocket',
primary_contact_id: '12345',
description:
'Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.',
type: 'Existing Customer - Upgrade',
monetary_amount: 75000,
currency: 'USD',
win_probability: 40,
close_date: '2020-10-30',
loss_reason_id: '12345',
loss_reason: 'No budget',
won_reason_id: '12345',
won_reason: 'Best pitch',
pipeline_id: '12345',
pipeline_stage_id: '12345',
source_id: '12345',
lead_id: '12345',
lead_source: 'Website',
contact_id: '12345',
contact_ids: ['12345'],
company_id: '12345',
company_name: 'Copper',
owner_id: '12345',
priority: 'None',
status: 'Open',
status_id: '12345',
tags: ['New'],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
stage_last_changed_at: '2020-09-30T07:43:32.000Z'
}
}
try {
const { data } = await apideck.crm.opportunitiesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Opportunities
operationId: opportunitiesDelete
summary: Delete opportunity
description: Delete opportunity
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeleteOpportunityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.opportunitiesDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/leads:
get:
tags:
- Leads
operationId: leadsAll
summary: List leads
description: List leads
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/leadsFilter'
- $ref: '#/components/parameters/leadsSort'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: When using a filter or sorting for leads, Hubspot will only return a maximum of 10.000 leads.
- connector: salesforce
description: If you set the limit below 200, Salesforce will only return a maximum of 2.000 leads. To retrieve more than 2.000 leads, it is recommended to fetch 200 items per page.
responses:
'200':
$ref: '#/components/responses/GetLeadsResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.leadsAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Leads
operationId: leadsAdd
summary: Create lead
description: Create lead
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: When creating a lead, it is advised to always include an unique email address since Hubspot uses it to prevent duplicate contacts in HubSpot. More info on the [Hubspot developer docs](https://developers.hubspot.com/docs/api/crm/contacts).
- connector: pipedrive
description: When creating a lead, it is required to include an existing `company_id`. More info on the [Pipedrive developer docs](https://pipedrive.readme.io/docs/adding-a-lead).
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Lead'
responses:
'201':
$ref: '#/components/responses/CreateLeadResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
lead: {
name: 'Elon Musk',
company_name: 'Spacex',
owner_id: '54321',
company_id: '2',
lead_id: '2',
lead_source: 'Cold Call',
first_name: 'Elon',
last_name: 'Musk',
description: 'A thinker',
prefix: 'Sir',
title: 'CEO',
language: 'EN',
status: 'New',
monetary_amount: 75000,
currency: 'USD',
fax: '+12129876543',
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: ['New']
}
}
try {
const { data } = await apideck.crm.leadsAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/leads/{id}:
get:
tags:
- Leads
operationId: leadsOne
summary: Get lead
description: Get lead
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetCrmLeadResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.leadsOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Leads
operationId: leadsUpdate
summary: Update lead
description: Update lead
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Lead'
responses:
'200':
$ref: '#/components/responses/UpdateLeadResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
lead: {
name: 'Elon Musk',
company_name: 'Spacex',
owner_id: '54321',
company_id: '2',
lead_id: '2',
lead_source: 'Cold Call',
first_name: 'Elon',
last_name: 'Musk',
description: 'A thinker',
prefix: 'Sir',
title: 'CEO',
language: 'EN',
status: 'New',
monetary_amount: 75000,
currency: 'USD',
fax: '+12129876543',
websites: [
{
id: '12345',
url: 'http://example.com',
type: 'primary'
}
],
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
social_links: [
{
id: '12345',
url: 'https://www.twitter.com/apideck',
type: 'twitter'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
],
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
tags: ['New']
}
}
try {
const { data } = await apideck.crm.leadsUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Leads
operationId: leadsDelete
summary: Delete lead
description: Delete lead
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeleteLeadResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.leadsDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/pipelines:
get:
tags:
- Pipelines
operationId: pipelinesAll
summary: List pipelines
description: List pipelines
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetPipelinesResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.pipelinesAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Pipelines
operationId: pipelinesAdd
summary: Create pipeline
description: Create pipeline
x-apideck-upcoming: true
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Pipeline'
responses:
'201':
$ref: '#/components/responses/CreatePipelineResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
pipeline: {
id: 'default',
name: 'Sales Pipeline',
currency: 'USD',
archived: false,
active: false,
display_order: 1,
win_probability_enabled: true,
stages: [
{
name: 'Contract Sent',
value: 'CONTRACT_SENT',
win_probability: 50,
display_order: 1
}
]
}
}
try {
const { data } = await apideck.crm.pipelinesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/pipelines/{id}:
get:
tags:
- Pipelines
operationId: pipelinesOne
summary: Get pipeline
description: Get pipeline
x-apideck-upcoming: true
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetPipelineResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.pipelinesOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Pipelines
operationId: pipelinesUpdate
summary: Update pipeline
description: Update pipeline
x-apideck-upcoming: true
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Pipeline'
responses:
'200':
$ref: '#/components/responses/UpdatePipelineResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
pipeline: {
id: 'default',
name: 'Sales Pipeline',
currency: 'USD',
archived: false,
active: false,
display_order: 1,
win_probability_enabled: true,
stages: [
{
name: 'Contract Sent',
value: 'CONTRACT_SENT',
win_probability: 50,
display_order: 1
}
]
}
}
try {
const { data } = await apideck.crm.pipelinesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Pipelines
operationId: pipelinesDelete
summary: Delete pipeline
description: Delete pipeline
x-apideck-upcoming: true
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeletePipelineResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.pipelinesDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/notes:
get:
tags:
- Notes
operationId: notesAll
summary: List notes
description: List notes
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetNotesResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-gotchas:
- connector: salesforce
description: If you set the limit below 200, Salesforce will only return a maximum of 2.000 notes. To retrieve more than 2.000 notes, it is recommended to fetch 200 items per page.
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.notesAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Notes
operationId: notesAdd
summary: Create note
description: Create note
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
x-apideck-gotchas:
- connector: salesforce
description: When creating a note in Salesforce, you can only associate it with one resource (such as a lead, company or opportunity) at a time. You cannot combine multiple resources or associate the note with more than one resource in a single API call.
- connector: close
description: When creating a note in Close, the content of the note should be sent in html surrounded by the tags and at least other inner element. If these tags are not sent, unify will surround the note with and tags.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Note'
responses:
'201':
$ref: '#/components/responses/CreateNoteResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
note: {
title: 'Meeting Notes',
content: 'Office hours are 9AM-6PM',
owner_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
active: true
}
}
try {
const { data } = await apideck.crm.notesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/notes/{id}:
get:
tags:
- Notes
operationId: notesOne
summary: Get note
description: Get note
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetNoteResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.notesOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Notes
operationId: notesUpdate
summary: Update note
description: Update note
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
x-apideck-gotchas:
- connector: close
description: When updating a note in Close, the content of the note should be sent in html surrounded by the
tags and at least other inner element. If these tags are not sent, unify will surround the note with and tags.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Note'
responses:
'200':
$ref: '#/components/responses/UpdateNoteResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
note: {
title: 'Meeting Notes',
content: 'Office hours are 9AM-6PM',
owner_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
active: true
}
}
try {
const { data } = await apideck.crm.notesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Notes
operationId: notesDelete
summary: Delete note
description: Delete note
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeleteNoteResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.notesDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/users:
get:
tags:
- Users
operationId: usersAll
summary: List users
description: List users
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: HubSpot owners are mapped to CRM users in Apideck. HubSpot owners and HubSpot users (people who can log into HubSpot) aren't necessarily the same, as you may have owners created through an integration.
- connector: salesforce
description: If you set the limit below 200, Salesforce will only return a maximum of 2.000 users. To retrieve more than 2.000 users, it is recommended to fetch 200 items per page.
responses:
'200':
$ref: '#/components/responses/GetUsersResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.usersAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Users
operationId: usersAdd
summary: Create user
description: Create user
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'201':
$ref: '#/components/responses/CreateUserResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
user: {
parent_id: '54321',
username: 'masterofcoin',
first_name: 'Elon',
last_name: 'Musk',
title: 'CEO',
division: 'Europe',
department: 'R&D',
company_name: 'SpaceX',
employee_number: '123456-AB',
description: 'A description',
image: 'https://logo.clearbit.com/spacex.com?s=128',
language: 'EN',
status: 'active',
password: 'supersecretpassword',
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
]
}
}
try {
const { data } = await apideck.crm.usersAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/users/{id}:
get:
tags:
- Users
operationId: usersOne
summary: Get user
description: Get user
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetUserResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.usersOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Users
operationId: usersUpdate
summary: Update user
description: Update user
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
responses:
'200':
$ref: '#/components/responses/UpdateUserResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
user: {
parent_id: '54321',
username: 'masterofcoin',
first_name: 'Elon',
last_name: 'Musk',
title: 'CEO',
division: 'Europe',
department: 'R&D',
company_name: 'SpaceX',
employee_number: '123456-AB',
description: 'A description',
image: 'https://logo.clearbit.com/spacex.com?s=128',
language: 'EN',
status: 'active',
password: 'supersecretpassword',
addresses: [
{
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
}
],
phone_numbers: [
{
id: '12345',
country_code: '1',
area_code: '323',
number: '111-111-1111',
extension: '105',
type: 'primary'
}
],
emails: [
{
id: '123',
email: 'elon@musk.com',
type: 'primary'
}
]
}
}
try {
const { data } = await apideck.crm.usersUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Users
operationId: usersDelete
summary: Delete user
description: Delete user
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeleteUserResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.usersDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/activities:
get:
tags:
- Activities
operationId: activitiesAll
summary: List activities
description: List activities
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/cursor'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/activitiesFilter'
- $ref: '#/components/parameters/activitiesSort'
- $ref: '#/components/parameters/passThrough'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
x-apideck-gotchas:
- connector: hubspot
description: Hubspot will only return activities from the last 30 days when using the `filter[updated_since]` parameter, with a maximum of 10.000 records. More info [here](https://legacydocs.hubspot.com/docs/methods/engagements/get-recent-engagements).
- connector: salesforce
description: If you set the limit below 200, Salesforce will only return a maximum of 2.000 activities. To retrieve more than 2.000 activities, it is recommended to fetch 200 items per page.
responses:
'200':
$ref: '#/components/responses/GetActivitiesResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.activitiesAll({})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
post:
tags:
- Activities
operationId: activitiesAdd
summary: Create activity
description: Create activity
parameters:
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Activity'
responses:
'201':
$ref: '#/components/responses/CreateActivityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
activity: {
activity_datetime: '2021-05-01T12:00:00.000Z',
duration_seconds: 1800,
user_id: '12345',
account_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
owner_id: '12345',
campaign_id: '12345',
case_id: '12345',
asset_id: '12345',
contract_id: '12345',
product_id: '12345',
solution_id: '12345',
custom_object_id: '12345',
type: 'meeting',
title: 'Meeting',
description: 'More info about the meeting',
note: 'An internal note about the meeting',
location: 'Space',
location_address: {
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
},
all_day_event: false,
private: true,
group_event: true,
event_sub_type: 'debrief',
group_event_type: 'Proposed',
child: false,
archived: false,
deleted: false,
show_as: 'busy',
done: false,
start_datetime: '2021-05-01T12:00:00.000Z',
end_datetime: '2021-05-01T12:30:00.000Z',
activity_date: '2021-05-01',
end_date: '2021-05-01',
recurrent: false,
reminder_datetime: '2021-05-01T17:00:00.000Z',
reminder_set: false,
video_conference_url: 'https://us02web.zoom.us/j/88120759396',
video_conference_id: 'zoom:88120759396',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
attendees: [
{
name: 'Elon Musk',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
email_address: 'elon@musk.com',
is_organizer: true,
status: 'accepted'
}
]
}
}
try {
const { data } = await apideck.crm.activitiesAdd(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
/crm/activities/{id}:
get:
tags:
- Activities
operationId: activitiesOne
summary: Get activity
description: Get activity
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
- $ref: '#/components/parameters/fields'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/GetActivityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.activitiesOne({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
patch:
tags:
- Activities
operationId: activitiesUpdate
summary: Update activity
description: Update activity
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Activity'
responses:
'200':
$ref: '#/components/responses/UpdateActivityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
const params = {
id: 'id_example',
activity: {
activity_datetime: '2021-05-01T12:00:00.000Z',
duration_seconds: 1800,
user_id: '12345',
account_id: '12345',
contact_id: '12345',
company_id: '12345',
opportunity_id: '12345',
lead_id: '12345',
owner_id: '12345',
campaign_id: '12345',
case_id: '12345',
asset_id: '12345',
contract_id: '12345',
product_id: '12345',
solution_id: '12345',
custom_object_id: '12345',
type: 'meeting',
title: 'Meeting',
description: 'More info about the meeting',
note: 'An internal note about the meeting',
location: 'Space',
location_address: {
id: '123',
type: 'primary',
string: '25 Spring Street, Blackburn, VIC 3130',
name: 'HQ US',
line1: 'Main street',
line2: 'apt #',
line3: 'Suite #',
line4: 'delivery instructions',
street_number: '25',
city: 'San Francisco',
state: 'CA',
postal_code: '94104',
country: 'US',
latitude: '40.759211',
longitude: '-73.984638',
county: 'Santa Clara',
contact_name: 'Elon Musk',
salutation: 'Mr',
phone_number: '111-111-1111',
fax: '122-111-1111',
email: 'elon@musk.com',
website: 'https://elonmusk.com',
notes: 'Address notes or delivery instructions.',
row_version: '1-12345'
},
all_day_event: false,
private: true,
group_event: true,
event_sub_type: 'debrief',
group_event_type: 'Proposed',
child: false,
archived: false,
deleted: false,
show_as: 'busy',
done: false,
start_datetime: '2021-05-01T12:00:00.000Z',
end_datetime: '2021-05-01T12:30:00.000Z',
activity_date: '2021-05-01',
end_date: '2021-05-01',
recurrent: false,
reminder_datetime: '2021-05-01T17:00:00.000Z',
reminder_set: false,
video_conference_url: 'https://us02web.zoom.us/j/88120759396',
video_conference_id: 'zoom:88120759396',
custom_fields: [
{
id: '2389328923893298',
name: 'employee_level',
description: 'Employee Level',
value: 'Uses Salesforce and Marketo'
}
],
attendees: [
{
name: 'Elon Musk',
first_name: 'Elon',
middle_name: 'D.',
last_name: 'Musk',
prefix: 'Mr.',
suffix: 'PhD',
email_address: 'elon@musk.com',
is_organizer: true,
status: 'accepted'
}
]
}
}
try {
const { data } = await apideck.crm.activitiesUpdate(params)
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
delete:
tags:
- Activities
operationId: activitiesDelete
summary: Delete activity
description: Delete activity
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/consumerId'
- $ref: '#/components/parameters/applicationId'
- $ref: '#/components/parameters/serviceId'
- $ref: '#/components/parameters/raw'
security:
- apiKey: []
responses:
'200':
$ref: '#/components/responses/DeleteActivityResponse'
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'402':
$ref: '#/components/responses/PaymentRequiredResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'422':
$ref: '#/components/responses/UnprocessableResponse'
default:
$ref: '#/components/responses/UnexpectedErrorResponse'
x-apideck-api: crm
x-codeSamples:
- lang: TypeScript
label: Node
source: |
import { Apideck } from '@apideck/node'
const apideck = new Apideck({
apiKey: 'REPLACE_WITH_API_KEY',
appId: 'REPLACE_WITH_APP_ID',
consumerId: 'REPLACE_WITH_CONSUMER_ID'
})
try {
const { data } = await apideck.crm.activitiesDelete({
id: 'id_example'
})
console.log('API called successfully', data)
} catch (error) {
console.error(error)
}
x-webhooks:
x-sdk-exclude: true
ActivityCreated:
post:
summary: Activity Created
description: Event broadcast when an activity has been created.
operationId: activityCreated
x-apideck-event-type: crm.activity.created
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.activity.created
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/activities/123456ASDF
entity_type: activity
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
ActivityUpdated:
post:
summary: Activity Updated
description: Event broadcast when an activity has been updated.
operationId: activityUpdated
x-apideck-event-type: crm.activity.updated
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.activity.updated
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/activities/123456ASDF
entity_type: activity
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
ActivityDeleted:
post:
summary: Activity Deleted
description: Event broadcast when an activity has been deleted.
operationId: activityDeleted
x-apideck-event-type: crm.activity.deleted
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.activity.deleted
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/activities/123456ASDF
entity_type: activity
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
CompanyCreated:
post:
summary: Company Created
description: Event broadcast when a company has been created.
operationId: companyCreated
x-apideck-event-type: crm.company.created
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.company.created
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/companies/123456ASDF
entity_type: company
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
CompanyUpdated:
post:
summary: Company Updated
description: Event broadcast when a company has been updated.
operationId: companyUpdated
x-apideck-event-type: crm.company.updated
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.company.updated
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/companies/123456ASDF
entity_type: company
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
CompanyDeleted:
post:
summary: Company Deleted
description: Event broadcast when a company has been deleted.
operationId: companyDeleted
x-apideck-event-type: crm.company.deleted
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.company.deleted
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/companies/123456ASDF
entity_type: company
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
ContactCreated:
post:
summary: Contact Created
description: Event broadcast when a contact has been created.
operationId: contactCreated
x-apideck-event-type: crm.contact.created
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.contact.created
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/contacts/123456ASDF
entity_type: contact
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
ContactUpdated:
post:
summary: Contact Updated
description: Event broadcast when a contact has been updated.
operationId: contactUpdated
x-apideck-event-type: crm.contact.updated
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.contact.updated
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/contacts/123456ASDF
entity_type: contact
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
ContactDeleted:
post:
summary: Contact Deleted
description: Event broadcast when a contact has been deleted.
operationId: contactDeleted
x-apideck-event-type: crm.contact.deleted
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.contact.deleted
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/contacts/123456ASDF
entity_type: contact
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
LeadCreated:
post:
summary: Lead Created
description: Event broadcast when a lead has been created.
operationId: leadCreated
x-apideck-event-type: crm.lead.created
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.lead.created
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/leads/123456ASDF
entity_type: lead
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
LeadUpdated:
post:
summary: Lead Updated
description: Event broadcast when a lead has been updated.
operationId: leadUpdated
x-apideck-event-type: crm.lead.updated
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.lead.updated
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/leads/123456ASDF
entity_type: lead
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
LeadDeleted:
post:
summary: Lead Deleted
description: Event broadcast when a lead has been deleted.
operationId: leadDeleted
x-apideck-event-type: crm.lead.deleted
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.lead.deleted
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/leads/123456ASDF
entity_type: lead
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
NoteCreated:
post:
summary: Note Created
description: Event broadcast when a note has been created.
operationId: noteCreated
x-apideck-event-type: crm.note.created
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.note.created
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/notes/123456ASDF
entity_type: note
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
NoteUpdated:
post:
summary: Note Updated
description: Event broadcast when a note has been updated.
operationId: noteUpdated
x-apideck-event-type: crm.note.updated
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.note.updated
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/notes/123456ASDF
entity_type: note
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
NoteDeleted:
post:
summary: Note Deleted
description: Event broadcast when a note has been deleted.
operationId: noteDeleted
x-apideck-event-type: crm.note.deleted
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.note.deleted
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/notes/123456ASDF
entity_type: note
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
OpportunityCreated:
post:
summary: Opportunity Created
description: Event broadcast when an opportunity has been created.
operationId: opportunityCreated
x-apideck-event-type: crm.opportunity.created
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.opportunity.created
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/opportunities/123456ASDF
entity_type: opportunity
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
OpportunityUpdated:
post:
summary: Opportunity Updated
description: Event broadcast when an opportunity has been updated.
operationId: opportunityUpdated
x-apideck-event-type: crm.opportunity.updated
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.opportunity.updated
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/opportunities/123456ASDF
entity_type: opportunity
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []
OpportunityDeleted:
post:
summary: Opportunity Deleted
description: Event broadcast when an opportunity has been deleted.
operationId: opportunityDeleted
x-apideck-event-type: crm.opportunity.deleted
parameters:
- name: x-apideck-event-type
in: header
required: true
description: The type of event that was triggered
schema:
$ref: '#/components/schemas/CrmEventType'
- name: x-apideck-idempotency-key
in: header
required: true
description: An idempotency key is a unique value generated to recognize subsequent retries/duplicates of the same request.
schema:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
tags:
- Webhook Events
requestBody:
content:
application/json:
schema:
type: object
properties:
payload:
$ref: '#/components/schemas/CrmWebhookEvent'
example:
payload:
event_type: crm.opportunity.deleted
unified_api: crm
service_id: hubspot
consumer_id: test_user_id
event_id: d290f1ee-6c54-4b01-90e6-d701748f0851
entity_id: 123456ASDF
entity_url: https://unify.apideck.com/crm/opportunities/123456ASDF
entity_type: opportunity
occurred_at: '2020-01-01T00:00:00.000Z'
responses:
'200':
description: Return a 200 status to indicate that the data was received successfully.
security: []