@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api CRM API
@base https://unify.apideck.com
@version 10.24.14
@auth ApiKey Authorization in header | ApiKey x-apideck-app-id in header | ApiKey x-apideck-consumer-id in header
@common_fields {x-apideck-consumer-id: str # ID of the consumer which you want to get or push data from, x-apideck-app-id: str # The ID of your Unify application, raw: bool=false # Include raw response. Mostly used for debugging purposes, x-apideck-service-id: str # Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.}
@endpoints 50
@hint download_for_search
@toc crm(50)

@endpoint GET /crm/companies
@desc List companies
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Companies
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/companies
@desc Create company
@required {name: str # Name of the company}
@optional {id: str # Unique identifier for the company, interaction_count: int # Number of interactions, owner_id: str # Owner ID, image: str # The Image URL of the company, description: str # A description of the company, vat_number: str # The VAT number of the company, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., status: str # The status of the company, fax: str # The fax number of the company, annual_revenue: str # The annual revenue of the company, number_of_employees: str # Number of employees, industry: str # The industry represents the type of business the company is in., ownership: str # The ownership indicates the type of ownership of the company., sales_tax_number: str # A sales tax number is a unique number that identifies a company for tax purposes., payee_number: str # A payee number is a unique number that identifies a payee for tax purposes., abn_or_tfn: str # An ABN is necessary for operating a business, while a TFN (Tax File Number) is required for any person working in Australia., abn_branch: str # An ABN Branch (also known as a GST Branch) is used if part of your business needs to account for GST separately from its parent entity., acn: str # The Australian Company Number (ACN) is a nine digit number with the last digit being a check digit calculated using a modified modulus 10 calculation. ASIC has adopted a convention of always printing and displaying the ACN in the format XXX XXX XXX; three blocks of three characters, each block separated by a blank., first_name: str # The first name of the person., last_name: str # The last name of the person., parent_id: str # Parent ID, bank_accounts: [map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}], websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], row_type: map{id: str, name: str}, custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], read_only: bool # Whether the company is read-only or not, last_activity_at: str(date-time) # Last activity date, deleted: bool # Whether the company is deleted or not, salutation: str # A formal salutation for the person. For example, 'Mr', 'Mrs', birthday: str(date) # The date of birth of the person., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # Updated by user ID, created_by: str # Created by user ID, updated_at: str(date-time) # Last updated date, created_at: str(date-time) # Creation date, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Company created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/companies/{id}
@desc Get company
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str?, interaction_count: int?, owner_id: str?, image: str?, description: str?, vat_number: str?, currency: str?, status: str?, fax: str?, annual_revenue: str?, number_of_employees: str?, industry: str?, ownership: str?, sales_tax_number: str?, payee_number: str?, abn_or_tfn: str?, abn_branch: str?, acn: str?, first_name: str?, last_name: str?, parent_id: str?, bank_accounts: [map], websites: [map], addresses: [map], social_links: [map], phone_numbers: [map], emails: [map], row_type: map{id: str?, name: str?}, custom_fields: [map], tags: [str]?, read_only: bool?, last_activity_at: str(date-time)?, deleted: bool, salutation: str?, birthday: str(date)?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Company
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/companies/{id}
@desc Update company
@required {id: str # ID of the record you are acting upon., name: str # Name of the company}
@optional {id: str # Unique identifier for the company, interaction_count: int # Number of interactions, owner_id: str # Owner ID, image: str # The Image URL of the company, description: str # A description of the company, vat_number: str # The VAT number of the company, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., status: str # The status of the company, fax: str # The fax number of the company, annual_revenue: str # The annual revenue of the company, number_of_employees: str # Number of employees, industry: str # The industry represents the type of business the company is in., ownership: str # The ownership indicates the type of ownership of the company., sales_tax_number: str # A sales tax number is a unique number that identifies a company for tax purposes., payee_number: str # A payee number is a unique number that identifies a payee for tax purposes., abn_or_tfn: str # An ABN is necessary for operating a business, while a TFN (Tax File Number) is required for any person working in Australia., abn_branch: str # An ABN Branch (also known as a GST Branch) is used if part of your business needs to account for GST separately from its parent entity., acn: str # The Australian Company Number (ACN) is a nine digit number with the last digit being a check digit calculated using a modified modulus 10 calculation. ASIC has adopted a convention of always printing and displaying the ACN in the format XXX XXX XXX; three blocks of three characters, each block separated by a blank., first_name: str # The first name of the person., last_name: str # The last name of the person., parent_id: str # Parent ID, bank_accounts: [map{bank_name: str, account_number: str, account_name: str, account_type: str, iban: str, bic: str, routing_number: str, bsb_number: str, branch_identifier: str, bank_code: str, currency: str, country: str}], websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], row_type: map{id: str, name: str}, custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], read_only: bool # Whether the company is read-only or not, last_activity_at: str(date-time) # Last activity date, deleted: bool # Whether the company is deleted or not, salutation: str # A formal salutation for the person. For example, 'Mr', 'Mrs', birthday: str(date) # The date of birth of the person., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # Updated by user ID, created_by: str # Created by user ID, updated_at: str(date-time) # Last updated date, created_at: str(date-time) # Creation date, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Company updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/companies/{id}
@desc Delete company
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Company deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/contacts
@desc List contacts
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Contacts
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/contacts
@desc Create contact
@optional {id: str # Unique identifier for the contact., name: str # Full name of the contact., owner_id: str # The owner of the contact., type: str(customer/supplier/employee/personal) # The type of the contact., company_id: str # The company the contact is associated with., company_name: str # The name of the company the contact is associated with., lead_id: str # The lead the contact is associated with., first_name: str # The first name of the contact., middle_name: str # The middle name of the contact., last_name: str # The last name of the contact., prefix: str # The prefix of the contact., suffix: str # The suffix of the contact., title: str # The job title of the contact., department: str # The department of the contact., language: str # language code according to ISO 639-1. For the United States - EN, gender: str(male/female/unisex) # The gender of the contact., birthday: str # The birthday of the contact., image: str, photo_url: str # The URL of the photo of a person., lead_source: str # The lead source of the contact., fax: str # The fax number of the contact., description: str # The description of the contact., current_balance: num # The current balance of the contact., status: str # The status of the contact., active: bool # The active status of the contact., websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], email_domain: str, custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], first_call_at: str(date-time) # The first call date of the contact., first_email_at: str(date-time) # The first email date of the contact., last_activity_at: str(date-time) # The last activity date of the contact., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_at: str(date-time) # The last update date of the contact., created_at: str(date-time) # The creation date of the contact., opportunity_ids: [str] # The opportunity ids of the contact., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Contact created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/contacts/{id}
@desc Get contact
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded., filter: map # Apply filters}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str?, owner_id: str?, type: str?, company_id: str?, company_name: str?, lead_id: str?, first_name: str?, middle_name: str?, last_name: str?, prefix: str?, suffix: str?, title: str?, department: str?, language: str?, gender: str?, birthday: str?, image: str?, photo_url: str?, lead_source: str?, fax: str?, description: str?, current_balance: num?, status: str?, active: bool?, websites: [map], addresses: [map], social_links: [map], phone_numbers: [map], emails: [map], email_domain: str?, custom_fields: [map]?, tags: [str]?, first_call_at: str(date-time)?, first_email_at: str(date-time)?, last_activity_at: str(date-time)?, custom_mappings: map?, updated_at: str(date-time)?, created_at: str(date-time)?, opportunity_ids: [str], pass_through: [map]}, _raw: map?} # Contact
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/contacts/{id}
@desc Update contact
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # Unique identifier for the contact., name: str # Full name of the contact., owner_id: str # The owner of the contact., type: str(customer/supplier/employee/personal) # The type of the contact., company_id: str # The company the contact is associated with., company_name: str # The name of the company the contact is associated with., lead_id: str # The lead the contact is associated with., first_name: str # The first name of the contact., middle_name: str # The middle name of the contact., last_name: str # The last name of the contact., prefix: str # The prefix of the contact., suffix: str # The suffix of the contact., title: str # The job title of the contact., department: str # The department of the contact., language: str # language code according to ISO 639-1. For the United States - EN, gender: str(male/female/unisex) # The gender of the contact., birthday: str # The birthday of the contact., image: str, photo_url: str # The URL of the photo of a person., lead_source: str # The lead source of the contact., fax: str # The fax number of the contact., description: str # The description of the contact., current_balance: num # The current balance of the contact., status: str # The status of the contact., active: bool # The active status of the contact., websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], email_domain: str, custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], first_call_at: str(date-time) # The first call date of the contact., first_email_at: str(date-time) # The first email date of the contact., last_activity_at: str(date-time) # The last activity date of the contact., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_at: str(date-time) # The last update date of the contact., created_at: str(date-time) # The creation date of the contact., opportunity_ids: [str] # The opportunity ids of the contact., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Contact updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/contacts/{id}
@desc Delete contact
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Contact deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/opportunities
@desc List opportunities
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Opportunities
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/opportunities
@desc Create opportunity
@required {title: str # The title or name of the opportunity.}
@optional {id: str # A unique identifier for the opportunity., primary_contact_id: str # The unique identifier of the primary contact associated with the opportunity., description: str # A description of the opportunity., type: str # The type of the opportunity, monetary_amount: num # The monetary value associated with the opportunity, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., win_probability: num # The probability of winning the opportunity, expressed as a percentage., expected_revenue: num # The expected revenue from the opportunity, close_date: str(date) # The actual closing date for the opportunity. If close_date is null, the opportunity is not closed yet., loss_reason_id: str # The unique identifier of the reason why the opportunity was lost., loss_reason: str # The reason why the opportunity was lost., won_reason_id: str # The unique identifier of the reason why the opportunity was won., won_reason: str # The reason why the opportunity was won., pipeline_id: str # The unique identifier of the pipeline associated with the opportunity, pipeline_stage_id: str # The unique identifier of the stage in the pipeline associated with the opportunity., source_id: str # The unique identifier of the source of the opportunity., lead_id: str # The unique identifier of the lead associated with the opportunity., lead_source: str # The source of the lead associated with the opportunity., contact_id: str # The unique identifier of the contact associated with the opportunity., contact_ids: [str] # An array of unique identifiers of all contacts associated with the opportunity., company_id: str # The unique identifier of the company associated with the opportunity., company_name: str # The name of the company associated with the opportunity., owner_id: str # The unique identifier of the user who owns the opportunity., priority: str # The priority level of the opportunity., status: str # The current status of the opportunity., status_id: str # The unique identifier of the current status of the opportunity., tags: [str], interaction_count: num # The number of interactions with the opportunity., custom_fields: [map{id: str, name: str, description: str, value: any}], stage_last_changed_at: str(date-time) # The date and time when the stage of the opportunity was last changed., last_activity_at: str # The date and time of the last activity associated with the opportunity., deleted: bool # Indicates whether the opportunity has been deleted., date_stage_changed: str(date-time) # The date and time when the stage of the opportunity was last changed., date_last_contacted: str(date-time) # The date and time when the opportunity was last contacted., date_lead_created: str(date-time) # The date and time when the lead associated with the opportunity was created., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The unique identifier of the user who last updated the opportunity., created_by: str # The unique identifier of the user who created the opportunity., updated_at: str(date-time) # The date and time when the opportunity was last updated., created_at: str(date-time) # The date and time when the opportunity was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Opportunity created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/opportunities/{id}
@desc Get opportunity
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, title: str, primary_contact_id: str?, description: str?, type: str?, monetary_amount: num?, currency: str?, win_probability: num?, expected_revenue: num?, close_date: str(date)?, loss_reason_id: str?, loss_reason: str?, won_reason_id: str?, won_reason: str?, pipeline_id: str?, pipeline_stage_id: str?, source_id: str?, lead_id: str?, lead_source: str?, contact_id: str?, contact_ids: [str], company_id: str?, company_name: str?, owner_id: str?, priority: str?, status: str?, status_id: str?, tags: [str]?, interaction_count: num?, custom_fields: [map], stage_last_changed_at: str(date-time)?, last_activity_at: str?, deleted: bool, date_stage_changed: str(date-time)?, date_last_contacted: str(date-time)?, date_lead_created: str(date-time)?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Opportunity
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/opportunities/{id}
@desc Update opportunity
@required {id: str # ID of the record you are acting upon., title: str # The title or name of the opportunity.}
@optional {id: str # A unique identifier for the opportunity., primary_contact_id: str # The unique identifier of the primary contact associated with the opportunity., description: str # A description of the opportunity., type: str # The type of the opportunity, monetary_amount: num # The monetary value associated with the opportunity, currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., win_probability: num # The probability of winning the opportunity, expressed as a percentage., expected_revenue: num # The expected revenue from the opportunity, close_date: str(date) # The actual closing date for the opportunity. If close_date is null, the opportunity is not closed yet., loss_reason_id: str # The unique identifier of the reason why the opportunity was lost., loss_reason: str # The reason why the opportunity was lost., won_reason_id: str # The unique identifier of the reason why the opportunity was won., won_reason: str # The reason why the opportunity was won., pipeline_id: str # The unique identifier of the pipeline associated with the opportunity, pipeline_stage_id: str # The unique identifier of the stage in the pipeline associated with the opportunity., source_id: str # The unique identifier of the source of the opportunity., lead_id: str # The unique identifier of the lead associated with the opportunity., lead_source: str # The source of the lead associated with the opportunity., contact_id: str # The unique identifier of the contact associated with the opportunity., contact_ids: [str] # An array of unique identifiers of all contacts associated with the opportunity., company_id: str # The unique identifier of the company associated with the opportunity., company_name: str # The name of the company associated with the opportunity., owner_id: str # The unique identifier of the user who owns the opportunity., priority: str # The priority level of the opportunity., status: str # The current status of the opportunity., status_id: str # The unique identifier of the current status of the opportunity., tags: [str], interaction_count: num # The number of interactions with the opportunity., custom_fields: [map{id: str, name: str, description: str, value: any}], stage_last_changed_at: str(date-time) # The date and time when the stage of the opportunity was last changed., last_activity_at: str # The date and time of the last activity associated with the opportunity., deleted: bool # Indicates whether the opportunity has been deleted., date_stage_changed: str(date-time) # The date and time when the stage of the opportunity was last changed., date_last_contacted: str(date-time) # The date and time when the opportunity was last contacted., date_lead_created: str(date-time) # The date and time when the lead associated with the opportunity was created., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The unique identifier of the user who last updated the opportunity., created_by: str # The unique identifier of the user who created the opportunity., updated_at: str(date-time) # The date and time when the opportunity was last updated., created_at: str(date-time) # The date and time when the opportunity was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Opportunity updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/opportunities/{id}
@desc Delete opportunity
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Opportunity deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/leads
@desc List leads
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?} # Leads
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/leads
@desc Create lead
@required {name: str # Full name of the lead.}
@optional {id: str # Unique identifier for the contact., company_name: str # The name of the company the lead is associated with., owner_id: str # The owner of the lead., owner_name: str # The name of the owner of the lead., company_id: str # The company the lead is associated with., contact_id: str # The contact the lead is associated with., lead_id: str # The identifier of the lead., lead_source: str # The source of the lead., first_name: str # The first name of the lead., last_name: str # The last name of the lead., description: str # The description of the lead., prefix: str # The prefix of the lead., title: str # The job title of the lead., language: str # language code according to ISO 639-1. For the United States - EN, status: str, monetary_amount: num # The monetary amount of the lead., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., fax: str # The fax number of the lead., websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_at: str # Date updated in ISO 8601 format, created_at: str # Date created in ISO 8601 format, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Lead created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/leads/{id}
@desc Get lead
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str, company_name: str?, owner_id: str?, owner_name: str?, company_id: str?, contact_id: str?, lead_id: str?, lead_source: str?, first_name: str?, last_name: str?, description: str?, prefix: str?, title: str?, language: str?, status: str?, monetary_amount: num?, currency: str?, fax: str?, websites: [map], addresses: [map], social_links: [map], phone_numbers: [map], emails: [map], custom_fields: [map]?, tags: [str]?, custom_mappings: map?, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?} # Lead
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/leads/{id}
@desc Update lead
@required {id: str # ID of the record you are acting upon., name: str # Full name of the lead.}
@optional {id: str # Unique identifier for the contact., company_name: str # The name of the company the lead is associated with., owner_id: str # The owner of the lead., owner_name: str # The name of the owner of the lead., company_id: str # The company the lead is associated with., contact_id: str # The contact the lead is associated with., lead_id: str # The identifier of the lead., lead_source: str # The source of the lead., first_name: str # The first name of the lead., last_name: str # The last name of the lead., description: str # The description of the lead., prefix: str # The prefix of the lead., title: str # The job title of the lead., language: str # language code according to ISO 639-1. For the United States - EN, status: str, monetary_amount: num # The monetary amount of the lead., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., fax: str # The fax number of the lead., websites: [map{id: str, url!: str, type: str}], addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], social_links: [map{id: str, url!: str, type: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], emails: [map{id: str, email!: str(email), type: str}], custom_fields: [map{id: str, name: str, description: str, value: any}], tags: [str], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_at: str # Date updated in ISO 8601 format, created_at: str # Date created in ISO 8601 format, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Lead updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/leads/{id}
@desc Delete lead
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Lead deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/pipelines
@desc List pipelines
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Pipelines
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/pipelines
@desc Create pipeline
@required {name: str # The name of the Pipeline.}
@optional {id: str # The unique identifier of the Pipeline., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., archived: bool # Whether the Pipeline is archived or not., active: bool # Whether the Pipeline is active or not., display_order: int # The order in which the Pipeline is displayed in the UI., win_probability_enabled: bool # Whether the Pipeline has win probability enabled or not., stages: [map{id: str, name: str, value: str, win_probability: int, display_order: int, archived: bool, created_at: str(date-time), updated_at: str(date-time)}] # The Pipeline Stages., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Pipeline created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/pipelines/{id}
@desc Get pipeline
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str, currency: str?, archived: bool, active: bool, display_order: int?, win_probability_enabled: bool, stages: [map], updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?} # Pipeline
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/pipelines/{id}
@desc Update pipeline
@required {id: str # ID of the record you are acting upon., name: str # The name of the Pipeline.}
@optional {id: str # The unique identifier of the Pipeline., currency: str(UNKNOWN_CURRENCY/AED/AFN/ALL/AMD/ANG/AOA/ARS/AUD/AWG/AZN/BAM/BBD/BDT/BGN/BHD/BIF/BMD/BND/BOB/BOV/BRL/BSD/BTN/BWP/BYR/BZD/CAD/CDF/CHE/CHF/CHW/CLF/CLP/CNY/COP/COU/CRC/CUC/CUP/CVE/CZK/DJF/DKK/DOP/DZD/EGP/ERN/ETB/EUR/FJD/FKP/GBP/GEL/GHS/GIP/GMD/GNF/GTQ/GYD/HKD/HNL/HRK/HTG/HUF/IDR/ILS/INR/IQD/IRR/ISK/JMD/JOD/JPY/KES/KGS/KHR/KMF/KPW/KRW/KWD/KYD/KZT/LAK/LBP/LKR/LRD/LSL/LTL/LVL/LYD/MAD/MDL/MGA/MKD/MMK/MNT/MOP/MRO/MUR/MVR/MWK/MXN/MXV/MYR/MZN/NAD/NGN/NIO/NOK/NPR/NZD/OMR/PAB/PEN/PGK/PHP/PKR/PLN/PYG/QAR/RON/RSD/RUB/RWF/SAR/SBD/SCR/SDG/SEK/SGD/SHP/SLL/SOS/SRD/SSP/STD/SVC/SYP/SZL/THB/TJS/TMT/TND/TOP/TRC/TRY/TTD/TWD/TZS/UAH/UGX/USD/USN/USS/UYI/UYU/UZS/VEF/VND/VUV/WST/XAF/XAG/XAU/XBA/XBB/XBC/XBD/XCD/XDR/XOF/XPD/XPF/XPT/XTS/XXX/YER/ZAR/ZMK/ZMW/BTC/ETH) # Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)., archived: bool # Whether the Pipeline is archived or not., active: bool # Whether the Pipeline is active or not., display_order: int # The order in which the Pipeline is displayed in the UI., win_probability_enabled: bool # Whether the Pipeline has win probability enabled or not., stages: [map{id: str, name: str, value: str, win_probability: int, display_order: int, archived: bool, created_at: str(date-time), updated_at: str(date-time)}] # The Pipeline Stages., updated_at: str(date-time) # The date and time when the object was last updated., created_at: str(date-time) # The date and time when the object was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Pipeline updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/pipelines/{id}
@desc Delete pipeline
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Pipeline deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/notes
@desc List notes
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Notes
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/notes
@desc Create note
@optional {id: str # The unique identifier of the note, title: str # The title of the note, content: str # The content of the note., owner_id: str # The user that owns the note., contact_id: str # The contact that is related to the note., company_id: str # The company that is related to the note., opportunity_id: str # The opportunity that is related to the note., activity_id: str # The activity that is related to the note., lead_id: str # The lead that is related to the note., active: bool # Whether the Note is active or not., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user that last updated the note., created_by: str # The user that created the note., updated_at: str # The timestamp when the note was last updated, created_at: str # The timestamp when the note was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Note created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/notes/{id}
@desc Get note
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, title: str?, content: str?, owner_id: str?, contact_id: str?, company_id: str?, opportunity_id: str?, activity_id: str?, lead_id: str?, active: bool?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?} # Note
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/notes/{id}
@desc Update note
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # The unique identifier of the note, title: str # The title of the note, content: str # The content of the note., owner_id: str # The user that owns the note., contact_id: str # The contact that is related to the note., company_id: str # The company that is related to the note., opportunity_id: str # The opportunity that is related to the note., activity_id: str # The activity that is related to the note., lead_id: str # The lead that is related to the note., active: bool # Whether the Note is active or not., custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user that last updated the note., created_by: str # The user that created the note., updated_at: str # The timestamp when the note was last updated, created_at: str # The timestamp when the note was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Note updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/notes/{id}
@desc Delete note
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Note deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/users
@desc List users
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Users
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/users
@desc Create user
@required {emails: [map{id: str, email!: str(email), type: str}]}
@optional {id: str # The unique identifier for the user, parent_id: str # The parent user id, username: str # The username of the user, first_name: str # The first name of the person., last_name: str # The last name of the person., title: str # The job title of the person., division: str # The division the person is currently in. Usually a collection of departments or teams or regions., department: str # The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field., company_name: str # The name of the company., employee_number: str # An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company., description: str # A description of the object., image: str # The URL of the user's avatar, language: str # language code according to ISO 639-1. For the United States - EN, status: str # The status of the user, password: str # The password of the user, addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_at: str # The date and time when the user was last updated., created_at: str # The date and time when the user was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # User created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/users/{id}
@desc Get user
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, parent_id: str?, username: str?, first_name: str?, last_name: str?, title: str?, division: str?, department: str?, company_name: str?, employee_number: str?, description: str?, image: str?, language: str?, status: str?, password: str?, addresses: [map], phone_numbers: [map], emails: [map], custom_mappings: map?, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?} # User
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/users/{id}
@desc Update user
@required {id: str # ID of the record you are acting upon., emails: [map{id: str, email!: str(email), type: str}]}
@optional {id: str # The unique identifier for the user, parent_id: str # The parent user id, username: str # The username of the user, first_name: str # The first name of the person., last_name: str # The last name of the person., title: str # The job title of the person., division: str # The division the person is currently in. Usually a collection of departments or teams or regions., department: str # The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field., company_name: str # The name of the company., employee_number: str # An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company., description: str # A description of the object., image: str # The URL of the user's avatar, language: str # language code according to ISO 639-1. For the United States - EN, status: str # The status of the user, password: str # The password of the user, addresses: [map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}], phone_numbers: [map{id: str, country_code: str, area_code: str, number!: str, extension: str, type: str}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_at: str # The date and time when the user was last updated., created_at: str # The date and time when the user was created., pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # User updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/users/{id}
@desc Delete user
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # User deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/activities
@desc List activities
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, filter: map # Apply filters, sort: map # Apply sorting, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Activities
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/activities
@desc Create activity
@required {type: str(call/meeting/email/note/task/deadline/send-letter/send-quote/other) # The type of the activity}
@optional {id: str # The unique identifier of the activity, downstream_id: str # The third-party API ID of original entity, activity_datetime: str # The date and time of the activity, duration_seconds: int # The duration of the activity in seconds, user_id: str # The user related to the activity, account_id: str # The account related to the activity, contact_id: str # The contact related to the activity, company_id: str # The company related to the activity, opportunity_id: str # The opportunity related to the activity, lead_id: str # The lead related to the activity, owner_id: str # The owner of the activity, campaign_id: str # The campaign related to the activity, case_id: str # The case related to the activity, asset_id: str # The asset related to the activity, contract_id: str # The contract related to the activity, product_id: str # The product related to the activity, solution_id: str # The solution related to the activity, custom_object_id: str # The custom object related to the activity, title: str # The title of the activity, description: str # A description of the activity, note: str # An internal note about the activity, location: str # The location of the activity, location_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, all_day_event: bool # Whether the Activity is an all day event or not, private: bool # Whether the Activity is private or not, group_event: bool # Whether the Activity is a group event or not, event_sub_type: str # The sub type of the group event, group_event_type: str # The type of the group event, child: bool # Whether the activity is a child of another activity or not, archived: bool # Whether the activity is archived or not, deleted: bool # Whether the activity is deleted or not, show_as: str(free/busy), done: bool # Whether the Activity is done or not, start_datetime: str # The start date and time of the activity, end_datetime: str # The end date and time of the activity, duration_minutes: int # The duration of the activity in minutes, activity_date: str # The date of the activity, end_date: str # The end date of the activity, recurrent: bool # Whether the activity is recurrent or not, reminder_datetime: str # The date and time of the reminder, reminder_set: bool # Whether the reminder is set or not, video_conference_url: str # The URL of the video conference, video_conference_id: str # The ID of the video conference, custom_fields: [map{id: str, name: str, description: str, value: any}] # Custom fields of the activity, attendees: [map{id: str, name: str, first_name: str, middle_name: str, last_name: str, prefix: str, suffix: str, email_address: str, is_organizer: bool, status: str, user_id: str, contact_id: str, updated_at: str(date-time), created_at: str(date-time)}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the activity, created_by: str # The user who created the activity, updated_at: str # The date and time when the activity was last updated, created_at: str # The date and time when the activity was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Activity created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/activities/{id}
@desc Get activity
@required {id: str # ID of the record you are acting upon.}
@optional {fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, activity_datetime: str?, duration_seconds: int?, user_id: str?, account_id: str?, contact_id: str?, company_id: str?, opportunity_id: str?, lead_id: str?, owner_id: str?, campaign_id: str?, case_id: str?, asset_id: str?, contract_id: str?, product_id: str?, solution_id: str?, custom_object_id: str?, type: str?, title: str?, description: str?, note: str?, location: str?, location_address: map{id: str?, type: str?, string: str?, name: str?, line1: str?, line2: str?, line3: str?, line4: str?, line5: str?, street_number: str?, city: str?, state: str?, postal_code: str?, country: str?, latitude: str?, longitude: str?, county: str?, contact_name: str?, salutation: str?, phone_number: str?, fax: str?, email: str?, website: str?, notes: str?, row_version: str?}, all_day_event: bool?, private: bool?, group_event: bool?, event_sub_type: str?, group_event_type: str?, child: bool?, archived: bool?, deleted: bool?, show_as: str?, done: bool?, start_datetime: str?, end_datetime: str?, duration_minutes: int?, activity_date: str?, end_date: str?, recurrent: bool, reminder_datetime: str?, reminder_set: bool?, video_conference_url: str?, video_conference_id: str?, custom_fields: [map], attendees: [map], custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?} # Activity
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/activities/{id}
@desc Update activity
@required {id: str # ID of the record you are acting upon., type: str(call/meeting/email/note/task/deadline/send-letter/send-quote/other) # The type of the activity}
@optional {id: str # The unique identifier of the activity, downstream_id: str # The third-party API ID of original entity, activity_datetime: str # The date and time of the activity, duration_seconds: int # The duration of the activity in seconds, user_id: str # The user related to the activity, account_id: str # The account related to the activity, contact_id: str # The contact related to the activity, company_id: str # The company related to the activity, opportunity_id: str # The opportunity related to the activity, lead_id: str # The lead related to the activity, owner_id: str # The owner of the activity, campaign_id: str # The campaign related to the activity, case_id: str # The case related to the activity, asset_id: str # The asset related to the activity, contract_id: str # The contract related to the activity, product_id: str # The product related to the activity, solution_id: str # The solution related to the activity, custom_object_id: str # The custom object related to the activity, title: str # The title of the activity, description: str # A description of the activity, note: str # An internal note about the activity, location: str # The location of the activity, location_address: map{id: str, type: str, string: str, name: str, line1: str, line2: str, line3: str, line4: str, line5: str, street_number: str, city: str, state: str, postal_code: str, country: str, latitude: str, longitude: str, county: str, contact_name: str, salutation: str, phone_number: str, fax: str, email: str, website: str, notes: str, row_version: str}, all_day_event: bool # Whether the Activity is an all day event or not, private: bool # Whether the Activity is private or not, group_event: bool # Whether the Activity is a group event or not, event_sub_type: str # The sub type of the group event, group_event_type: str # The type of the group event, child: bool # Whether the activity is a child of another activity or not, archived: bool # Whether the activity is archived or not, deleted: bool # Whether the activity is deleted or not, show_as: str(free/busy), done: bool # Whether the Activity is done or not, start_datetime: str # The start date and time of the activity, end_datetime: str # The end date and time of the activity, duration_minutes: int # The duration of the activity in minutes, activity_date: str # The date of the activity, end_date: str # The end date of the activity, recurrent: bool # Whether the activity is recurrent or not, reminder_datetime: str # The date and time of the reminder, reminder_set: bool # Whether the reminder is set or not, video_conference_url: str # The URL of the video conference, video_conference_id: str # The ID of the video conference, custom_fields: [map{id: str, name: str, description: str, value: any}] # Custom fields of the activity, attendees: [map{id: str, name: str, first_name: str, middle_name: str, last_name: str, prefix: str, suffix: str, email_address: str, is_organizer: bool, status: str, user_id: str, contact_id: str, updated_at: str(date-time), created_at: str(date-time)}], custom_mappings: map # When custom mappings are configured on the resource, the result is included here., updated_by: str # The user who last updated the activity, created_by: str # The user who created the activity, updated_at: str # The date and time when the activity was last updated, created_at: str # The date and time when the activity was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Activity updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/activities/{id}
@desc Delete activity
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Activity deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/custom-object-schemas
@desc List custom object schemas
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Custom object schemas
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/custom-object-schemas
@desc Create custom object schema
@optional {id: str # The unique identifier of the custom object schema, name: str # The name of the custom object schema, description: str # The description of the custom object schema, fields: [map{id: str, name: str, description: str, type: str, required: bool, options: [map], default_value: str}] # The fields defined in the schema, visible: bool # Whether the custom object schema is visible in the UI, active: bool # Whether the custom object schema is active, created_by: str # The ID of the user who created the custom object schema, updated_by: str # The ID of the user who last updated the custom object schema, updated_at: str # The timestamp when the custom object schema was last updated, created_at: str # The timestamp when the custom object schema was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str?, description: str?, fields: [map], visible: bool?, active: bool?, created_by: str?, updated_by: str?, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?} # Custom object schema created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/custom-object-schemas/{id}
@desc Get custom object schema
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str?, description: str?, fields: [map], visible: bool?, active: bool?, created_by: str?, updated_by: str?, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?} # Custom object schema
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/custom-object-schemas/{id}
@desc Update custom object schema
@required {id: str # ID of the record you are acting upon.}
@optional {id: str # The unique identifier of the custom object schema, name: str # The name of the custom object schema, description: str # The description of the custom object schema, fields: [map{id: str, name: str, description: str, type: str, required: bool, options: [map], default_value: str}] # The fields defined in the schema, visible: bool # Whether the custom object schema is visible in the UI, active: bool # Whether the custom object schema is active, created_by: str # The ID of the user who created the custom object schema, updated_by: str # The ID of the user who last updated the custom object schema, updated_at: str # The timestamp when the custom object schema was last updated, created_at: str # The timestamp when the custom object schema was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Custom object schema updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/custom-object-schemas/{id}
@desc Delete custom object schema
@required {id: str # ID of the record you are acting upon.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Custom object schema deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/custom-objects/{object_id}
@desc List custom objects
@required {object_id: str # The id of the custom object to query}
@optional {cursor: str # Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response., limit: int=20 # Number of results to return. Minimum 1, Maximum 200, Default 20, pass_through: map # Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads, fields: str # The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. Example: `fields=name,email,addresses.city`In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}} # Custom objects
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint POST /crm/custom-objects/{object_id}
@desc Create custom object
@required {object_id: str # The id of the custom object to query}
@optional {id: str # The unique identifier of the custom object, owner_id: str # The unique identifier of the owner of the custom object, name: str # The name of the custom object, fields: [map{name: str, value: str}], updated_by: str # The unique identifier of the user who last updated the custom object, created_by: str # The unique identifier of the user who created the custom object, updated_at: str # The timestamp when the custom object was last updated, created_at: str # The timestamp when the custom object was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Custom object created
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint GET /crm/custom-objects/{object_id}/{id}
@desc Get custom object
@required {id: str # ID of the record you are acting upon., object_id: str # The id of the custom object to query}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, owner_id: str, name: str?, fields: [map], updated_by: str, created_by: str, updated_at: str?, created_at: str?, pass_through: [map]}, _raw: map?} # Custom object
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint PATCH /crm/custom-objects/{object_id}/{id}
@desc Update custom object
@required {id: str # ID of the record you are acting upon., object_id: str # The id of the custom object to query}
@optional {id: str # The unique identifier of the custom object, owner_id: str # The unique identifier of the owner of the custom object, name: str # The name of the custom object, fields: [map{name: str, value: str}], updated_by: str # The unique identifier of the user who last updated the custom object, created_by: str # The unique identifier of the user who created the custom object, updated_at: str # The timestamp when the custom object was last updated, created_at: str # The timestamp when the custom object was created, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}] # The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Custom object updated
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@endpoint DELETE /crm/custom-objects/{object_id}/{id}
@desc Delete custom object
@required {id: str # ID of the record you are acting upon., object_id: str # The id of the custom object to query}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?} # Custom object deleted
@errors {400: Bad Request, 401: Unauthorized, 402: Payment Required, 404: The specified resource was not found, 422: Unprocessable}

@end
