openapi: 3.0.0 info: title: OnePageCRM API description: >-

At OnePageCRM, we love to see people using our software in new and exciting ways. If you've built an integration with OnePageCRM, fill out this web form, and we'll get back to you.


If you have any questions, please reach out to us at support(at)onepagecrm(dot)com.

OpenAPI Spec 3 Compliance

We've rebuilt the OnePageCRM API documentation from the ground up to be cleaner, simpler and to comply with the OpenAPI Spec 3.
We are also releasing our OAS3 compliant documentation to the public: https://github.com/OnePageCRM/swagger.
If you think our docs could be clearer or notice any issues, please let us know (we would also be delighted to receive pull requests!).
Here is a list of tools for working with OpenAPI e.g. client SDK generation (free to use any or all of these tools with the OnePageCRM spec).
In rewriting this documentation we have exposed lots of new features of the API - we hope you enjoy using them!
If you have trouble using the OnePageCRM API or notice any issue with this documentation please contact us on our developer forum.


Authentication

The OnePageCRM API makes use of HTTP Basic Authentication. To authenticate using HTTP Basic Auth, you need the user_id and api_key associated with your OnePageCRM account. Your username is your user_id and your password is your api_key.

This information can be found by logging into your OnePageCRM account and navigating to https://app.onepagecrm.com/app/api and selecting the configuration tab.


Pagination

Whenever you are fetching a list of records, you can paginate the response with these standard parameters:

Name Type Description
page integer Page number. Starts from 1. Default is 1
per_page integer Number of records to return. Maximum 100 allowed. Default is 10

So, for example, to fetch the first batch of 20 contacts:

GET contacts.json?per_page=20&page=1

And to fetch the second batch of 20 contacts:

GET contacts.json?per_page=20&page=2



Undo Deletion

Name Type Description
undo boolean Revert the deleting operation.

If you delete a contact with a DELETE request like this:

DELETE contacts/51f251d5eb899749f7000006.json

You can undo it by specifying an undo flag:

DELETE contacts/51f251d5eb899749f7000006.json?undo=true



Sort Listings by Time

When fetching collections, you can request the API only returns records that were modified in a given time range.

Name Type Description
date_filter Unix timestamp Filter returned data by a particular field when combined with since and until.
since Unix timestamp Return resources with dates in the provided date_filter parameter since this time. Otherwise it will return resources that were modified since this time.
until Unix timestamp Return resources with dates in the provided date_filter parameter until this time. Otherwise it will return resources that were modified until this time.
unmodified_since Unix timestamp Return only records that were unmodified since specified time.
modified_since Unix timestamp Return only records that were modified since specified time.


Sort Listings by Field

Name Type Description
sort_by string Name of field to sort results by (eg. 'email' or 'date').
order string asc || desc

Using these two fields you can sort the response by a specific field in either ascending or descending order. Ascending is the default order. Here is an example for sorting contacts by firstname in reverse alphabetical order:

GET contacts.json?sort_by=first_name&order=desc



Partial update

Name Type Description
partial boolean Whether you would like to provide a partial update or not.

Using the partial field, you can provide only the updated fields in the request body while updating a resource instead of sending all the fields:

PUT contacts.json?partial=true



Using this Documentation

You can use these docs to interact directly with the API. Simply:

  1. Click the green "Authorise" button below
  2. Supply your username (user_id) and password (api_key)
  3. Find the endpoint you wish to interact with, and method you wish to use
  4. Clicking "Try it out" lets you edit the query params, request body and run requests
  5. For GET requests - you can change the query params
  6. For POST/PUT requests - you can edit the request body
  7. When you're happy to do so - click "Execute"
Sample responses are shown for all requests below.

Warning: Any changes made in this way will effect your OnePageCRM data. If this is your main account, please exercise caution when making any changes.


termsOfService: 'https://www.onepagecrm.com/api-use' version: '3.0' servers: - url: 'https://app.onepagecrm.com/api/v3' description: Production Application Server security: - BasicAuth: [] tags: - name: Bootstrap description: >- Get account information like settings and lead sources, log yourself out or change your authentication key. - name: Users description: >- Useful information about the logged user and other members of the team. Each can update their own info. Admins can update all. - name: Contacts description: >- Information about the people you are actively trying to sell to, and related sub-resources like Actions, Deals, Notes, Calls and Meetings. - name: Companies description: >- Referred to as 'organizations' in the web application. Companies are logical collections of Contacts and related sub-resources e.g. Deals, Actions and some basic info on the org. e.g. postal address, website. A Company may not be created directly or exist without a Contact. - name: Actions description: >- Completable tasks related to Contacts. ASAP first, then dated actions ordered by due date (overdue first), followed by waiting for (blocked) and finally queued actions (without any date). - name: Action Stream description: >- A listing of contacts prioritized by when their next action is due. The Action Stream is the default view in the OnePageCRM web application. - name: Team Stream description: >- The Action Stream for all users on the account in a single list, or for any individual user on the account (not just the logged user). The same Action Stream sorting is applied. - name: Deals description: >- Represent (potential) financial transactions with your contacts. Deals include information like amount, deal stage, closed date or expected close date. Deals support file attachments. - name: Notes description: >- Allow you to keep track of additional information related to your contacts. Notes can include any information you feel is relevant e.g. interactions with that contact. Notes support file attachments. - name: Calls description: >- Allow you to keep track of phone calls made to your contacts. Calls include information like the phone number dialled and the call result. Calls support file attachments. - name: Meetings description: >- Allow you to keep track of phone meetings made to your contacts. Meetings include information like the phone number dialled and the meeting result. Meetings support file attachments. - name: Attachments description: >- Additional files associated with Deals, Notes, Calls or Meetings. They can be uploaded and stored in S3, or stored in external providers i.e. Google Drive, Dropbox, Evernote. - name: Relationship Types description: >- Information about the relationship types that's used to identify the relationships between the contacts. - name: Pipelines description: >- Information about the sales process of products or services, including deal stages. Each product/service/group may have a different pipeline. - name: Statuses description: >- Values which help qualify where contacts are in the sales pipeline. The list of Statuses is already populated but it may be updated if needed, to better fit your organization. - name: Lead Sources description: >- A way to classify the source of any contact that is added to OnePageCRM. Like Statuses, this list is pre-populated, and can be later edited to fit individual needs. - name: Filters description: >- Allow you to query contacts in your own custom way. These filters can only be created on the website but they can be used through the API. - name: Predefined Actions description: >- Template actions users may use frequently in their sales process. Referred to as 'Saved Actions' in the web application. - name: Predefined Items description: >- A user-configured list of items representing products or services, which can be used to standardize deal creation. - name: Predefined Item Groups description: >- A grouping of predefined/deal items. Useful if items can be sold as part of a package or compliment one another. - name: Custom Fields description: >- Extra user-configurable data fields for Contacts. Only editable by admins. - name: Company Fields description: >- Extra user-configurable data fields for Companies. Only editable by admins. - name: Deal Fields description: >- Extra user-configurable data fields for Deals. Only editable by admins. - name: Notifications description: >- Allows you to fetch notifications that logged in user has, except email and link notifications. - name: Countries description: >- A list of all compatible countries and their ISO-3166 codes. - name: Web Hooks description: >- A simple, effective way to be notified when things happen in OnePageCRM. For more information, go to the 'WebHooks & More' tab at the top of the page. paths: /bootstrap: get: summary: Get useful information about the logged API user's account description: >- Includes things like:
-> Global account config e.g. lead sources and deal stages.
-> User specific config e.g. date format, time zone info.
parameters: [] tags: - Bootstrap responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Bootstrap' lead_sources: $ref: '#/components/schemas/Lead_source' statuses: $ref: '#/components/schemas/Status' tags: description: >- Tags provide a means to classify contacts by however many tags you choose to attach to them. There are 2 types of tags, tags and system tags properties: tags: description: >- An array of custom tags. A custom tag is a user created tag used for categorising contacts type: array items: $ref: '#/components/schemas/Tag' system_tags: description: >- An array of system tags. A system tag is a system generate tag used for categorising contacts type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' /change_auth_key: post: summary: Invalidate the current API key and return a new API key description: >- **Warning:** This will change the users authentication key, and therefore log them out of all applications.
Note: this includes the mobile applications.
tags: - Bootstrap responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: auth_key: description: New API Key type: string example: wbJBo+odEikiDOjdnL+P+0fl+Dbgk84747jFtyOZghs= 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' /users: get: summary: Get the list of users (for the logged API user's account) tags: - Users parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: array items: properties: user: $ref: '#/components/schemas/User' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /users/{user_id}: get: summary: Get a specific user tags: - Users parameters: - $ref: '#/components/parameters/path_user_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: user: $ref: '#/components/schemas/User' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific user description: >- Each team member can edit their own details, admins can update all.
Only the following fields may be edited through the API:
-> first_name
-> last_name
-> company
-> bcc_email (Set this field to `true` to generate a new BCC email address, otherwise omit the field entirely. You can only update this field for yourself.)
tags: - Users parameters: - $ref: '#/components/parameters/path_user_id' requestBody: required: true content: application/json: schema: properties: first_name: $ref: '#/components/schemas/User/properties/first_name' last_name: $ref: '#/components/schemas/User/properties/last_name' company_name: $ref: '#/components/schemas/User/properties/company_name' bcc_email: type: string description: >- Should the BCC email address be re-generated for this user (you can only update this field for yourself) example: 'true' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: user: $ref: '#/components/schemas/User' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /lead_sources: get: summary: Get the list of lead sources (for the logged API user's account) tags: - Lead Sources parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: array items: $ref: '#/components/schemas/Lead_source' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new lead source tags: - Lead Sources parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Lead_source' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Lead_source' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /lead_sources/{lead_source_id}: get: summary: Get a specific lead source tags: - Lead Sources parameters: - $ref: '#/components/parameters/path_lead_source_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Lead_source' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific lead source tags: - Lead Sources parameters: - $ref: '#/components/parameters/path_lead_source_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Lead_source' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Lead_source' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific lead source tags: - Lead Sources parameters: - $ref: '#/components/parameters/path_lead_source_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /statuses: get: summary: Get the list of statuses (for the logged API user's account) description: '' tags: - Statuses parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: array items: properties: status: $ref: '#/components/schemas/Status' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new status description: '' tags: - Statuses parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Status' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: status: $ref: '#/components/schemas/Status' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /statuses/{status_id}: get: summary: Get a specific status description: '' tags: - Statuses parameters: - $ref: '#/components/parameters/path_status_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: status: $ref: '#/components/schemas/Status' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific status description: '' tags: - Statuses parameters: - $ref: '#/components/parameters/path_status_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Status' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: status: $ref: '#/components/schemas/Status' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific status description: '' tags: - Statuses parameters: - $ref: '#/components/parameters/path_status_id' responses: 200: description: OK 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /deal_fields: get: summary: Get the list of deal fields (for the logged API user's account) description: '' tags: - Deal Fields parameters: - $ref: '#/components/parameters/query_custom_fields_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal_fields: type: array items: properties: deal_field: $ref: '#/components/schemas/Deal_field' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new deal field description: Only admins can create deal fields. tags: - Deal Fields parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Deal_field' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal_field: $ref: '#/components/schemas/Deal_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /deal_fields/{deal_field_id}: get: summary: Get a specific deal field description: '' tags: - Deal Fields parameters: - $ref: '#/components/parameters/path_deal_field_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal_field: $ref: '#/components/schemas/Deal_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific deal field description: Only admins can update deal fields. tags: - Deal Fields parameters: - $ref: '#/components/parameters/path_deal_field_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Deal_field' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal_field: $ref: '#/components/schemas/Deal_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific deal field description: Only admins can delete deal fields. tags: - Deal Fields parameters: - $ref: '#/components/parameters/path_deal_field_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /custom_fields: get: summary: Get the list of custom fields (for the logged API user's account) description: '' tags: - Custom Fields parameters: - $ref: '#/components/parameters/query_custom_fields_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: custom_fields: type: array items: properties: custom_field: $ref: '#/components/schemas/Custom_field' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new custom field description: Only admins can create custom fields. tags: - Custom Fields parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Custom_field' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: custom_field: $ref: '#/components/schemas/Custom_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /custom_fields/{custom_field_id}: get: summary: Get a specific custom field description: '' tags: - Custom Fields parameters: - $ref: '#/components/parameters/path_custom_field_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: custom_field: $ref: '#/components/schemas/Custom_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific custom field description: Only admins can update custom fields. tags: - Custom Fields parameters: - $ref: '#/components/parameters/path_custom_field_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Custom_field' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: custom_field: $ref: '#/components/schemas/Custom_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific custom field description: Only admins can delete custom fields. tags: - Custom Fields parameters: - $ref: '#/components/parameters/path_custom_field_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /company_fields: get: summary: Get the list of company fields (for the logged API user's account) description: '' tags: - Company Fields parameters: - $ref: '#/components/parameters/query_custom_fields_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company_fields: type: array items: properties: company_field: $ref: '#/components/schemas/Company_field' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new company field description: Only admins can create company fields. tags: - Company Fields parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Company_field' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company_field: $ref: '#/components/schemas/Company_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /company_fields/{company_field_id}: get: summary: Get a specific company field description: '' tags: - Company Fields parameters: - $ref: '#/components/parameters/path_company_field_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company_field: $ref: '#/components/schemas/Company_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific company field description: Only admins can update company fields. tags: - Company Fields parameters: - $ref: '#/components/parameters/path_company_field_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Company_field' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company_field: $ref: '#/components/schemas/Company_field' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific company field description: Only admins can delete company fields. tags: - Company Fields parameters: - $ref: '#/components/parameters/path_company_field_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /predefined_actions: get: summary: Get the list of predefined actions (for the logged API user's account) description: '' tags: - Predefined Actions parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_actions: type: array items: properties: predefined_action: $ref: '#/components/schemas/Predefined_action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new predefined action description: '' tags: - Predefined Actions parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Predefined_action' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_action: $ref: '#/components/schemas/Predefined_action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /predefined_actions/{predefined_action_id}: get: summary: Get a specific predefined action description: '' tags: - Predefined Actions parameters: - $ref: '#/components/parameters/path_predefined_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_action: $ref: '#/components/schemas/Predefined_action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific predefined action description: '' tags: - Predefined Actions parameters: - $ref: '#/components/parameters/path_predefined_action_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Predefined_action' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_action: $ref: '#/components/schemas/Predefined_action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific predefined action description: '' tags: - Predefined Actions parameters: - $ref: '#/components/parameters/path_predefined_action_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /predefined_items: get: summary: Get the list of predefined items (for the logged API user's account) description: '' tags: - Predefined Items parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_items: type: array items: properties: predefined_item: $ref: '#/components/schemas/Predefined_item' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new predefined item description: '' tags: - Predefined Items parameters: [] requestBody: required: true content: application/json: schema: properties: name: type: string description: Name of the predefined item example: Solar panels description: type: string description: Description text of the predefined item example: Photovoltaic solar panels (2019 model) cost: type: number format: float description: Cost of the predefined item (if deals costs are enabled) example: 95.00 price: type: number format: float description: Price of the predefined item example: 149.99 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_item: $ref: '#/components/schemas/Predefined_item' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /predefined_items/{predefined_item_id}: get: summary: Get a specific predefined item description: '' tags: - Predefined Items parameters: - $ref: '#/components/parameters/path_predefined_item_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_item: $ref: '#/components/schemas/Predefined_item' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific predefined item description: '' tags: - Predefined Items parameters: - $ref: '#/components/parameters/path_predefined_item_id' requestBody: required: true content: application/json: schema: properties: name: type: string description: Name of the predefined item example: Solar panels description: type: string description: Description text of the predefined item example: Photovoltaic solar panels (2019 model) cost: type: number format: float description: Cost of the predefined item (if deals costs are enabled) example: 95.00 price: type: number format: float description: Price of the predefined item example: 149.99 responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_action: $ref: '#/components/schemas/Predefined_action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific predefined item description: '' tags: - Predefined Items parameters: - $ref: '#/components/parameters/path_predefined_item_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /predefined_item_groups: get: summary: Get the list of predefined item groups (for the logged API user's account) description: '' tags: - Predefined Item Groups parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_item_groups: type: array items: properties: predefined_item_group: $ref: '#/components/schemas/Predefined_item_group' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new predefined item group description: '' tags: - Predefined Item Groups parameters: [] requestBody: required: true content: application/json: schema: properties: name: type: string description: Name of the predefined item group example: Electronics deal_items: type: array description: List of IDs of the predefined/deal items in the predefined item group items: type: string format: bson-id example: - 5c79510e9007ba3f7519e819 - 5c9a53349007ba58f13c8118 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_item: $ref: '#/components/schemas/Predefined_item_group' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /predefined_item_groups/{predefined_item_group_id}: get: summary: Get a specific predefined item group description: '' tags: - Predefined Item Groups parameters: - $ref: '#/components/parameters/path_predefined_item_group_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: predefined_item_group: $ref: '#/components/schemas/Predefined_item_group' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific predefined item group description: '' tags: - Predefined Item Groups parameters: - $ref: '#/components/parameters/path_predefined_item_group_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /notes: get: summary: Get a list of notes description: '' tags: - Notes parameters: - $ref: '#/components/parameters/query_notes_contact_id' - $ref: '#/components/parameters/query_notes_company_id' - $ref: '#/components/parameters/query_notes_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_notes_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: notes: type: array items: properties: note: $ref: '#/components/schemas/Note' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new note description: '' tags: - Notes parameters: [] requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Note/properties/contact_id' text: $ref: '#/components/schemas/Note/properties/text' date: $ref: '#/components/schemas/Note/properties/date' linked_deal_id: type: string format: bson-id nullable: true example: '' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: note: $ref: '#/components/schemas/Note' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /notes/{note_id}: get: summary: Get a specific note description: '' tags: - Notes parameters: - $ref: '#/components/parameters/path_note_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: note: $ref: '#/components/schemas/Note' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific note description: '' tags: - Notes parameters: - $ref: '#/components/parameters/path_note_id' requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Note/properties/contact_id' text: $ref: '#/components/schemas/Note/properties/text' date: $ref: '#/components/schemas/Note/properties/date' linked_deal_id: type: string format: bson-id nullable: true example: '' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: note: $ref: '#/components/schemas/Note' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific note description: '' tags: - Notes parameters: - $ref: '#/components/parameters/path_note_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /notes/{note_id}/attachments: post: summary: Create attachment and assign it to an existing note tags: - Notes description: >- Before creating an attachment, the file should be uploaded to S3.

Make a request to `attachments/s3_form` for a pre-authorized upload form.
Following successful upload to S3, files can be attached via this endpoint.
parameters: - $ref: '#/components/parameters/path_note_id' requestBody: required: true content: application/json: schema: required: - reference_type - key properties: reference_id: type: string format: bson-id description: ID of the note associated with the attachment example: 5afc1b69d556730b580596cb reference_type: type: string description: Type of resource is associated with the attachment enum: [ deal, note, call, meeting ] example: note contact_id: $ref: '#/components/schemas/Note/properties/contact_id' name: $ref: '#/components/schemas/Attachment/properties/filename' key: type: string description: >- The same key used in the `attachments/s3_form`, composed as `{contact_id}/{timestamp}/{filename}` example: 5ae06ef9d55673108fe8877f/1530520812224/mario.jpg size: $ref: '#/components/schemas/Attachment/properties/size' link_type: type: string description: Type of external link (for external `storage_provider`s) enum: [ dropbox, google_drive, evernote ] nullable: true example: '' external_url: type: string description: URL for the file (for use with external `storage_provider`s) nullable: true example: '' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: attachment: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /calls: get: summary: Get a list of calls description: '' tags: - Calls parameters: - $ref: '#/components/parameters/query_calls_contact_id' - $ref: '#/components/parameters/query_calls_company_id' - $ref: '#/components/parameters/query_calls_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_calls_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: calls: type: array items: properties: call: $ref: '#/components/schemas/Call' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a call description: '' tags: - Calls parameters: [] requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Call/properties/contact_id' call_time_int: $ref: '#/components/schemas/Call/properties/call_time_int' text: $ref: '#/components/schemas/Call/properties/text' phone_number: $ref: '#/components/schemas/Call/properties/phone_number' call_result: $ref: '#/components/schemas/Call/properties/call_result' via: $ref: '#/components/schemas/Call/properties/via' recording_link: $ref: '#/components/schemas/Call/properties/recording_link' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: call: $ref: '#/components/schemas/Call' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /calls/{call_id}: get: summary: Get a specific call description: '' tags: - Calls parameters: - $ref: '#/components/parameters/path_call_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: call: $ref: '#/components/schemas/Call' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific call description: '' tags: - Calls parameters: - $ref: '#/components/parameters/path_call_id' requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Call/properties/contact_id' call_time_int: $ref: '#/components/schemas/Call/properties/call_time_int' text: $ref: '#/components/schemas/Call/properties/text' phone_number: $ref: '#/components/schemas/Call/properties/phone_number' call_result: $ref: '#/components/schemas/Call/properties/call_result' via: $ref: '#/components/schemas/Call/properties/via' recording_link: $ref: '#/components/schemas/Call/properties/recording_link' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: call: $ref: '#/components/schemas/Call' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific call description: '' tags: - Calls parameters: - $ref: '#/components/parameters/path_call_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /calls/{call_id}/attachments: post: summary: Create attachment and assign it to an existing call description: >- Before creating an attachment, the file should be uploaded to S3.

Make a request to `attachments/s3_form` for a pre-authorized upload form.
Following successful upload to S3, files can be attached via this endpoint.
tags: - Calls parameters: - $ref: '#/components/parameters/path_call_id' requestBody: required: true content: application/json: schema: required: - reference_type - key properties: reference_id: type: string format: bson-id description: ID of the call associated with the attachment example: 5afc1b69d556730b580596cb reference_type: type: string description: Type of resource is associated with the attachment enum: [ deal, note, call ] example: call contact_id: $ref: '#/components/schemas/Note/properties/contact_id' name: $ref: '#/components/schemas/Attachment/properties/filename' key: type: string description: >- The same key used in the `attachments/s3_form`, composed as `{contact_id}/{timestamp}/{filename}` example: 5ae06ef9d55673108fe8877f/1530520812224/mario.jpg size: $ref: '#/components/schemas/Attachment/properties/size' link_type: type: string description: Type of external link (for external `storage_provider`s) enum: [ dropbox, google_drive, evernote ] nullable: true example: '' external_url: type: string description: URL for the file (for use with external `storage_provider`s) nullable: true example: '' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: attachment: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /call_results: get: summary: Get the list of call results (for the logged API user's account) description: >- Includes:
-> The call results for the account.
-> The counts of their usages for the logged API user, and their team.
tags: - Calls parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: array items: properties: call_result: properties: result: type: string format: bson-id description: ID of the call result example: interested text: type: string description: Display text of the call result example: Interested counts: type: integer format: int32 description: The number of calls for the logged API user, with the call result readOnly: true example: 5 total_counts: type: integer format: int32 description: The number of calls for the entire account, with the call result readOnly: true example: 5 team_counts: type: array description: The number of calls for each user, with the call result readOnly: true items: properties: user_id: $ref: '#/components/schemas/User/properties/id' counts: type: integer format: int32 description: Number of calls for the user, with the call result readOnly: true example: 4 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /meetings: get: summary: Get a list of meetings description: '' tags: - Meetings parameters: - $ref: '#/components/parameters/query_meetings_contact_id' - $ref: '#/components/parameters/query_meetings_company_id' - $ref: '#/components/parameters/query_meetings_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_meetings_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: meetings: type: array items: properties: meeting: $ref: '#/components/schemas/Meeting' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a meeting description: '' tags: - Meetings parameters: [] requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Meeting/properties/contact_id' meeting_time_int: $ref: '#/components/schemas/Meeting/properties/meeting_time_int' place: $ref: '#/components/schemas/Meeting/properties/place' text: $ref: '#/components/schemas/Meeting/properties/text' # meeting_result: # $ref: '#/components/schemas/Meeting/properties/meeting_result' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: meeting: $ref: '#/components/schemas/Meeting' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /meetings/{meeting_id}: get: summary: Get a specific meeting description: '' tags: - Meetings parameters: - $ref: '#/components/parameters/path_meeting_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: meeting: $ref: '#/components/schemas/Meeting' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific meeting description: '' tags: - Meetings parameters: - $ref: '#/components/parameters/path_meeting_id' requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Meeting/properties/contact_id' meeting_time_int: $ref: '#/components/schemas/Meeting/properties/meeting_time_int' place: $ref: '#/components/schemas/Meeting/properties/place' text: $ref: '#/components/schemas/Meeting/properties/text' # meeting_result: # $ref: '#/components/schemas/Meeting/properties/meeting_result' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: meeting: $ref: '#/components/schemas/Meeting' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific meeting description: '' tags: - Meetings parameters: - $ref: '#/components/parameters/path_meeting_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /meetings/{meeting_id}/attachments: post: summary: Create attachment and assign it to an existing meeting description: >- Before creating an attachment, the file should be uploaded to S3.

Make a request to `attachments/s3_form` for a pre-authorized upload form.
Following successful upload to S3, files can be attached via this endpoint.
tags: - Meetings parameters: - $ref: '#/components/parameters/path_meeting_id' requestBody: required: true content: application/json: schema: required: - reference_type - key properties: reference_id: type: string format: bson-id description: ID of the meeting associated with the attachment example: 5afc1b69d556730b580596cb reference_type: type: string description: Type of resource is associated with the attachment enum: [ deal, note, call, meeting ] example: meeting contact_id: $ref: '#/components/schemas/Note/properties/contact_id' name: $ref: '#/components/schemas/Attachment/properties/filename' key: type: string description: >- The same key used in the `attachments/s3_form`, composed as `{contact_id}/{timestamp}/{filename}` example: 5ae06ef9d55673108fe8877f/1530520812224/mario.jpg size: $ref: '#/components/schemas/Attachment/properties/size' link_type: type: string description: Type of external link (for external `storage_provider`s) enum: [ dropbox, google_drive, evernote ] nullable: true example: '' external_url: type: string description: URL for the file (for use with external `storage_provider`s) nullable: true example: '' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: attachment: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /deals: get: summary: Get a list of deals description: '' tags: - Deals parameters: - $ref: '#/components/parameters/query_deals_name' - $ref: '#/components/parameters/query_deals_search' - $ref: '#/components/parameters/query_deals_status' - $ref: '#/components/parameters/query_stage' - $ref: '#/components/parameters/query_pipeline_id' - $ref: '#/components/parameters/query_sales_pipeline_id' - $ref: '#/components/parameters/query_deals_owner_id' - $ref: '#/components/parameters/query_deals_contact_id' - $ref: '#/components/parameters/query_deals_company_id' - $ref: '#/components/parameters/query_deals_tag' - $ref: '#/components/parameters/query_deals_filter_id' - $ref: '#/components/parameters/query_deals_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_include_history' - $ref: '#/components/parameters/query_deals_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deals: type: array items: properties: deal: $ref: '#/components/schemas/Deal' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new deal description: '' tags: - Deals parameters: [] requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Deal/properties/contact_id' owner_id: $ref: '#/components/schemas/Deal/properties/owner_id' pipeline_id: $ref: '#/components/schemas/Deal/properties/pipeline_id' sales_pipeline_id: $ref: '#/components/schemas/Deal/properties/sales_pipeline_id' name: $ref: '#/components/schemas/Deal/properties/name' text: $ref: '#/components/schemas/Deal/properties/text' stage: $ref: '#/components/schemas/Deal/properties/stage' status: $ref: '#/components/schemas/Deal/properties/status' expected_close_date: $ref: '#/components/schemas/Deal/properties/expected_close_date' close_date: $ref: '#/components/schemas/Deal/properties/close_date' date: $ref: '#/components/schemas/Deal/properties/date' amount: $ref: '#/components/schemas/Deal/properties/amount' months: $ref: '#/components/schemas/Deal/properties/months' cost: $ref: '#/components/schemas/Deal/properties/cost' commission_base: $ref: '#/components/schemas/Deal/properties/commission_base' commission_type: $ref: '#/components/schemas/Deal/properties/commission_type' commission: $ref: '#/components/schemas/Deal/properties/commission' commission_percentage: $ref: '#/components/schemas/Deal/properties/commission_percentage' deal_fields: type: array description: Extra user-configurable data fields for Deals. Only editable by admins. items: type: object properties: deal_field: properties: id: type: string format: bson-id description: ID of the deal field example: 5aad9b039007ba28c9ebad56 value: type: string description: Value for the deal field example: Large has_deal_items: type: boolean description: Must to be `true` to create or keep deal items (if `false`, deal items will be removed) default: false example: true deal_items: type: array description: List of deal items associated with the deal items: type: object required: - name - description - cost - price - qty properties: name: $ref: '#/components/schemas/Deal_item/properties/name' description: $ref: '#/components/schemas/Deal_item/properties/description' cost: $ref: '#/components/schemas/Deal_item/properties/cost' price: $ref: '#/components/schemas/Deal_item/properties/price' qty: $ref: '#/components/schemas/Deal_item/properties/qty' predefined_item_id: $ref: '#/components/schemas/Deal_item/properties/predefined_item_id' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /deals/{deal_id}: get: summary: Get a specific deal description: '' tags: - Deals parameters: - $ref: '#/components/parameters/path_deal_id' - $ref: '#/components/parameters/query_include_history' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific deal description: '' tags: - Deals parameters: - $ref: '#/components/parameters/path_deal_id' requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Deal/properties/contact_id' owner_id: $ref: '#/components/schemas/Deal/properties/owner_id' pipeline_id: $ref: '#/components/schemas/Deal/properties/pipeline_id' sales_pipeline_id: $ref: '#/components/schemas/Deal/properties/sales_pipeline_id' name: $ref: '#/components/schemas/Deal/properties/name' text: $ref: '#/components/schemas/Deal/properties/text' stage: $ref: '#/components/schemas/Deal/properties/stage' status: $ref: '#/components/schemas/Deal/properties/status' expected_close_date: $ref: '#/components/schemas/Deal/properties/expected_close_date' close_date: $ref: '#/components/schemas/Deal/properties/close_date' date: $ref: '#/components/schemas/Deal/properties/date' amount: $ref: '#/components/schemas/Deal/properties/amount' months: $ref: '#/components/schemas/Deal/properties/months' cost: $ref: '#/components/schemas/Deal/properties/cost' commission_base: $ref: '#/components/schemas/Deal/properties/commission_base' commission_type: $ref: '#/components/schemas/Deal/properties/commission_type' commission: $ref: '#/components/schemas/Deal/properties/commission' commission_percentage: $ref: '#/components/schemas/Deal/properties/commission_percentage' deal_fields: type: array description: Extra user-configurable data fields for Deals. Only editable by admins. items: type: object properties: deal_field: properties: id: type: string format: bson-id description: ID of the deal field example: 5aad9b039007ba28c9ebad56 value: type: string description: Value for the deal field example: Large has_deal_items: type: boolean description: Must to be `true` to create or keep deal items (if `false`, deal items will be removed) default: false example: true deal_items: type: array description: List of deal items associated with the deal items: type: object required: - name - description - cost - price - qty properties: name: $ref: '#/components/schemas/Deal_item/properties/name' description: $ref: '#/components/schemas/Deal_item/properties/description' cost: $ref: '#/components/schemas/Deal_item/properties/cost' price: $ref: '#/components/schemas/Deal_item/properties/price' qty: $ref: '#/components/schemas/Deal_item/properties/qty' predefined_item_id: $ref: '#/components/schemas/Deal_item/properties/predefined_item_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific deal description: >- Note: only users with the `delete_deals` permission can delete deals. tags: - Deals parameters: - $ref: '#/components/parameters/path_deal_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /deals/{deal_id}/attachments: post: summary: Create attachment and assign it to an existing deal description: >- Before creating an attachment, the file should be uploaded to S3.
Make a request to `attachments/s3_form` for a pre-authorized upload form.
Following successful upload to S3, files can be attached via this endpoint.
tags: - Deals parameters: - $ref: '#/components/parameters/path_deal_id' requestBody: required: true content: application/json: schema: required: - reference_type - key properties: reference_id: type: string format: bson-id description: ID of the deal associated with the attachment example: 5afc1b69d556730b580596cb reference_type: type: string description: Type of resource is associated with the attachment enum: [ deal, note, call, meeting ] example: deal contact_id: $ref: '#/components/schemas/Note/properties/contact_id' name: $ref: '#/components/schemas/Attachment/properties/filename' key: type: string description: >- The same key used in the `attachments/s3_form`, composed as `{contact_id}/{timestamp}/{filename}` example: 5ae06ef9d55673108fe8877f/1530520812224/mario.jpg size: $ref: '#/components/schemas/Attachment/properties/size' link_type: type: string description: Type of external link (for external `storage_provider`s) enum: [ dropbox, google_drive, evernote ] nullable: true example: '' external_url: type: string description: URL for the file (for use with external `storage_provider`s) nullable: true example: '' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: attachment: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /attachments/s3_form: get: summary: >- Get a pre-authorized S3 upload form (use to upload a file on the client side) description: >- Files must be uploaded to S3 before they can be attached to Deals, Notes, Calls or Meetings.
This request will return all the information needed to upload a file to S3.

Steps to upload a file to S3:
-> Make a `POST` request to the `URL` in the response (to this request).
-> Include all the params returned as part of the `fields` construct in the response.
-> These should be sent as headers of the upload request to S3.
-> Most can be sent as they are, but the `key` field must be constructed.
-> `"key":"{contact_id}/{timestamp}/{filename}"`
-> `filename` field must be present (and the same as the `filename` specified at the end of the `key` field).
-> `file` is the file to upload.

Following successful upload to S3, files may now be attached to Deals, Notes, Calls or Meetings.

Notes:
-> Maximum file size is 10 MB / 10485760 bytes.
-> Each account has 1 GB of storage per user.
-> Here's some additional information on the upload process.
tags: - Attachments parameters: - in: query name: contact_id required: true schema: type: string description: Contact to be associated with the attachment responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: quota: example: 1073741824 display_quota: example: 1024MB url: example: https://s3-us-west-1.amazonaws.com/onepagecrm-ud2-us-west-1/ fields: properties: key: example: '' x-ignore-pattern: example: '59bacde236aebd7842f8be7x/__timestamp__/${filename}' acl: example: private success_action_status: example: 201 policy: example: aBcDe...aBcDe= x-amz-algorithm: example: AWS4-HMAC-SHA256 x-amz-credential: example: ABCDE...ABCDE/20170914/us-west-1/s3/aws4_request x-amz-date: example: 20170914T184346Z x-amz-signature: example: aBcDe...aBcDe 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /attachments: post: summary: Create a new attachment description: >- Before creating an attachment, the file should be uploaded to S3.

Make a request to `attachments/s3_form` for a pre-authorized upload form.
Following successful upload to S3, files can be attached via this endpoint.

Note: file attachments are supported by Deals, Notes, Calls or Meetings.
tags: - Attachments parameters: [] requestBody: required: true content: application/json: schema: required: - reference_type - key properties: reference_id: type: string format: bson-id description: ID of the note associated with the attachment example: 5afc1b69d556730b580596cb reference_type: type: string description: Type of resource is associated with the attachment enum: [ deal, note, call, meeting ] example: note contact_id: $ref: '#/components/schemas/Note/properties/contact_id' name: $ref: '#/components/schemas/Attachment/properties/filename' key: type: string description: >- The same key used in the `attachments/s3_form`, composed as `{contact_id}/{timestamp}/{filename}` example: 5ae06ef9d55673108fe8877f/1530520812224/mario.jpg size: $ref: '#/components/schemas/Attachment/properties/size' link_type: type: string description: Type of external link (for external `storage_provider`s) enum: [ dropbox, google_drive, evernote ] nullable: true example: '' external_url: type: string description: URL for the file (for use with external `storage_provider`s) nullable: true example: '' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: attachment: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /attachments/{attachment_id}: patch: summary: Sets/updates attachment custom file name description: Once the custom file name is set it cannot be unset to nil/empty string tags: - Attachments parameters: - $ref: '#/components/parameters/path_attachment_id' requestBody: required: true content: application/json: schema: required: - custom_filename properties: attachment: properties: custom_filename: $ref: '#/components/schemas/Attachment/properties/custom_filename' responses: 200: description: 'OK' content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific attachment description: '' tags: - Attachments parameters: - $ref: '#/components/parameters/path_attachment_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /attachments/{attachment_id}/pin: patch: summary: Pin attachment to its owner contact through its note/call/deal description: '' tags: - Attachments parameters: - $ref: '#/components/parameters/path_attachment_id' responses: 200: description: 'OK' content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /attachments/{attachment_id}/unpin: patch: summary: Unpin attachment from its owner contact through its note/call/deal description: '' tags: - Attachments parameters: - $ref: '#/components/parameters/path_attachment_id' responses: 200: description: 'OK' content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Attachment' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /relationship_types: get: summary: Get a list of relationship types description: '' tags: - Relationship Types parameters: - $ref: '#/components/parameters/query_relationship_types_search' - $ref: '#/components/parameters/query_relationship_symmetrical' - $ref: '#/components/parameters/query_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: relationship_types: type: array items: properties: relationship_type: $ref: '#/components/schemas/Relationship_Type' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new relationship type description: '' tags: - Relationship Types parameters: [] requestBody: required: true content: application/json: schema: properties: variants: type: array description: The relationship variants. items: type: object properties: name: type: string description: The relationship variant name. example: Partner responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: relationship_types: type: array items: properties: relationship_type: $ref: '#/components/schemas/Relationship_Type' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /relationship_types/{relationship_type_id}: get: summary: Get a specific relationship type description: '' tags: - Relationship Types parameters: - $ref: '#/components/parameters/path_relationship_type_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal: $ref: '#/components/schemas/Relationship_Type' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific relationship type description: '' tags: - Relationship Types parameters: - $ref: '#/components/parameters/path_relationship_type_id' requestBody: required: true content: application/json: schema: properties: variants: type: array description: The relationship variants. items: type: object properties: id: type: string format: bson-id description: ID of the relationship variant example: 5aaa9b059007ba08c9ebaf59 name: type: string description: The relationship variant name. example: Partner responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal: $ref: '#/components/schemas/Relationship_Type' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a relationship type description: '' tags: - Relationship Types parameters: - $ref: '#/components/parameters/path_relationship_type_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /countries: get: summary: Get the list of all compatible countries description: >- A read-only list of all compatible countries, alpha sorted based on their ISO-3166 country codes.
tags: - Countries parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: countries: type: array items: properties: country: properties: name: type: string description: Name of the country readOnly: true example: Ireland code: type: string description: ISO-3166 country code readOnly: true example: IE phone_prefix: type: string description: Phone prefix of the country readOnly: true example: '+353' /actions: get: summary: Get a list of actions description: >- Default sort order:
-> ASAP first
-> Dated actions (ordered by due date, overdue first)
-> Waiting for (blocked)
-> Queued actions (without any date)
-> Completed actions
tags: - Actions parameters: - $ref: '#/components/parameters/query_done' - $ref: '#/components/parameters/query_actions_status' - $ref: '#/components/parameters/query_assignee_id' - $ref: '#/components/parameters/query_actions_contact_id' - $ref: '#/components/parameters/query_actions_company_id' - $ref: '#/components/parameters/query_actions_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: actions: type: array items: properties: action: $ref: '#/components/schemas/Action' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a new action description: '' tags: - Actions parameters: [] requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Action/properties/contact_id' assignee_id: $ref: '#/components/schemas/Action/properties/assignee_id' status: $ref: '#/components/schemas/Action/properties/status' text: $ref: '#/components/schemas/Action/properties/text' date: $ref: '#/components/schemas/Action/properties/date' exact_time: $ref: '#/components/schemas/Action/properties/exact_time' position: $ref: '#/components/schemas/Action/properties/position' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /actions/{action_id}: get: summary: Get a specific action description: '' tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific action description: '' tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' - name: done in: query required: false description: Mark the action as complete schema: type: boolean example: true requestBody: required: true content: application/json: schema: properties: contact_id: $ref: '#/components/schemas/Action/properties/contact_id' assignee_id: $ref: '#/components/schemas/Action/properties/assignee_id' status: $ref: '#/components/schemas/Action/properties/status' text: $ref: '#/components/schemas/Action/properties/text' date: $ref: '#/components/schemas/Action/properties/date' exact_time: $ref: '#/components/schemas/Action/properties/exact_time' position: $ref: '#/components/schemas/Action/properties/position' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific action tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /actions/{action_id}/unassign: put: summary: Unassign a specific action (from the currently assigned user) description: >- Note: leaving `assignee_id` blank will assign this action to the logged API user. tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /actions/{action_id}/mark_as_done: put: summary: Mark a specific action as complete description: '' tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /actions/{action_id}/undo_completion: put: summary: Undo action completion description: '' tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /actions/{action_id}/promote: put: summary: Specify action to be promoted as the logged API users next action description: >- Only use this method if there is no next action already assigned, otherwise see similar `swap` request.
tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /actions/{action_id}/revert_promotion: put: summary: Undo action promotion description: '' tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /actions/{action_id}/swap: put: summary: >- Specify action to be swapped in as the logged API users next action description: >- Resolve date conflicts between next action and dated queued action by swapping them.

The swap should consist of:
-> A next action of status `date`, `date_time` or `waiting`
-> A queued action of status `queued_with_date`

Both actions should be for the current user, and the date for the queued action should be before the date of the next action.
tags: - Actions parameters: - $ref: '#/components/parameters/path_action_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /filters: get: summary: Get the list of custom filters (for the logged API user's account) description: '' tags: - Filters parameters: - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: filters: type: array items: properties: filter: $ref: '#/components/schemas/Filter' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /filters/{filter_id}: get: summary: Get (and run) a specific custom filter description: >- This endpoint returns all details of the specified filter, as well as all contacts that meet the criteria of the filter. tags: - Filters parameters: - $ref: '#/components/parameters/path_filter_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: filter: $ref: '#/components/schemas/Filter' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' contacts: type: array items: properties: contact: $ref: '#/components/schemas/Contact' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies: get: summary: Get a list of companies description: Defaults sorting is company name alpha. tags: - Companies parameters: - $ref: '#/components/parameters/query_companies_name' - $ref: '#/components/parameters/query_companies_phone' - $ref: '#/components/parameters/query_companies_letter' - $ref: '#/components/parameters/query_companies_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: companies: type: array items: properties: company: $ref: '#/components/schemas/Company' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}: get: summary: Get a specific company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific company description: >- Note: when updating a company field, either the `id` or `name` and the `value` must be present. tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' requestBody: required: true content: application/json: schema: properties: name: $ref: '#/components/schemas/Company/properties/name' description: $ref: '#/components/schemas/Company/properties/description' url: $ref: '#/components/schemas/Company/properties/url' phone: $ref: '#/components/schemas/Company/properties/phone' address: $ref: '#/components/schemas/Company/properties/address' company_fields: type: array description: Extra user-configurable data fields for Companies. Only editable by admins. items: type: object properties: company_field: properties: id: type: string format: bson-id description: ID of the company field example: 5aad9b039007ba28c9ebad56 value: type: string description: Value for the company field example: Large responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/actions: get: summary: Get actions associated with a specific company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' - $ref: '#/components/parameters/query_done' - $ref: '#/components/parameters/query_actions_status' - $ref: '#/components/parameters/query_assignee_id' - $ref: '#/components/parameters/query_actions_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: actions: type: array items: properties: action: $ref: '#/components/schemas/Action' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/deals: get: summary: Get deals associated with a specific company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' - $ref: '#/components/parameters/query_deals_name' - $ref: '#/components/parameters/query_deals_search' - $ref: '#/components/parameters/query_deals_status' - $ref: '#/components/parameters/query_stage' - $ref: '#/components/parameters/query_deals_owner_id' - $ref: '#/components/parameters/query_deals_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_deals_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deals: type: array items: properties: deal: $ref: '#/components/schemas/Deal' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/notes: get: summary: Get notes associated with a specific company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' - $ref: '#/components/parameters/query_notes_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_notes_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: notes: type: array items: properties: note: $ref: '#/components/schemas/Note' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/calls: get: summary: Get calls associated with a specific company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' - $ref: '#/components/parameters/query_calls_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_calls_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: calls: type: array items: properties: call: $ref: '#/components/schemas/Call' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/meetings: get: summary: Get meetings associated with a specific company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' - $ref: '#/components/parameters/query_meetings_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_meetings_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: meetings: type: array items: properties: meeting: $ref: '#/components/schemas/Meeting' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/linked_contacts: get: summary: Get contacts linked with a specific company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' - $ref: '#/components/parameters/query_contacts_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: linked_contacts: type: array items: properties: linked_contact: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' linked_with: type: array description: IDs of contacts, to which the contact/company is linked items: type: string format: bson-id example: 5aba31e99007ba0f570c92ab total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Link a contact to a specific company description: >- Notes:
-> Cannot link a contact to the company they already work at.
-> A company is not allowed to have more than 100 linked contacts.
tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' requestBody: required: true content: application/json: schema: required: - contact_id properties: contact_id: type: string format: bson-id description: The ID of the contact to link with the company example: 5ae06ef9d55673108fe8877b responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: linked_contact: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' linked_with: type: array description: IDs of contacts, to which the contact/company is linked items: type: string format: bson-id example: 5aba31e99007ba0f570c92ab 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/linked_contacts/{contact_id}: delete: summary: Unlink a contact from a company description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' - name: contact_id in: path required: true description: ID of the contact to be un-linked, from the company schema: type: string format: bson-id responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/synced_status: post: summary: Enable company status sync description: >- Turns on sync so that all contacts in the specified company will have the same status.
An initial `status_id` must be provided in the request body.

Note: the statuses of this company's contacts will remain in sync, until sync is disabled for this company.
tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' requestBody: required: true content: application/json: schema: properties: status_id: $ref: '#/components/schemas/Company/properties/synced_status_id' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Disable company status sync description: '' tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/pinned_attachments: get: summary: Gets the list of attachments pinned to this company description: The list of attachments is collected from the attachments pinned to all the contacts in this company. The list of attachments is sorted based on "pinned_at" field, i.e. most recent attachments come first, the list of attachments is paginated. tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' responses: 200: description: 'OK' content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: pinned_attachments: type: array items: $ref: '#/components/schemas/Attachment' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /companies/{company_id}/logo: post: summary: Update logo for the given company description: Update company logo with the given image. The previous logo is removed and then new image is set tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' requestBody: required: true content: application/json: schema: properties: image: $ref: '#/components/schemas/Company/properties/image' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 415: $ref: '#/components/responses/415' 422: $ref: '#/components/responses/422' 500: $ref: '#/components/responses/500' patch: summary: Update logo for the given company description: Update company logo with the given image. The previous logo is removed and then new image is set tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' requestBody: required: true content: application/json: schema: properties: image: $ref: '#/components/schemas/Company/properties/image' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 415: $ref: '#/components/responses/415' 422: $ref: '#/components/responses/422' 500: $ref: '#/components/responses/500' delete: summary: Delete logo in then given company description: >- Delete logo in the given company. When successfully deleted the `photo_url` field value is `null` in the company tags: - Companies parameters: - $ref: '#/components/parameters/path_company_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 500: $ref: '#/components/responses/500' /contacts: get: summary: Get a list of contacts description: Defaults to contacts owned by the logged user, alpha sorted. tags: - Contacts parameters: - $ref: '#/components/parameters/query_team' # Search field values - $ref: '#/components/parameters/query_contacts_search' - $ref: '#/components/parameters/query_contacts_phone' - $ref: '#/components/parameters/query_url' # Boolean flags/filters - $ref: '#/components/parameters/query_action_stream' - $ref: '#/components/parameters/query_has_actions' - $ref: '#/components/parameters/query_has_actions_for_me' - $ref: '#/components/parameters/query_has_actions_today' - $ref: '#/components/parameters/query_pending_deal' - $ref: '#/components/parameters/query_starred' - $ref: '#/components/parameters/query_waiting' # Related value constraints - $ref: '#/components/parameters/query_email' - $ref: '#/components/parameters/query_contacts_letter' - $ref: '#/components/parameters/query_custom_field_id' - $ref: '#/components/parameters/query_custom_field_value' - $ref: '#/components/parameters/query_lead_source' - $ref: '#/components/parameters/query_lead_source_id' - $ref: '#/components/parameters/query_status_id' - $ref: '#/components/parameters/query_not_linked_with' - $ref: '#/components/parameters/query_contacts_owner_id' - $ref: '#/components/parameters/query_contacts_company_id' - $ref: '#/components/parameters/query_contacts_tag' - $ref: '#/components/parameters/query_contacts_filter_id' # Date filters - $ref: '#/components/parameters/query_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' # Sort order - $ref: '#/components/parameters/query_contacts_sort_by' - $ref: '#/components/parameters/query_order' # Pagination - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contacts: type: array items: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a contact description: '' tags: - Contacts parameters: [] requestBody: required: true content: application/json: schema: properties: title: $ref: '#/components/schemas/Contact/properties/title' first_name: $ref: '#/components/schemas/Contact/properties/first_name' last_name: $ref: '#/components/schemas/Contact/properties/last_name' job_title: $ref: '#/components/schemas/Contact/properties/job_title' starred: $ref: '#/components/schemas/Contact/properties/starred' company_id: $ref: '#/components/schemas/Contact/properties/company_id' company_name: $ref: '#/components/schemas/Contact/properties/company_name' urls: $ref: '#/components/schemas/Contact/properties/url' phones: $ref: '#/components/schemas/Contact/properties/phones' emails: $ref: '#/components/schemas/Contact/properties/emails' address_list: $ref: '#/components/schemas/Contact/properties/address_list' status_id: $ref: '#/components/schemas/Contact/properties/status_id' tags: $ref: '#/components/schemas/Contact/properties/tags' lead_source_id: $ref: '#/components/schemas/Lead_source/properties/id' background: $ref: '#/components/schemas/Contact/properties/background' owner_id: $ref: '#/components/schemas/Contact/properties/owner_id' custom_fields: type: array description: Extra user-configurable data fields for Contacts. Only editable by admins. items: type: object properties: custom_field: properties: id: type: string format: bson-id description: ID of the custom field example: 5aad9b039007ba28c9ebad56 value: type: string description: Value for the custom field example: Large responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}: get: summary: Get a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific contact description: >- Note: when updating a custom field, either the `id` or `name` and the `value` must be present.
Please note the following when changing addresses:
`"address_list": [] // to clear all addresses`
`"address_list": [{"city": "NY"}, {}] // to keep/update first and clear second address` tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: title: $ref: '#/components/schemas/Contact/properties/title' first_name: $ref: '#/components/schemas/Contact/properties/first_name' last_name: $ref: '#/components/schemas/Contact/properties/last_name' job_title: $ref: '#/components/schemas/Contact/properties/job_title' starred: $ref: '#/components/schemas/Contact/properties/starred' company_id: $ref: '#/components/schemas/Contact/properties/company_id' company_name: $ref: '#/components/schemas/Contact/properties/company_name' urls: $ref: '#/components/schemas/Contact/properties/url' phones: $ref: '#/components/schemas/Contact/properties/phones' emails: $ref: '#/components/schemas/Contact/properties/emails' address_list: $ref: '#/components/schemas/Contact/properties/address_list' status_id: $ref: '#/components/schemas/Contact/properties/status_id' tags: $ref: '#/components/schemas/Contact/properties/tags' lead_source_id: $ref: '#/components/schemas/Lead_source/properties/id' background: $ref: '#/components/schemas/Contact/properties/background' owner_id: $ref: '#/components/schemas/Contact/properties/owner_id' custom_fields: type: array description: Extra user-configurable data fields for Contacts. Only editable by admins. items: type: object properties: custom_field: properties: id: type: string format: bson-id description: ID of the custom field example: 5aad9b039007ba28c9ebad56 value: type: string description: Value for the custom field example: Large responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific contact description: >- Note: only users with the `delete_contacts` permission can delete contacts. tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - in: query name: undo description: Undo Contact deletion schema: type: boolean format: boolean example: true responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: object lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/contact_photo: post: summary: Add a new contact photo description: >- Use this endpoint to add a new photo to an existing contact.

It takes a parameter `image`, which must be a Base64 encoded string of the image data.
Images will be cropped to a centered square and resized to 200x200 pixels.
tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: image: type: string format: b64-encoded description: Base64 encoded string of image data example: >- iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gkFCR0iiEuUHQAAA8tJREFUaN7tmX1IlHccwD/PvZRpGb0ZTcK6C9ksanIVvQ0rV4RTK5cy9keLbETOGmRBW1SMmX9sLCrbjDKrJfRqucqgyBoUW3EmRYZFXRmzFmmvXL502rM/vkIpPXenPl6Xe37wcHDP73e/3+f7/v2douai0g2GiW4yDBADxAAxQAwQA8QA+X+CNALNATzZq5Y9VT1BIhyQpULaeYhKAE8XAniAiLGQeFj2jFmgI8jwZPkcMhmSSuCbp+D4DkxWkVxnh9qigZh0SL8NaU6wzZV39s/92sM/ELWNfnv0hYk5kPESZu2FAaM6pqVmIHQwxG2GZSpMz4fw4d731hgW/zZs0H4X/YU8TyqhLAeuFYIZUHyYj30mOL6HyLgAOnv5z3LI5kbtOf0+ghl74NsmmPwT9OzX2iRUQDFD7ErIeAzJJ3WDAFD87hDVFlP4MBXGroaBY3yvubAWnD+KdmxzIOFI+0945xgcS/YpclO77NkM3DoIhR9DYTRc/937GvtcWacCwz4LgjwSFgnzr8GUXyBkgEj46U049RX8aoLzWdDwSEON7XPargUZ+TX0j4HY5bCoFlJOQeTUFmmrcHkD/DYQij+F6jOv1zXVeXd6HYelQ6uGzpCn7iFcyoErm8AKVJfC3VLoPQhGLobru8UcA3BP42ce0chIoRHwyUbIVCF+B4Tb5ND1NVCWDe5/gqzWqsiD6rPe58QshPku+LIMbCldW8Z0GKS+BoqmQ/4g8QdvjhvhgIQiWFoP9pQgrH5NQEMtnMuCzSY4vUAil6b3hUi+aQomEHNPiM+HEakSqUyII++Mhn2xklvei34kdoVUprMOQGY9TPgBrGESkWovw4k0yAuBi2vA4/YdJN4ZiMna2mTGrYXFbkgshsHjRUvNjeDMhi19oGQ2VJVIorQEBqRz29hmy/P8LlxaD1e3yy/eOQquozo10oqOGnEdAk+d9vvwKJi2TXqKuFwIHaJfEqzc4dcp/QN5VAFbwuB4Ejz42/vc0Zmw8D6knoP+ozp2+GcuKE2HTQq4inUOv1ag6jjsmwS7hkLFVu/zP5gC8QXtu7BwFcF+BxSMgMoC3w1ap66DLIC7Gs4ugVwF/swA9z2NXzf7NjHPC7i4DraGQsk8qCkXoQXM2ZU3ypfyPIiaJK1rq77jDXEqbWT20Cld541iOYXSuVs2fYJjD+Dfv+CPROgVDo5VUvpX5L02j8oCsM+TwOHMhidVsrtVn5igdMmfoSpSmlja2LjnLd8FRR7xZnZWjYDxzovGIB8GiAFigBggBogBYoB0J5D/ACApEz8hyMzGAAAAAElFTkSuQmCC responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a contact's photo description: > Use this endpoint to add a new photo to an existing contact.

It takes a parameter `image`, which must be a Base64 encoded string of the image data.
Images will be cropped to a centered square and resized to 200x200 pixels.

Note: updating a contact photo will remove the existing photo!
tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: image: type: string format: b64-encoded description: Base64 encoded string of image data example: >- iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gkFCR0iiEuUHQAAA8tJREFUaN7tmX1IlHccwD/PvZRpGb0ZTcK6C9ksanIVvQ0rV4RTK5cy9keLbETOGmRBW1SMmX9sLCrbjDKrJfRqucqgyBoUW3EmRYZFXRmzFmmvXL502rM/vkIpPXenPl6Xe37wcHDP73e/3+f7/v2douai0g2GiW4yDBADxAAxQAwQA8QA+X+CNALNATzZq5Y9VT1BIhyQpULaeYhKAE8XAniAiLGQeFj2jFmgI8jwZPkcMhmSSuCbp+D4DkxWkVxnh9qigZh0SL8NaU6wzZV39s/92sM/ELWNfnv0hYk5kPESZu2FAaM6pqVmIHQwxG2GZSpMz4fw4d731hgW/zZs0H4X/YU8TyqhLAeuFYIZUHyYj30mOL6HyLgAOnv5z3LI5kbtOf0+ghl74NsmmPwT9OzX2iRUQDFD7ErIeAzJJ3WDAFD87hDVFlP4MBXGroaBY3yvubAWnD+KdmxzIOFI+0945xgcS/YpclO77NkM3DoIhR9DYTRc/937GvtcWacCwz4LgjwSFgnzr8GUXyBkgEj46U049RX8aoLzWdDwSEON7XPargUZ+TX0j4HY5bCoFlJOQeTUFmmrcHkD/DYQij+F6jOv1zXVeXd6HYelQ6uGzpCn7iFcyoErm8AKVJfC3VLoPQhGLobru8UcA3BP42ce0chIoRHwyUbIVCF+B4Tb5ND1NVCWDe5/gqzWqsiD6rPe58QshPku+LIMbCldW8Z0GKS+BoqmQ/4g8QdvjhvhgIQiWFoP9pQgrH5NQEMtnMuCzSY4vUAil6b3hUi+aQomEHNPiM+HEakSqUyII++Mhn2xklvei34kdoVUprMOQGY9TPgBrGESkWovw4k0yAuBi2vA4/YdJN4ZiMna2mTGrYXFbkgshsHjRUvNjeDMhi19oGQ2VJVIorQEBqRz29hmy/P8LlxaD1e3yy/eOQquozo10oqOGnEdAk+d9vvwKJi2TXqKuFwIHaJfEqzc4dcp/QN5VAFbwuB4Ejz42/vc0Zmw8D6knoP+ozp2+GcuKE2HTQq4inUOv1ag6jjsmwS7hkLFVu/zP5gC8QXtu7BwFcF+BxSMgMoC3w1ap66DLIC7Gs4ugVwF/swA9z2NXzf7NjHPC7i4DraGQsk8qCkXoQXM2ZU3ypfyPIiaJK1rq77jDXEqbWT20Cld541iOYXSuVs2fYJjD+Dfv+CPROgVDo5VUvpX5L02j8oCsM+TwOHMhidVsrtVn5igdMmfoSpSmlja2LjnLd8FRR7xZnZWjYDxzovGIB8GiAFigBggBogBYoB0J5D/ACApEz8hyMzGAAAAAElFTkSuQmCC responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Remove a contact's photo description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/filters/{filter_id}: get: summary: Show contacts that meet the criteria of a filter description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_filter_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: filter: $ref: '#/components/schemas/Filter' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' contacts: type: array items: properties: contact: $ref: '#/components/schemas/Contact' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/delete: delete: summary: Delete multiple contacts description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/query_contacts_delete_ids' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: object lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/google_contacts: post: summary: Save a specific OnePageCRM contact to Google Contacts description: >- OnePageCRM must be authorized to save contacts to Google Contacts on your behalf, in order to complete this request.
Please visit our integration page to authorize, or our help article for more information.
tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: $ref: '#/components/schemas/Action' company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/actions: get: summary: Get all actions for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/query_done' - $ref: '#/components/parameters/query_actions_status' - $ref: '#/components/parameters/query_assignee_id' - $ref: '#/components/parameters/query_actions_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: actions: type: array items: properties: action: $ref: '#/components/schemas/Action' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create an action for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: assignee_id: $ref: '#/components/schemas/Action/properties/assignee_id' status: $ref: '#/components/schemas/Action/properties/status' text: $ref: '#/components/schemas/Action/properties/text' date: $ref: '#/components/schemas/Action/properties/date' exact_time: $ref: '#/components/schemas/Action/properties/exact_time' position: $ref: '#/components/schemas/Action/properties/position' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: action: $ref: '#/components/schemas/Action' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/deals: get: summary: Get all deals for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/query_deals_name' - $ref: '#/components/parameters/query_deals_search' - $ref: '#/components/parameters/query_deals_status' - $ref: '#/components/parameters/query_stage' - $ref: '#/components/parameters/query_deals_owner_id' - $ref: '#/components/parameters/query_deals_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_deals_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deals: type: array items: properties: deal: $ref: '#/components/schemas/Deal' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a deal for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: owner_id: $ref: '#/components/schemas/Deal/properties/owner_id' name: $ref: '#/components/schemas/Deal/properties/name' text: $ref: '#/components/schemas/Deal/properties/text' stage: $ref: '#/components/schemas/Deal/properties/stage' status: $ref: '#/components/schemas/Deal/properties/status' expected_close_date: $ref: '#/components/schemas/Deal/properties/expected_close_date' close_date: $ref: '#/components/schemas/Deal/properties/close_date' date: $ref: '#/components/schemas/Deal/properties/date' amount: $ref: '#/components/schemas/Deal/properties/amount' months: $ref: '#/components/schemas/Deal/properties/months' cost: $ref: '#/components/schemas/Deal/properties/cost' commission_base: $ref: '#/components/schemas/Deal/properties/commission_base' commission_type: $ref: '#/components/schemas/Deal/properties/commission_type' commission: $ref: '#/components/schemas/Deal/properties/commission' commission_percentage: $ref: '#/components/schemas/Deal/properties/commission_percentage' deal_fields: type: array description: Extra user-configurable data fields for Deals. Only editable by admins. items: type: object properties: deal_field: properties: id: type: string format: bson-id description: ID of the deal field example: 5aad9b039007ba28c9ebad56 value: type: string description: Value for the deal field example: Large responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: deal: $ref: '#/components/schemas/Deal' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/notes: get: summary: Get all notes for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/query_notes_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_notes_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: notes: type: array items: properties: note: $ref: '#/components/schemas/Note' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a note for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: text: $ref: '#/components/schemas/Note/properties/text' date: $ref: '#/components/schemas/Note/properties/date' linked_deal_id: type: string format: bson-id nullable: true example: '' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: note: $ref: '#/components/schemas/Note' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/calls: get: summary: Get all calls for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/query_calls_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_calls_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: calls: type: array items: properties: call: $ref: '#/components/schemas/Call' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a call for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: call_time_int: $ref: '#/components/schemas/Call/properties/call_time_int' text: $ref: '#/components/schemas/Call/properties/text' phone_number: $ref: '#/components/schemas/Call/properties/phone_number' call_result: $ref: '#/components/schemas/Call/properties/call_result' via: $ref: '#/components/schemas/Call/properties/via' recording_link: $ref: '#/components/schemas/Call/properties/recording_link' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: call: $ref: '#/components/schemas/Call' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/meetings: get: summary: Get all meetings for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/query_meetings_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_meetings_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: meetings: type: array items: properties: meeting: $ref: '#/components/schemas/Meeting' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a meeting for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: meeting_time_int: $ref: '#/components/schemas/Meeting/properties/meeting_time_int' place: $ref: '#/components/schemas/Meeting/properties/place' text: $ref: '#/components/schemas/Meeting/properties/text' # meeting_result: # $ref: '#/components/schemas/Meeting/properties/meeting_result' user_ids_to_notify: type: array description: A list of user IDs to notify items: type: string format: bson-id example: 5aba31e99007ba0f570c12f7 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: meeting: $ref: '#/components/schemas/Meeting' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/relationships: get: summary: Get all relationships for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/query_relationships_type_id' - $ref: '#/components/parameters/query_relationships_contact_id_filter' - $ref: '#/components/parameters/query_relationships_variant_id_filter' - $ref: '#/components/parameters/query_relationships_search' - $ref: '#/components/parameters/query_relationship_symmetrical' - $ref: '#/components/parameters/query_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' - $ref: '#/components/parameters/query_sort_by' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: relationships: type: array items: properties: relationship: $ref: '#/components/schemas/Relationship' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' post: summary: Create a relationships for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: relationship_type_id: type: string format: bson-id description: ID of the contact example: 5aaa9b059007ba08c9ebaf58 related_contacts: minItems: 2 maxItems: 2 type: array description: Related contacts with relationship variant names items: type: object properties: contact_id: type: string format: bson-id description: ID of the contact example: 5aba31ea9007ba0f570c92d4 variant_id: type: string format: bson-id description: ID of the relationship variant example: 5aaa9b059007ba08c9ebaf59 example: - contact_id: 5aba31ea9007ba0f570c92d4 variant_id: 5aaa9b059007ba08c9ebaf59 - contact_id: 5aba31ea9007ba0f570c92d5 variant_id: 5aaa9b059007ba08c9ebaf59 responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: relationship: $ref: '#/components/schemas/Relationship' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/relationships/{relationship_id}: get: summary: Get a specific relationship description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/path_relationship_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: relationship: $ref: '#/components/schemas/Relationship' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' put: summary: Update a specific relationship description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/path_relationship_id' requestBody: required: true content: application/json: schema: properties: relationship_type_id: type: string format: bson-id description: ID of the relationship type example: 5aaa9b059007ba08c9ebaf57 related_contacts: minItems: 2 maxItems: 2 type: array description: Related contacts with relationship variant names items: type: object properties: contact_id: type: string format: bson-id description: ID of the contact example: 5aba31ea9007ba0f570c92d4 variant_id: type: string format: bson-id description: ID of the relationship variant example: 5aaa9b059007ba08c9ebaf59 example: - contact_id: 5aba31ea9007ba0f570c92d4 variant_id: 5aaa9b059007ba08c9ebaf59 - contact_id: 5aba31ea9007ba0f570c92d5 variant_id: 5aaa9b059007ba08c9ebaf59 responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: relationship: $ref: '#/components/schemas/Relationship' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a relationship description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/path_relationship_id' - in: query name: undo description: Undo relationship deletion schema: type: boolean format: boolean example: true responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/assign_tag/{tag_name}: put: summary: Assign a tag to a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/path_tag_name' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: object lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/unassign_tag/{tag_name}: put: summary: Remove a tag from a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/path_tag_name' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: object lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/change_status/{status_id}: put: summary: Change the status of a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/path_status_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/change_owner/{owner_id}: put: summary: Change the owner of a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' - $ref: '#/components/parameters/path_owner_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/star: put: summary: Apply a star to a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/unstar: put: summary: Remove star from a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' lead_sources: type: array items: $ref: '#/components/schemas/Lead_source' statuses: type: array items: type: object properties: status: $ref: '#/components/schemas/Status' tags: properties: tags: type: array items: $ref: '#/components/schemas/Tag' system_tags: type: array items: $ref: '#/components/schemas/Tag' contacts_count: $ref: '#/components/schemas/Contacts_count' team_stream: $ref: '#/components/schemas/Team_stream' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/close_sales_cycle: put: summary: Close the sales cycle for a specific contact description: >- Only do this when you are no longer actively trying to sell to this contact.
Add an optional closing comment with the `comment` field in the request body.

Note: cannot close sales cycle if the user has any active (not complete) actions with the contact.
tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: comment: type: string maxLength: 140 example: Joe is not interested in buying windmills at this time. responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/force_close_sales_cycle: put: summary: Force close the sales cycle for a specific contact description: >- This will first delete any actions assigned to the contact.
Add an optional closing comment with the `comment` field in the request body.

tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: comment: type: string maxLength: 140 example: Joe is not interested in buying windmills at this time. responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/reopen_sales_cycle: put: summary: Reopen the sales cycle for a specific contact description: '' tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/split: put: summary: Split a contact from their current company (and potentially to a new company) description: >- Contact is removed (split) from it's current company, and optionally joins another.
Send the field `company_name` in the body with the new company's name, or leave blank.

**Warning**: splitting the last contact from a company, will cause that company to be deleted, and loss of company data may occur e.g. company phone number or postal address.
tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' requestBody: required: true content: application/json: schema: properties: company_name: type: string description: The name of the company the contact is joining (leave blank to remain without a company) maxLength: 55 example: Fancy New Company Inc. responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/{contact_id}/pinned_attachments: get: summary: Gets a list of attachments pinned to this contact description: The list of pinned attachments is sorted based on "pinned_at" field, i.e. most recent attachments come first, the list of attachments is paginated. tags: - Contacts parameters: - $ref: '#/components/parameters/path_contact_id' responses: 200: description: 'OK' content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: pinned_attachments: type: array items: $ref: '#/components/schemas/Attachment' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/cascade: get: summary: Get contacts past the 10,000 contact in the account description: >- Defaults to contacts owned by the logged user, alpha sorted. This endpoint can get contacts above the 10,000 contact. Results returned in batches of 100. Pass the last `contact_id` of the last request into the next request to get the next batch of 100 contacts. tags: - Contacts responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contacts: type: array items: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' items_left: type: integer format: int32 description: Total number of items left readOnly: true example: 32500 next_set_url: type: string description: The URL to use to get the next batch of contacts readOnly: true example: https://app.onepagecrm.com/api/v3/contacts/cascade/5d2c8ca59b79b2ead94aa425 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /contacts/cascade/{last_id}: get: summary: Get contacts past the 10,000 contact in the account. description: >- Defaults to contacts owned by the logged user, alpha sorted. This endpoint can get contacts above the 10,000 contact. Results returned in batches of 100. Pass the last `contact_id` of the last request into the next request to get the next batch of 100 contacts. tags: - Contacts parameters: - name: last_id in: path required: true description: Contact ID schema: type: string minimum: 1 responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contacts: type: array items: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' items_left: type: integer format: int32 description: Total number of items left readOnly: true example: 32500 next_set_url: type: string description: The URL to use to get the next batch of contacts readOnly: true example: https://app.onepagecrm.com/api/v3/contacts/cascade/5d2c8ca59b79b2ead94aa425 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' #/contacts/cascade/{last_id} /action_stream: get: summary: Get a list of contacts prioritized by their next action description: >- Defaults to the logged API users action stream.
tags: - Action Stream parameters: - $ref: '#/components/parameters/query_team' # Search field values - $ref: '#/components/parameters/query_contacts_search' - $ref: '#/components/parameters/query_contacts_phone' - $ref: '#/components/parameters/query_url' # Boolean flags/filters - $ref: '#/components/parameters/query_action_stream' - $ref: '#/components/parameters/query_has_actions' - $ref: '#/components/parameters/query_has_actions_for_me' - $ref: '#/components/parameters/query_pending_deal' - $ref: '#/components/parameters/query_starred' - $ref: '#/components/parameters/query_waiting' # Related value constraints - $ref: '#/components/parameters/query_email' - $ref: '#/components/parameters/query_contacts_letter' - $ref: '#/components/parameters/query_custom_field_id' - $ref: '#/components/parameters/query_custom_field_value' - $ref: '#/components/parameters/query_lead_source' - $ref: '#/components/parameters/query_lead_source_id' - $ref: '#/components/parameters/query_status_id' - $ref: '#/components/parameters/query_contacts_owner_id' - $ref: '#/components/parameters/query_contacts_company_id' - $ref: '#/components/parameters/query_contacts_tag' - $ref: '#/components/parameters/query_contacts_filter_id' # Date filters - $ref: '#/components/parameters/query_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' # Sort order - $ref: '#/components/parameters/query_contacts_sort_by' - $ref: '#/components/parameters/query_order' # Pagination - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contacts: type: array items: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /team_stream: get: summary: Get a list of contacts prioritized by their next action description: >- Defaults to the action stream for entire account in a single list.
See the action stream of account users, by providing the `user_id` param.
tags: - Team Stream parameters: - $ref: '#/components/parameters/query_user_id' - $ref: '#/components/parameters/query_team' # Search field values - $ref: '#/components/parameters/query_contacts_search' - $ref: '#/components/parameters/query_contacts_phone' - $ref: '#/components/parameters/query_url' # Boolean flags/filters - $ref: '#/components/parameters/query_action_stream' - $ref: '#/components/parameters/query_has_actions' - $ref: '#/components/parameters/query_has_actions_for_me' - $ref: '#/components/parameters/query_pending_deal' - $ref: '#/components/parameters/query_starred' - $ref: '#/components/parameters/query_waiting' # Related value constraints - $ref: '#/components/parameters/query_email' - $ref: '#/components/parameters/query_contacts_letter' - $ref: '#/components/parameters/query_custom_field_id' - $ref: '#/components/parameters/query_custom_field_value' - $ref: '#/components/parameters/query_lead_source' - $ref: '#/components/parameters/query_lead_source_id' - $ref: '#/components/parameters/query_status_id' - $ref: '#/components/parameters/query_contacts_owner_id' - $ref: '#/components/parameters/query_contacts_company_id' - $ref: '#/components/parameters/query_contacts_tag' - $ref: '#/components/parameters/query_contacts_filter_id' # Date filters - $ref: '#/components/parameters/query_date_filter' - $ref: '#/components/parameters/query_since' - $ref: '#/components/parameters/query_until' - $ref: '#/components/parameters/query_modified_since' - $ref: '#/components/parameters/query_unmodified_since' # Sort order - $ref: '#/components/parameters/query_contacts_sort_by' - $ref: '#/components/parameters/query_order' # Pagination - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: contacts: type: array items: properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] company: $ref: '#/components/schemas/Company' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /notifications: get: summary: Get a list of notifications that user has description: >- Returns all notifications (except emails and links) for the given user tags: - Notifications parameters: # Pagination - $ref: '#/components/parameters/query_page' - $ref: '#/components/parameters/query_per_page' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: notifications: type: array items: properties: notification: $ref: '#/components/schemas/Notification' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /notifications/{notification_id}: get: summary: Get serialised notification by ID description: '' tags: - Notifications parameters: - $ref: '#/components/parameters/path_notification_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: notification: $ref: '#/components/schemas/Notification' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /notifications/{notification_id}/mark_as_read: post: summary: Marks given notification as read description: Marks given notification as read tags: - Notifications parameters: - $ref: '#/components/parameters/path_notification_id' responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: notification: $ref: '#/components/schemas/Notification' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /notifications/mark_all_as_read: post: summary: Marks all users' notifications as read description: Marks all users' notifications as read tags: - Notifications parameters: [] responses: 201: description: Created content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: type: object 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /webhooks: get: summary: Get all webhooks (associated with the logged API user's account) description: '' tags: - Web Hooks parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: webhooks: type: array items: $ref: '#/components/schemas/Webhook' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /webhooks/{webhook_id}: get: summary: Get a specific webhook description: '' tags: - Web Hooks parameters: - $ref: '#/components/parameters/path_webhook_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: $ref: '#/components/schemas/Webhook' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' delete: summary: Delete a specific webhook description: '' tags: - Web Hooks parameters: - $ref: '#/components/parameters/path_webhook_id' responses: 200: $ref: '#/components/responses/200' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /pipelines: get: summary: Get all pipelines (associated with the logged API user's account) description: '' tags: - Pipelines parameters: [] responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: pipelines: type: array items: properties: pipeline: $ref: '#/components/schemas/Pipeline' total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' /pipelines/{pipeline_id}: get: summary: Get a specific pipeline description: '' tags: - Pipelines parameters: - $ref: '#/components/parameters/path_pipeline_id' responses: 200: description: OK content: application/json: schema: properties: status: $ref: '#/components/schemas/Success/properties/status' message: $ref: '#/components/schemas/Success/properties/message' timestamp: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: pipeline: $ref: '#/components/schemas/Pipeline' 400: $ref: '#/components/responses/400' 401: $ref: '#/components/responses/401' 403: $ref: '#/components/responses/403' 404: $ref: '#/components/responses/404' 409: $ref: '#/components/responses/409' 500: $ref: '#/components/responses/500' components: schemas: Bootstrap: description: >- Bootstrap is a general wrapper around useful information you might need to interact with your OnePageCRM account using the API. properties: user_id: type: string format: bson-id description: ID of the logged API user readOnly: true example: 5aba31e99007ba0f570c12f7 auth_key: type: string description: Key used to sign API requests as a means of authentication readOnly: true example: c+g0Y3VGHdIztKbHcjVcOuwf34EmFlXI9Qot5hTvb2F= user: $ref: '#/components/schemas/User' team: type: array description: List of users who make up the rest of the logged API users team readOnly: true items: $ref: '#/components/schemas/User' account_type: type: string description: Descriptor for the type of the logged API user's account enum: - pro - trial - free readOnly: true example: pro settings: $ref: '#/components/schemas/Settings' cost_setup: $ref: '#/components/schemas/Cost_setup' custom_fields: type: array description: List of custom fields for the logged API user's account readOnly: true items: $ref: '#/components/schemas/Custom_field' company_fields: type: array description: List of company fields for the logged API user's account readOnly: true items: $ref: '#/components/schemas/Company_field' deal_fields: type: array description: List of deal fields for the logged API user's account readOnly: true items: $ref: '#/components/schemas/Deal_field' filters: type: array description: List of custom filters for the logged API's users account readOnly: true items: $ref: '#/components/schemas/Filter' call_results: type: array description: List of call results for the logged API's users account items: type: string readOnly: true example: interested: Interested not_interested: Not interested left_message: Left message no_answer: No answer other: Other call_results_order: type: array description: Order for the list of call results for the logged API's users account items: type: string readOnly: true example: - interested - not_interested - left_message - no_answer - other next_action_dates: type: array description: Quick date options for ease of date selection when creating new actions readOnly: true items: properties: number: type: integer format: int32 description: Number of periods readOnly: true example: 5 period: type: string description: Period type enum: - days - weeks - months readOnly: true example: days predefined_actions: type: array readOnly: true items: $ref: '#/components/schemas/Predefined_action' contact_titles: type: array description: List of titles which can be used to prefix the names of contacts items: type: string maxLength: 7 readOnly: true example: - Mr - Mrs - Ms User: description: >- Useful information about the logged user and other members of the team. Each can update their own info. Admins can update all. properties: id: type: string format: bson-id description: ID of the user readOnly: true example: 5aba31e99007ba0f570c12f7 first_name: type: string description: First name of the user example: Jane last_name: type: string description: Last name of the user example: Doe email: type: string description: Email address of the user example: jane.doe@{foo.bar} company_name: type: string description: Name of the company that the user works for example: Big Company Inc. account_rights: type: array description: List of permissions which the user possesses readOnly: true enum: - account_owner - admin - activity - edit_target - delete_contacts - delete_deals - pipeline - export - private_contacts items: type: string example: - activity - edit_target - pipeline - export - private_contacts photo_url: type: string description: URL of the user’s profile picture readOnly: true example: https://{foo.bar}/jane-doe.jpg country_code: type: string description: ISO-3166 country code of the users address readOnly: true example: IE bcc_email: type: string description: BCC email dropbox address of the user (you only see your own) readOnly: true example: 5abg31e93007ba0f470c92q6@users.onepagecrm.com google_contacts_email: type: string description: Google Contacts email address of the user (you only see your own) readOnly: true example: jane.doe@{googles.mail.service} Contact: description: >- Information about the people you are actively trying to sell to, and related sub-resources like Actions, Deals, Notes, Calls and Meetings. properties: id: type: string format: bson-id description: ID of the contact readOnly: true example: 5aba31ea9007ba0f570c92d4 title: type: string description: The title of the contact enum: [ Mr, Mrs, Ms ] example: Mr first_name: type: string description: First name of the contact maxLength: 25 example: Joe last_name: type: string description: Last name of the contact maxLength: 25 example: Bloggs job_title: type: string description: Job title of the contact maxLength: 1000 example: Engineer starred: type: boolean description: Is the contact starred? example: true default: false photo_url: type: string description: URL of the contact's photo readOnly: true example: https://{foo.bar}/joe-bloggs.jpg company_id: type: string format: bson-id description: ID of the company, to which the contact belongs example: 5aba31ea9007ba0f570c92d5 company_name: type: string description: Name of the company, to whom the contact belongs maxLength: 55 example: Morgan's Forensic Lab url: type: array description: URLs associated with the contact items: properties: type: type: string description: The type of URL enum: [website, blog, twitter, linkedin, xing, facebook, google_plus, other] example: linkedin value: type: string description: The URL associated with the contact example: https://www.linkedin.com/{joe.bloggs} phones: type: array description: Phone numbers associated with the contact items: properties: type: type: string description: The type of phone number enum: [work, mobile, home, direct, fax, skype, company, other] example: work value: type: string description: The phone number associated with the contact example: (912) 644-1770 emails: type: array description: Email addresses associated with the contact items: properties: type: type: string description: The type of email address enum: [work, home, other] example: work value: type: string description: The email address associated with the contact example: joe.bloggs@{foo.bar} address_list: description: An array of contact addresses. type: array maxItems: 2 items: $ref: '#/components/schemas/Typed_address' status: type: string description: Status of the contact readOnly: true example: Prospect status_id: type: string format: bson-id description: ID of the status of the contact example: 5e31e030849d781e837b6ba1 tags: type: array items: type: string example: [ Java, Android, iOS ] lead_source_id: type: string format: bson-id description: ID of the lead source of the contact example: email_web lead_source: type: string description: Display name of the lead source of the contact example: Email or Web background: type: string description: Background infomation about the contact maxLength: 10240 example: >- I met Joe Bloggs at the annual Eco Conference in Florida. Her company currently provides solar panels (along with a lot of other stuff) to the State Government of California, Nevada, Oregon, Arizona and Utah for capital building projects. Her current supplier is crazy expensive! I've asked to be able to tender for their next order. owner_id: type: string format: bson-id description: ID of the user, to whom the contact belongs example: 5aba31e99007ba0f570c92a5 default: Logged API user's ID custom_fields: type: array items: type: object properties: custom_field: $ref: '#/components/schemas/Custom_field' value: type: string description: Value for the custom field example: Summer letter: type: string description: The first letter of the contacts last name readOnly: true example: b pending_deal: type: boolean description: Does the contact have one or more pending deals? readOnly: true example: true total_pendings: type: number description: The total value of all pending deals for the contact readOnly: true example: 999.99 total_deals_count: type: integer format: int32 description: Number of deals associated with the contact readOnly: true example: 3 company_size: type: integer format: int32 description: Number of contacts within the contact's company readOnly: true example: 1 sales_closed_for: type: array description: A list of user IDs, for whom the sales cycle is closed readOnly: true items: type: string example: [ 5aba31e99007ba0f570c12f7 ] closed_sales: type: array description: A list of closed sales objects readOnly: true items: properties: user_id: type: string format: bson-id description: ID of the user, for whom the sales cycle is closed readOnly: true example: 5aba31e99007ba0f570c12f7 closed_at: type: integer format: unix-timestamp description: Time that the sales cycle was closed readOnly: true example: 1524818902 comment: type: string maxLength: 140 description: An optional message detailing why the sales cycle was closed readOnly: true example: google_contacts_data: description: The google contacts data associated with this contact readOnly: true properties: account_email: type: string description: Google contacts email readOnly: true example: jane.doe@{googles-mail-service} id: type: string description: Google contact id readOnly: true example: 342c5b5c08d4b0b2 saved_at: type: integer format: unix-timestamp description: Time the contact was saved to google readOnly: true example: 1522840153 created_at: type: string format: date-time description: Creation time of the contact readOnly: true example: '2018-05-16T11:52:09Z' modified_at: type: string format: date-time description: Last modification time of the contact readOnly: true example: '2018-05-16T11:52:09Z' Company: description: >- Referred to as 'organizations' in the web application. Companies are logical collections of Contacts and related sub-resources e.g. Deals, Actions and some basic info on the org. e.g. postal address, website. A Company may not be created directly or exist without a Contact. required: - name properties: id: type: string format: bson-id description: ID of the company readOnly: true example: 5aba31e99007ba0f570c92ac image: type: string description: Base64 encoded binary image example: data:image/png;base64,iVBORw... name: type: string description: Name of the company maxLength: 55 example: Crockett & Tubbs Security description: type: string description: Description of the company maxLength: 10240 example: For all your security needs phone: type: string description: Phone number of the company example: (912) 644-1771 photo_url: type: string description: URL to company logo example: https://someserver.com/someimage.png url: type: string description: URL of the company example: https://{foo.bar} address: $ref: '#/components/schemas/Address' company_fields: type: array items: type: object properties: company_field: $ref: '#/components/schemas/Company_field' value: type: string description: Value for the company field example: Large syncing_status: type: boolean description: Should all contacts in this company share the same status? example: true synced_status_id: type: boolean format: bson-id description: ID of the status, that all contacts within this company are synced to example: 5aaa9b039007ba08c9ebaf0a syncing_tags: type: boolean description: Should all contacts in this company share the same tags? example: true synced_tags: type: array description: Tags that all contacts within this company share items: type: string example: [ Java, Android, iOS ] contacts_count: type: integer format: int32 description: Number of contacts in this company readOnly: true example: 3 won_deals_count: type: integer format: int32 description: Number of deals closed with contacts in this company readOnly: true example: 5 total_won_amount: type: number description: The total value of the won deals with contacts in this company readOnly: true example: 999.99 pending_deals_count: type: integer format: int32 description: Number of the pending deals with contacts in this company readOnly: true example: 1 total_pending_amount: type: number description: The total value of the pending deals with contacts in this company readOnly: true example: 99.99 contacts: description: List of contacts in the comapny type: array readOnly: true items: type: object properties: contact: $ref: '#/components/schemas/Contact' next_actions: type: array items: $ref: '#/components/schemas/Action' next_action: $ref: '#/components/schemas/Action' queued_actions: type: array items: $ref: '#/components/schemas/Action' next_action_conflicts: type: array items: {} example: [] pending_deals: type: array readOnly: true items: type: object properties: deal: $ref: '#/components/schemas/Deal' created_at: type: string format: date-time description: Creation time of the company readOnly: true example: '2018-05-16T11:52:09Z' modified_at: type: string format: date-time description: Last modification time of the company readOnly: true example: '2018-05-16T11:52:09Z' Action: description: >- Completable tasks related to Contacts. ASAP first, then dated actions ordered by due date (overdue first), followed by waiting for (blocked) and finally queued actions (without any date). required: - assignee_id - contact_id - text properties: id: type: string format: bson-id description: ID of the action readOnly: true example: 5aeac8789007ba56ffca92b9 assignee_id: type: string format: bson-id description: ID of the user, to whom the action is assigned example: 5aaa9b009007ba08c9ebaef7 default: Logged API user's ID contact_id: type: string format: bson-id description: ID of the contact, with whom the action is associated example: 5aba31ea9007ba0f570c92d4 text: type: string description: The main text/description of the action maxLength: 140 example: '#1 Email Jane introducing our organization' status: type: string description: Status of the action enum: - asap - date - date_time - waiting - queued - queued_with_date - done example: date_time default: date date: type: string format: date description: >- Due date for the action (status must be one of `date`, `date_time` or `queued_with_date`) example: '2018-05-16' default: Today's date exact_time: type: integer format: unix-timestamp description: The UNIX Epoch time in seconds the action is due (status must be `date_time`) example: 1526472000 position: type: integer format: int32 description: The position of the action (in the list of queued actions) example: 1 done: type: boolean description: Has the action been marked as complete? readOnly: true example: false done_at: type: string format: date description: The date the action was completed (only returned, if action complete) readOnly: true example: '2018-05-16' created_at: type: string format: date-time description: Creation time of the action readOnly: true example: '2018-05-16T11:52:09Z' modified_at: type: string format: date-time description: Last modification time of the action readOnly: true example: '2018-05-16T12:52:09Z' Deal: description: >- Represent (potential) financial transactions with your contacts. Deals include information like amount, deal stage, closed date or expected close date. Deals support file attachments. required: - contact_id - owner_id - name properties: id: type: string format: bson-id description: ID of the deal readOnly: true example: 5aaa9b059007ba08c9ebaf58 contact_id: type: string format: bson-id description: ID of the contact, to whom the deal belongs example: 5aaa9b059007ba08c9ebaf58 owner_id: type: string format: bson-id description: ID of the user, to whom the deal belongs example: 5aba31e99007ba0f570c12f7 default: Logged API user's ID pipeline_id: type: string format: bson-id description: ID of a pipeline the deal belongs to example: 5cfa87a4849d7873db082f98 sales_pipeline_id: type: string format: bson-id description: ID of a sales pipeline the deal belongs to example: 5cfa87a4849d7873db082f98 name: type: string description: Name of the deal maxLength: 60 example: Solar panels text: type: string description: Extra notes related to the deal (supports `[b]bold[/b]` and `[i]italic[/i]` formatting) maxLength: 7168 example: Fingers crossed! stage: type: integer format: int32 description: >- A numerical representation of the progress of a pending deal (number ranging from 0 to 100 exclusive) example: 50 status: type: string description: Status of the deal enum: - pending - won - lost example: pending default: pending expected_close_date: type: string format: date description: The date the deal is expected to close (status should be `pending`) example: '2018-04-15' default: Today's date close_date: type: string format: date description: The date the deal actually closed (status should be `won` or `lost`) example: '2018-04-15' default: Today's date date: type: string format: date description: Creation date of the deal example: '2018-04-15' default: Today's date amount: type: number format: float description: The monitary value of the deal (per month, if multi-month deal) example: 99.99 default: 0.0 months: type: integer format: int32 description: Number of months the deal is to be paid for (1 for regular deals, 2+ for multi-month) example: 1 default: 1 cost: type: number format: float description: The monitary cost of the deal example: 0.0 default: 0.0 margin: type: number format: float description: Profit margin for the deal (`amount` minus `cost`) readOnly: true example: 99.99 total_amount: type: number format: float description: Product of amount and months (will only differ from `amount` field, if multi-month deal) readOnly: true example: 99.99 total_cost: type: number format: float description: Product of cost and months (will only differ from `cost` field, if multi-month deal) readOnly: true example: 0 commission_base: type: string description: Base used to calculate the commission of the deal enum: - amount - margin example: none commission_type: type: string description: Type of commission for the deal enum: - none - percentage - absolute example: none default: none commission: type: number format: float description: Commission payable for the deal example: 0.0 default: 0.0 commission_percentage: type: number format: float description: Commission percentage for the deal example: 0.0 default: 0.0 reason_lost_id: type: string format: bson-id description: ID of the reason lost readOnly: true example: 5aaa9b059007ba08c9ebaf58 deal_fields: type: array items: type: object properties: deal_field: $ref: '#/components/schemas/Deal_field' value: type: string description: Value for the deal field example: Large has_deal_items: type: boolean description: Does the deal have deal items? default: false example: true deal_items: type: array items: $ref: '#/components/schemas/Deal_item' author: type: string description: Shortened name of the creator of the deal example: Jane D. default: Logged API user has_related_notes: type: boolean description: Does the deal have related notes? readOnly: true example: true attachments: type: array readOnly: true items: $ref: '#/components/schemas/Attachment' contact_info: description: Information about the contact, to whom the deal belongs (read only). readOnly: true properties: contact_name: type: string description: Name of the contact associated with the deal readOnly: true example: Joe Bloggs company: type: string description: Name of the company associated with the deal readOnly: true example: Big Company Inc. owner: description: Information about the deal owner (read only). readOnly: true properties: id: type: string description: ID of the deal owner readOnly: true example: 5aba31e99007ba0f570c12f7 name: type: string description: Name of the deal owner readOnly: true example: Joe Bloggs email: type: string description: Email address of the deal owner readOnly: true example: joe.bloggs@{foo.bar} previous_pipeline_stages: description: Returns the last stage in which the deal was for each pipeline (pipeline_id => stage) This field is returned only when 'include_history=true' param is supplied in query string type: object readOnly: true example: "5da7b67a849d78737812437c": 40 created_at: type: string format: date-time description: Creation time of the deal readOnly: true example: '2018-03-15T16:10:45Z' modified_at: type: string format: date-time description: Last modification time of the deal readOnly: true example: '2018-03-15T16:10:45Z' Note: description: >- Allow you to keep track of additional information related to your contacts. Notes can include any information you feel is relevant e.g. interactions with that contact. Notes support file attachments. required: - contact_id - text properties: id: type: string format: bson-id description: ID of the note readOnly: true example: 5afc1b69d556730b580596cb contact_id: type: string format: bson-id description: ID of the contact, to whom the note belongs example: 5ae06ef9d55673108fe8877f text: type: string description: Extra details related to the note(supports `[b]bold[/b]` and `[i]italic[/i]` formatting) maxLength: 7168 example: I met Jane Doe at the ABC conference. She's interested in hearing about XYZ. date: type: string format: date description: Creation date of the note example: '2018-05-16' default: Today's date linked_deal_id: type: string format: bson-id description: ID the of the deal, to which the note is linked (`null` if no linked deal) nullable: true example: '' linked_deal_name: type: string description: Name of the deal, to which the note is linked (`""` if no linked deal) example: '' author: type: string description: Shortened name of the creator of the note example: Jane D. default: Logged API user attachments: type: array readOnly: true items: $ref: '#/components/schemas/Attachment' created_at: type: string format: date-time description: Creation time of the note readOnly: true example: '2018-05-16T11:52:09Z' modified_at: type: string format: date-time description: Last modification time of the note readOnly: true example: '2018-05-16T11:52:09Z' Call: description: >- Allow you to keep track of phone calls made to your contacts. Calls include information like the phone number dialled and the call result. Calls support file attachments. required: - contact_id properties: id: type: string format: bson-id description: ID of the call readOnly: true example: 5afc1b69d556730b580596cb contact_id: type: string format: bson-id description: ID of the contact, to whom the call belongs example: 5ae06ef9d55673108fe8877f text: type: string description: Extra details related to the call (supports `[b]bold[/b]` and `[i]italic[/i]` formatting) maxLength: 7168 example: Mary is interested in coming into the office on Tuesday. call_result: type: string format: bson-id description: ID of the `call_result` which best describes the result of the call example: interested call_time_int: type: integer format: unix-timestamp description: >- Time the call occurred in UNIX Epoch time in seconds (defaults to current time, if left blank). example: 1525273653 default: Current timestamp via: type: string description: Through which application did the call take place enum: - unknown - skype - jabber - talkdesk - phone example: phone default: unknown phone_number: type: string description: Phone number used to make the call example: (912) 644-1770 (mobile) recording_link: type: string description: URL of the recording of the call conversation nullable: true example: '' author: type: string description: Shortened name of the creator of the call example: Jane D. readOnly: true default: Logged API user attachments: type: array readOnly: true items: $ref: '#/components/schemas/Attachment' created_at: type: string format: date-time description: Creation time of the call readOnly: true example: '2018-05-16T11:52:09Z' modified_at: type: string format: date-time description: Last modification time of the call readOnly: true example: '2018-05-16T11:52:09Z' index: type: integer format: int32 description: Index of the call (in the results set) readOnly: true example: 1 Meeting: description: >- Allow you to keep track of phone meetings made to your contacts. meetings include information like the place and the meeting result. Meetings support file attachments. required: - contact_id properties: id: type: string format: bson-id description: ID of the meeting readOnly: true example: 5afc1b69d556730b580596cb contact_id: type: string format: bson-id description: ID of the contact, to whom the meeting belongs example: 5ae06ef9d55673108fe8877f text: type: string description: Extra details related to the meeting (supports `[b]bold[/b]` and `[i]italic[/i]` formatting) maxLength: 7168 example: Mary is interested in coming into the office on Tuesday. # meeting_result: # type: string # format: bson-id # description: ID of the `meeting_result` which best describes the result of the meeting # example: interested meeting_time_int: type: integer format: unix-timestamp description: >- Time the meeting occurred in UNIX Epoch time (defaults to current time, if left blank) example: 1525273653 default: Current timestamp place: type: string description: The place in which the meeting take place maxLength: 100 example: Meeting room 1 author: type: string description: Shortened name of the creator of the meeting example: Jane D. readOnly: true default: Logged API user attachments: type: array readOnly: true items: $ref: '#/components/schemas/Attachment' created_at: type: string format: date-time description: Creation time of the meeting readOnly: true example: '2018-05-16T11:52:09Z' modified_at: type: string format: date-time description: Last modification time of the meeting readOnly: true example: '2018-05-16T11:52:09Z' index: type: integer format: int32 description: Index of the meeting (in the results set) readOnly: true example: 1 Address: description: The physical address of a contact or company. properties: address: type: string description: Property name/number and street name example: Unit 5, Business Innovation Centre city: type: string description: Name of the city example: Upper Newcastle state: type: string description: Name of the state example: Galway zip_code: type: string description: Zip code example: H91 Y0T0 country_code: type: string description: ISO-3166 country code example: IE Typed_address: description: The physical address of a contact or company. properties: address: $ref: '#/components/schemas/Address/properties/address' city: $ref: '#/components/schemas/Address/properties/city' state: $ref: '#/components/schemas/Address/properties/state' zip_code: $ref: '#/components/schemas/Address/properties/zip_code' country_code: $ref: '#/components/schemas/Address/properties/country_code' type: type: string description: Type of the address default: work enum: - work - home - billing - delivery - other example: delivery Attachment: description: >- Additional files associated with Deals, Notes, Calls or Meetings. They can be uploaded and stored in S3, or stored in external providers i.e. Google Drive, Dropbox, Evernote. required: - filename - size properties: id: type: string format: bson-id description: ID of the attachment readOnly: true example: 5afc1ea9d556730b780096db filename: type: string description: Name of the attachment file example: mario.jpg custom_filename: type: string description: Custom name of the attachment file example: another_mario.jpg pinned: type: boolean description: Show if the attachment is pinned to its owner contact example: true pinned_at: type: string description: Shows pinned at timestamp. Is null if pinned == false example: '2022-01-24T10:42:39Z' size: type: integer format: int32 description: Size of the attachment file (in bytes) example: 3841 storage_provider: type: string description: Name of the storage provider (where the attachment file is stored) readOnly: true enum: - amazon - google_drive - dropbox - evernote example: amazon url: type: string description: External URL of the attachment file readOnly: true example: https://{foo.bar}/mario.jpg url_expires_at: type: string format: date-time description: The time the attachment URL expires readOnly: true example: '2018-05-16T13:06:53Z' thumbnail: type: object description: >- An image preview of the attachment file (if one exists) properties: url: readOnly: true type: string description: External URL of the attachment's thumbnail example: https://{foo.bar}/mario-thumbnail.jpg Relationship_Type: description: >- The relationship types that identifies the relationships between the contacts. required: - relationship_variants properties: id: type: string format: bson-id description: ID of the deal readOnly: true example: 5aaa9b059007ba08c9ebaf58 symmetrical: type: boolean description: Is the relationship symmetrical? (read only). readOnly: true example: true relationship_variants: type: array items: type: object properties: id: type: string format: bson-id description: ID of the relationship type readOnly: true example: 5aaa9b059007ba08c9ebaf59 name: type: string description: The relationship variant name example: Partner created_at: type: string format: date-time description: Creation time of the deal readOnly: true example: '2018-03-15T16:10:45Z' modified_at: type: string format: date-time description: Last modification time of the deal readOnly: true example: '2018-03-15T16:10:45Z' Related_contact: minItems: 2 maxItems: 2 type: array description: The contacts participating in the relationship along with their associated variant names items: type: object properties: variant_id: type: string format: bson-id description: ID of the relationship variant example: 5aaa9b059007ba08c9ebaf59 variant_name: type: string description: The name of the variant maxLength: 35 readOnly: true example: Partner contact_id: type: string format: bson-id description: ID of the contact example: 5aba31ea9007ba0f570c92d4 first_name: type: string description: The first name of the contact maxLength: 35 readOnly: true example: Joe last_name: type: string description: The last name of the contact maxLength: 35 readOnly: true example: Bloggs photo_url: type: string description: URL of the user’s profile picture readOnly: true example: "https://{foo.bar}/joe-bloggs.jpg" company_id: type: string format: bson-id description: ID of the company, to which the contact belongs readOnly: true example: 5aba31ea9007ba0f570c92d5 company_name: type: string description: Name of the company, to whom the contact belongs maxLength: 55 readOnly: true example: Morgan's Forensic Lab owner_id: type: string format: bson-id description: ID of the user, to whom the contact belongs readOnly: true example: 5aba31e99007ba0f570c92a5 example: - variant_id: 5aaa9b059007ba08c9ebaf59, variant_name: Partner, contact_id: 5aba31ea9007ba0f570c92d4, first_name: Joe, last_name: Bloggs, company_id: 5aba31ea9007ba0f570c92f1, company_name: Morgan's Forensic Lab, photo_url: https://{foo.bar}/joe-bloggs.jpg, owner_id: 5aba31ea9007ba0f570c92c3 - variant_id: 5aaa9b059007ba08c9ebaf59, variant_name: Partner, contact_id: 5aba31ea9007ba0f570c92d5, first_name: Jane, last_name: Doe, company_id: 5aba31ea9007ba0f570c92f3, company_name: Acme Inc, photo_url: https://{foo.bar}/jane-doe.jpg, owner_id: 5aba31ea9007ba0f570c92c3 Relationship: description: >- The relationship mapping between contacts required: - relationship_mapping - relationship_type properties: id: type: string format: bson-id description: ID of the deal readOnly: true example: 5aaa9b059007ba08c9ebaf57 relationship_type_id: type: string format: bson-id description: ID of the contact example: 5aaa9b059007ba08c9ebaf58 related_contacts: $ref: '#/components/schemas/Related_contact' created_at: type: string format: date-time description: Creation time of the deal readOnly: true example: '2018-03-15T16:10:45Z' modified_at: type: string format: date-time description: Last modification time of the deal readOnly: true example: '2018-03-15T16:10:45Z' Email_address: description: Email address with name to represent email header properties: address: type: string description: Type of the notification example: 'joes.boss@bar.foo' name: type: string nullable: true description: Type of the notification example: 'Joes Boss' Notification: description: A serialised notification. There are different types of notifications, each can have its own properties properties: id: type: string format: bson-id description: ID of the status readOnly: true example: 5aead4809007ba56ffca942e type: type: string description: Type of the notification enum: - assigned_action - action_with_time - contact_assigned - call - meeting - email - link - note readOnly: true example: assigned_action by: type: string description: User name that caused the notification readOnly: true example: Vlad K. read: type: boolean description: Tells if notification was marked as read example: true user_id: type: string format: bson-id description: The ID of affected user, ID of assignee user readOnly: true example: 5aead4809007ba56ffca942e contact_id: type: string format: bson-id description: The ID of a contact related to which the notification has been created readOnly: true example: 5aead4809007ba56ffca942e created_at: type: string #format: iso8601 description: Date which tells when the notification was created readOnly: true example: '2019-06-21T16:53:12Z' modified_at: type: string #format: iso8601 description: Date which tells when the notification was last updated readOnly: true example: '2019-06-21T16:53:12Z' mobile_data: type: object description: Data created for the purpose of push notifications for mobile apps readOnly: true properties: title: type: string description: Title of push notification readOnly: true example: 'Action assigned to you (by User N.)' body: type: string description: Body of push notification readOnly: true example: '17:13: in bulk' action_type: type: string description: Type of action readOnly: true example: 'action_with_time' Settings: description: Application settings for the logged API user e.g. localization and for the account e.g. deal stages. properties: reminder: $ref: '#/components/schemas/Reminder' time_zone: type: string description: The time zone, for the API logged user example: America/Los_Angeles not_working_days: type: string description: >- The days of the week, on which the user does not work (used to calculate the due date of promoted actions) enum: - none - weekend - sunday example: weekend default: none date_format: type: string description: The logged API users preferred format for date strings example: '%d/%m/%Y' time_with_ampm: type: boolean description: Use AM/PM (12-hour clock) for the time component of dates example: true listing_size: type: integer format: int32 description: The number of items requested per page when scrolling example: 10 default: 25 currency: type: string description: The currency for the account (only editable by admins) example: USD currency_symbol: type: string description: The currency symbol for the account (only editable by admins) example: $ separator: type: string description: Symbol used to represent a decimal separator example: '.' delimiter: type: string description: Symbol used to represent a thousands delimiter example: ',' popular_countries: type: array description: The last 5 countries that were used in contact/company addresses items: type: string readOnly: true example: - US - UK - IE - AU - DE deal_stages: type: array items: $ref: '#/components/schemas/Deal_stage' pipelines: type: array items: properties: pipeline: $ref: '#/components/schemas/Pipeline' default_contact_type: type: string description: Denotes whether the logged API user, thinks of sales as people or organizations enum: - company - individual example: company show_tidy_stream: type: boolean description: Only show contacts with actions in the action stream? example: false show_company_fields_with_contact: type: boolean description: Show organizational fields in contact view? example: true company_phone_enabled: type: boolean description: Is the company phone field enabled? example: true company_url_enabled: type: boolean description: Is the company URL field enabled? example: true company_address_enabled: type: boolean description: Is the company address field enabled? example: true company_description_enabled: type: boolean description: Is the company description field enabled? example: true send_push_notifications: type: boolean description: Should the user recieve push notifications? example: true clipper_beta: type: boolean description: Has the user enabled the clipper beta feature? example: false bcc_email_enabled: type: boolean description: Has the user enabled the Bcc Capture address? example: true Status: description: >- Values which help qualify where contacts are in the sales pipeline. The list of Statuses is already populated but it may be updated if needed, to better fit your organization. required: - text - color properties: id: type: string format: bson-id description: ID of the status readOnly: true example: 5aead4809007ba56ffca942e status: description: Type of the status type: string enum: - lead - prospect - customer - inactive - general - custom1 - custom2 - customX readOnly: true example: prospect default: lead text: type: string description: Display text of the status maxLength: 20 example: Prospect description: type: string description: Longer description of what the status is for maxLength: 33 example: Actively trying to sell to these people color: type: string format: hex-color description: The color of the status (six character hex value) enum: - '666666' - '3399ff' - 'cc0000' - 'f96600' - '000000' - 'ff00ff' - '009900' example: 'f96600' counts: type: integer format: int32 description: Number of contacts the (logged API) user owns, with the status readOnly: true example: 3 total_count: type: integer format: int32 description: Number of contacts the entire team owns, with the status readOnly: true example: 3 action_stream_count: type: integer format: int32 description: Number of contacts the (logged API) user has actions with, who also have the status readOnly: true example: 2 team_counts: type: array description: Number of contacts, with the status (for each team member) readOnly: true items: properties: user_id: $ref: '#/components/schemas/User/properties/id' counts: type: integer format: int32 description: Number of contacts the team member owns, with the status readOnly: true example: 4 Lead_source: description: >- A way to classify the source of any contact that is added to OnePageCRM. Like Statuses, this list is pre-populated, and can be later edited to fit individual needs. required: - text properties: id: type: string format: bson-id description: ID of the lead source readOnly: true example: advertisement text: type: string description: Description of the lead source maxLength: 40 example: Advertisement counts: type: integer format: int32 description: Number of contacts the (logged API) user owns, with the lead source readOnly: true example: 4 total_count: type: integer format: int32 description: Number of contacts the entire team owns, with the lead source readOnly: true example: 7 action_stream_count: type: integer format: int32 description: Number of contacts the (logged API) user has actions with, who also have the lead source readOnly: true example: 2 team_counts: type: array description: Number of contacts, with the lead source (for each team member) readOnly: true items: properties: user_id: $ref: '#/components/schemas/User/properties/id' counts: type: integer format: int32 description: Number of contacts the team member owns, with the lead source readOnly: true example: 4 Filter: description: >- Allow you to query contacts in your own custom way. These filters can only be created on the website but they can be used through the API. properties: id: type: string format: bson-id description: ID of the custom filter readOnly: true example: 5b606e239007ba1e528d9557 name: type: string description: Name of the custom filter readOnly: true example: Jane's large deals conditions: type: array description: Conditions of the custom filter readOnly: true items: type: string example: - - deal_owner_id - is - 5aba31e99007ba0f570c12f7 - - deal_value - greater - '1000' Tag: description: >- An additional means of labeling and/or identifying contacts in OnePageCRM. properties: name: type: string description: Name of the tag example: VIP counts: type: integer format: int32 description: Number of contacts the (logged API) user owns, with the tag readOnly: true example: 2 total_count: type: integer format: int32 description: Number of contacts the entire team owns, with the tag readOnly: true example: 4 action_stream_count: type: integer format: int32 description: Number of contacts the (logged API) user has actions with, who also have the tag readOnly: true example: 1 Predefined_action: description: >- Template actions users may use frequently in their sales process. Referred to as 'Saved Actions' in the web application. required: - text - days properties: id: type: string format: bson-id description: ID of the predefined action readOnly: true example: 5acddaa7d556733c507tf405 text: type: string description: Description text of the predefined action example: '#1 Email [firstname] introducing our organization' days: type: integer format: int32 description: Suggested number of days until the action becomes due example: 4 Predefined_item: description: >- A user-configured item which can aid in the creation of deal items properties: id: type: string format: bson-id description: ID of the predefined item readOnly: true example: 5c79510e9007ba3f7519e819 name: type: string description: Name of the predefined item example: Solar panels description: type: string description: Description text of the predefined item example: Photovoltaic solar panels (2019 model) cost: type: number format: float description: Cost of the predefined item example: 95.00 price: type: number format: float description: Price of the predefined item example: 149.99 position: type: integer format: int32 description: Position of the predefined item in the items list readOnly: true example: 1 item_group_id: type: string format: bson-id description: ID of the predefined item group (or empty if the item is not in a group) readOnly: true example: 5c9a53599007ba58f13c8119 Deal_item: description: >- A user-configured item representing a product or service, which can be used to standardize deal creation required: - name - description - cost - price - qty properties: id: type: string format: bson-id readOnly: true description: ID of the deal item example: 5c7973019007ba3f7519e86a name: type: string description: Name of the deal item example: Solar panels description: type: string description: Description text of the deal item example: Photovoltaic solar panels (2019 model) cost: type: number format: float description: Cost of the deal item example: 95.00 price: type: number format: float description: Price of the deal item example: 149.99 amount: type: number format: float readOnly: true description: Amount of the deal items example: 299.98 qty: type: integer format: int32 description: Quantity of deal items example: 2 deal_id: type: string format: bson-id readOnly: true description: ID of the parent deal example: 5aaa9b059007ba08c9ebaf58 predefined_item_id: type: string format: bson-id description: ID of the predefined item used for deal item creation (can be empty) example: 5c6abf565481dd28ff1bc6a8 position: type: integer format: int32 readOnly: true description: Position of the predefined item in the items list example: 1 created_at: type: string format: date-time readOnly: true description: Creation time of the deal item example: '2019-03-01T17:59:29Z' modified_at: type: string format: date-time readOnly: true description: Last modification time of the deal item example: '2019-03-01T17:59:29Z' Predefined_item_group: description: >- A grouping of predefined/deal items. Useful if items can be sold as part of a package or compliment one another properties: id: type: string format: bson-id description: ID of the predefined item group readOnly: true example: 5c79510e9007ba3f7519e819 name: type: string description: Name of the predefined item group example: Electronics position: type: integer format: int32 description: Position of the group in the list of predefined item groups readOnly: true example: 1 count: type: integer format: int32 description: Number of predefined items in the predefined item group readOnly: true example: 2 item_ids: type: array description: List of IDs of the predefined/deal items in the predefined item group readOnly: true items: type: string format: bson-id example: - 5c79510e9007ba3f7519e819 - 5c9a53349007ba58f13c8118 Custom_field: description: Extra user-configurable data fields for Contacts. Only editable by admins. required: - name - type properties: id: type: string format: bson-id description: ID of the custom field readOnly: true example: 5aad9b039007ba18c9ebad13 name: type: string description: Name of the custom field maxLength: 60 example: Favorite season type: type: string description: >- Type of the custom field. There are several types of custom fields that may store data in different formats. External ID type is a special type introduced for referencing entities in the external systems. It's value is unique amid the whole system. Secton divider type is introduced just for visual purpose: it allows grouping custom fields. If custom fields in the section don't have values then they are hidden in the 'view' UI (but always shown in 'edit' UI). This logic is applied in the API: if a contact doesn't have values for all the custom fields in the section then this section divider custom field isn't exposed in the API (along with other custom fields inside the section). enum: - anniversary - date - multi_line_text - multiple_choice - number - select_box - single_line_text - external_id - section_divider example: select_box position: type: integer format: int32 description: The position of the custom field in the list example: 2 choices: description: >- A list of possible choices (for fields of type `multiple_choice` or `select_box`) type: array items: type: string maxItems: 60 example: - Spring - Summer - Autumn - Winter Company_field: description: Extra user-configurable data fields for Companies. Only editable by admins. required: - name - type properties: id: type: string format: bson-id description: ID of the company field readOnly: true example: 5aad9b039007ba28c9ebad56 name: type: string description: Name of the company field maxLength: 60 example: Company size type: type: string description: >- Type of the company field. There are several types of custom fields that may store data in different formats. External ID type is a special type introduced for referencing entities in the external systems. It's value is unique amid the whole system. Secton divider type is introduced just for visual purpose: it allows grouping custom fields. If custom fields in the section don't have values then they are hidden in the 'view' UI (but always shown in 'edit' UI). This logic is applied in the API: if a company doesn't have values for all the custom fields in the section then this section divider custom field isn't exposed in the API (along with other custom fields inside the section). enum: - date - multi_line_text - multiple_choice - number - select_box - single_line_text - external_id - section_divider example: select_box position: type: integer format: int32 description: The position of the company field in the list example: 2 choices: description: >- A list of possible choices (for fields of type `multiple_choice` or `select_box`) type: array items: type: string maxItems: 60 example: - Small - Medium - Large Deal_field: description: Extra user-configurable data fields for Deals. Only editable by admins. required: - name - type properties: id: type: string format: bson-id description: ID of the deal field readOnly: true example: 5aad9b039007ba28c9ebad56 name: type: string description: Name of the deal field maxLength: 60 example: Deal size type: description: >- Type of the deal field. There are several types of custom fields that may store data in different formats. External ID type is a special type introduced for referencing entities in the external systems. It's value is unique amid the whole system. Secton divider type is introduced just for visual purpose: it allows grouping custom fields. If custom fields in the section don't have values then they are hidden in the 'view' UI (but always shown in 'edit' UI). This logic is applied in the API: if a deal doesn't have values for all the custom fields in the section then this section divider custom field isn't exposed in the API (along with other custom fields inside the section). type: string enum: - date - multi_line_text - multiple_choice - number - select_box - single_line_text - external_id - section_divider example: select_box position: type: integer format: int32 description: The position of the deal field in the list example: 2 choices: description: >- A list of possible choices (for fields of type `multiple_choice` or `select_box`) type: array items: type: string maxItems: 60 example: - Small - Medium - Large Cost_setup: description: Settings related to deals e.g. cost, commission. Disabled by default. required: - commission_base properties: cost_enabled: type: boolean description: Is the cost field enabled for deals? example: true readOnly: true cost_required: type: boolean description: Is the cost field required when saving a deal? deprecated: true example: false readOnly: true commission_base: type: string description: The base by which commission is to be calculated for deals enum: - amount - margin example: amount commission_percentage: type: number format: float description: The default percentage by which the commission is to be calculated for deals (in the range 0.0 < commission_percentage < 100.0) example: 12.5 default: 10.0 Deal_stage: description: The various stages that a deal goes through in the sales pipeline. properties: stage: type: integer format: int32 description: >- Integer in the range 0 to 100 (exclusive) indicating how close a deal is to being closed readOnly: true example: 80 label: type: string description: Text description for the deal stage of the deal readOnly: true example: Negotiation Contacts_count: description: >- Counters showing the number of contacts per letter. The `all` object represents the entire account, while the `users` array contains the same breakdown but per user. properties: all: description: Counters for the entire account type: array items: properties: '1': type: integer format: int32 description: Contacts who's name begins with a non-alphabetic character readOnly: true example: 1 a: type: integer format: int32 description: Contacts who's name begins with A readOnly: true example: 2 b: type: integer format: int32 description: Contacts who's name begins with B readOnly: true example: 2 c: type: integer format: int32 description: Contacts who's name begins with C readOnly: true example: 1 d: type: integer format: int32 description: Contacts who's name begins with D readOnly: true example: 1 e: type: integer format: int32 description: Contacts who's name begins with E readOnly: true example: 0 f: type: integer format: int32 description: Contacts who's name begins with F readOnly: true example: 0 g: type: integer format: int32 description: Contacts who's name begins with G readOnly: true example: 3 h: type: integer format: int32 description: Contacts who's name begins with H readOnly: true example: 0 i: type: integer format: int32 description: Contacts who's name begins with I readOnly: true example: 3 j: type: integer format: int32 description: Contacts who's name begins with J readOnly: true example: 0 k: type: integer format: int32 description: Contacts who's name begins with K readOnly: true example: 0 l: type: integer format: int32 description: Contacts who's name begins with L readOnly: true example: 2 m: type: integer format: int32 description: Contacts who's name begins with M readOnly: true example: 2 n: type: integer format: int32 description: Contacts who's name begins with N readOnly: true example: 3 o: type: integer format: int32 description: Contacts who's name begins with O readOnly: true example: 0 p: type: integer format: int32 description: Contacts who's name begins with P readOnly: true example: 2 q: type: integer format: int32 description: Contacts who's name begins with Q readOnly: true example: 0 r: type: integer format: int32 description: Contacts who's name begins with R readOnly: true example: 0 s: type: integer format: int32 description: Contacts who's name begins with S readOnly: true example: 0 t: type: integer format: int32 description: Contacts who's name begins with T readOnly: true example: 1 u: type: integer format: int32 description: Contacts who's name begins with U readOnly: true example: 1 v: type: integer format: int32 description: Contacts who's name begins with V readOnly: true example: 1 w: type: integer format: int32 description: Contacts who's name begins with W readOnly: true example: 0 x: type: integer format: int32 description: Contacts who's name begins with X readOnly: true example: 1 y: type: integer format: int32 description: Contacts who's name begins with Y readOnly: true example: 1 z: type: integer format: int32 description: Contacts who's name begins with Z readOnly: true example: 0 total_count: type: integer format: int32 readOnly: true example: 27 users: description: Counters per user type: array items: properties: '1': type: integer format: int32 description: Contacts who's name begins with a non-alphabetic character readOnly: true example: 1 a: type: integer format: int32 description: Contacts who's name begins with A readOnly: true example: 2 b: type: integer format: int32 description: Contacts who's name begins with B readOnly: true example: 2 c: type: integer format: int32 description: Contacts who's name begins with C readOnly: true example: 1 d: type: integer format: int32 description: Contacts who's name begins with D readOnly: true example: 1 e: type: integer format: int32 description: Contacts who's name begins with E readOnly: true example: 0 f: type: integer format: int32 description: Contacts who's name begins with F readOnly: true example: 0 g: type: integer format: int32 description: Contacts who's name begins with G readOnly: true example: 3 h: type: integer format: int32 description: Contacts who's name begins with H readOnly: true example: 0 i: type: integer format: int32 description: Contacts who's name begins with I readOnly: true example: 3 j: type: integer format: int32 description: Contacts who's name begins with J readOnly: true example: 0 k: type: integer format: int32 description: Contacts who's name begins with K readOnly: true example: 0 l: type: integer format: int32 description: Contacts who's name begins with L readOnly: true example: 2 m: type: integer format: int32 description: Contacts who's name begins with M readOnly: true example: 2 n: type: integer format: int32 description: Contacts who's name begins with N readOnly: true example: 3 o: type: integer format: int32 description: Contacts who's name begins with O readOnly: true example: 0 p: type: integer format: int32 description: Contacts who's name begins with P readOnly: true example: 2 q: type: integer format: int32 description: Contacts who's name begins with Q readOnly: true example: 0 r: type: integer format: int32 description: Contacts who's name begins with R readOnly: true example: 0 s: type: integer format: int32 description: Contacts who's name begins with S readOnly: true example: 0 t: type: integer format: int32 description: Contacts who's name begins with T readOnly: true example: 1 u: type: integer format: int32 description: Contacts who's name begins with U readOnly: true example: 1 v: type: integer format: int32 description: Contacts who's name begins with V readOnly: true example: 1 w: type: integer format: int32 description: Contacts who's name begins with W readOnly: true example: 0 x: type: integer format: int32 description: Contacts who's name begins with X readOnly: true example: 1 y: type: integer format: int32 description: Contacts who's name begins with Y readOnly: true example: 1 z: type: integer format: int32 description: Contacts who's name begins with Z readOnly: true example: 0 total_count: type: integer format: int32 readOnly: true example: 27 user_id: $ref: '#/components/schemas/User/properties/id' Team_stream: description: >- Counters showing the number of entries in the action stream. The `all` object represents the entire account, while the `users` array contains the same breakdown but per user. properties: all: type: integer format: int32 description: Counters for the entire account (`team_stream`/`action_stream?team=true`) readOnly: true example: 10 users: type: array description: Counters broken down per user (`team_stream?user_id={ID}`) readOnly: true items: properties: user_id: $ref: '#/components/schemas/User/properties/id' counts: type: integer format: int32 description: The number of entries in the action steam for the user readOnly: true example: 5 Webhook: description: >- A simple, effective way to be notified when things happen in OnePageCRM. For more information, go to the 'WebHooks & More' tab at the top of the page. properties: id: type: string format: bson-id description: ID of the webhook readOnly: true example: 5417f8291da41712270G0042 name: type: string description: Name of the webhook maxLength: 140 example: Awesome integration hook_url: type: string description: URL of the webhook example: https://{webhook.catching.machine} secretkey: type: string description: Secret key of the webhook example: '' Pipeline: description: >- Information about the sales process of products or services, including deal stages. properties: id: type: string format: bson-id description: ID of the pipeline readOnly: true example: 5c96306b849d78b896b6f8ca name: type: string description: Name of the pipeline example: Default pipeine type: type: string description: Type of the pipeline (sales or delivery) example: sales default: type: boolean description: Is this pipeline the default pipeline in the account? example: true won_column_enabled: type: boolean description: Specifies if the `WON` column is enabled for the pipeline example: false won_column_name: type: string description: Name of the `WON` column for the pipeline example: Payment stages: type: array description: Deal stages defined for the pipeline items: $ref: '#/components/schemas/Deal_stage' Reminder: description: Details about the sales action reminder email. properties: type: type: string description: The criteria which should cause a sales reminder email to be sent enum: - never - every_day - new_task example: new_task hour: type: integer format: int32 description: The time the sales reminder time is to be sent (assuming the criteria is met) example: 6 Success: description: Structure of response for successful request. properties: status: type: integer format: int32 description: Response code readOnly: true example: 0 message: type: string description: Response message readOnly: true example: OK timestamp: type: integer format: unix-timestamp description: Response time readOnly: true example: 1528373119 data: type: object properties: total_count: $ref: '#/components/schemas/Page_data/properties/total_count' page: $ref: '#/components/schemas/Page_data/properties/page' per_page: $ref: '#/components/schemas/Page_data/properties/per_page' max_page: $ref: '#/components/schemas/Page_data/properties/max_page' Page_data: description: Pagination meta-data related to response. properties: total_count: type: integer format: int32 description: Total number of items readOnly: true example: 1 page: type: integer format: int32 description: Current page number readOnly: true example: 1 per_page: type: integer format: int32 description: Number of items returned in each page readOnly: true example: 10 max_page: type: integer format: int32 description: The page number of the last page of items readOnly: true example: 1 parameters: path_user_id: name: user_id in: path required: true description: User ID schema: type: string minimum: 1 path_lead_source_id: name: lead_source_id in: path required: true description: Lead Source ID schema: type: string minimum: 1 path_status_id: name: status_id in: path required: true description: Status ID schema: type: string minimum: 1 path_deal_field_id: name: deal_field_id in: path required: true description: Deal Field ID schema: type: string minimum: 1 path_custom_field_id: name: custom_field_id in: path required: true description: Custom Field ID schema: type: string minimum: 1 path_company_field_id: name: company_field_id in: path required: true description: Company Field ID schema: type: string minimum: 1 path_predefined_action_id: name: predefined_action_id in: path required: true description: Predefined Action ID schema: type: string minimum: 1 path_predefined_item_id: name: predefined_item_id in: path required: true description: Predefined Item ID schema: type: string minimum: 1 path_predefined_item_group_id: name: predefined_item_group_id in: path required: true description: Predefined Item Group ID schema: type: string minimum: 1 path_note_id: name: note_id in: path required: true description: Note ID schema: type: string minimum: 1 path_deal_id: name: deal_id in: path required: true description: Deal ID schema: type: string minimum: 1 path_call_id: name: call_id in: path required: true description: Call ID schema: type: string minimum: 1 path_meeting_id: name: meeting_id in: path required: true description: Meeting ID schema: type: string minimum: 1 path_attachment_id: name: attachment_id in: path required: true description: Attachment ID schema: type: string minimum: 1 path_action_id: name: action_id in: path required: true description: Action ID schema: type: string minimum: 1 path_relationship_type_id: name: relationship_type_id in: path required: true description: Relationship type ID schema: type: string minimum: 1 path_relationship_id: name: relationship_id in: path required: true description: Relationship ID schema: type: string minimum: 1 path_company_id: name: company_id in: path required: true description: Company ID schema: type: string minimum: 1 path_contact_id: name: contact_id in: path required: true description: Contact ID schema: type: string minimum: 1 path_tag_name: name: tag_name in: path required: true description: Tag name schema: type: string minimum: 1 path_owner_id: name: owner_id in: path required: true description: Owner ID schema: type: string minimum: 1 path_webhook_id: name: webhook_id in: path required: true description: Webhook ID schema: type: string minimum: 1 path_pipeline_id: name: pipeline_id in: path required: true description: Pipeline ID schema: type: string minimum: 1 path_filter_id: name: filter_id in: path required: true description: Filter ID schema: type: string minimum: 1 path_notification_id: name: notification_id in: path required: true description: Notification ID schema: type: string minimum: 1 query_companies_name: name: name in: query required: false description: Search companies by name schema: type: string example: Big Company Inc query_deals_name: name: name in: query required: false description: Search deals by name schema: type: string example: Solar panels query_contacts_phone: name: phone in: query required: false description: Search contacts by phone number schema: type: string example: 3736344458 query_companies_phone: name: phone in: query required: false description: Search companies by phone number schema: type: string example: 3736344458 query_contacts_letter: name: letter in: query required: false description: >- Return contacts whose last name begins with specified letter (or company name, if last name not present) schema: type: string example: a query_companies_letter: name: letter in: query required: false description: >- Return company whose name begins with specified letter schema: type: string example: a query_assignee_id: name: assignee_id in: query required: false description: Return actions assigned to a specific user schema: type: string example: 5aba36b19007ba0f570c9523 query_done: name: done in: query required: false description: Should only return completed actions (i.e. have status `done`)? schema: type: boolean example: false query_actions_status: name: status in: query required: false description: >- Return actions of a particular status (i.e. `asap`, `date`, `date_time`, `waiting`, `queued`, `queued_with_date`, or `done`) schema: type: string example: date_time query_deals_status: name: status in: query required: false description: >- Return deals of a particular status (i.e. `pending`, `won`, `lost`, or `closed`) schema: type: string example: pending query_stage: name: stage in: query required: false description: Return deals (of status `pending`) with specified deal stage schema: type: integer example: 60 query_user_id: name: user_id in: query required: false description: >- Get the action stream of another user (leave blank for entire account in a single list) schema: type: string example: 5aaa9b009007ba08c9ebaef7 query_contacts_search: name: search in: query required: false description: Search contacts by contact name, company name or phone number schema: type: string example: Jane Doe query_companies_search: name: search in: query required: false description: Search companies by name schema: type: string example: Big Company Inc query_deals_search: name: search in: query required: false description: Search deals by deal name, contact name or company name schema: type: string example: Solar panels query_relationship_types_search: name: search in: query required: false description: Search relationship types by relationship variants schema: type: string example: Partner query_relationships_search: name: search in: query required: false description: Search relationships by contact name or relationship-variant name schema: type: string example: Jack Aranda query_contacts_owner_id: name: owner_id in: query required: false description: Return contacts owned by a specific user schema: type: string example: 5aba36b19007ba0f570c9523 query_deals_owner_id: name: owner_id in: query required: false description: >- Return deals owned by a specific user schema: type: string example: 5aba36b19007ba0f570c9523 query_contacts_tag: name: tag in: query required: false description: >- Filter contacts by tag (only use one of `company_id`, `tag` or `filter_id` at a time) schema: type: string example: VIP query_deals_tag: name: tag in: query required: false description: >- Filter deals by tag (only use one of `contact_id`, `company_id`, `tag` or `filter_id` at a time) schema: type: string example: VIP query_contacts_filter_id: name: filter_id in: query required: false description: >- Apply filter to contact listing (only use one of `company_id`, `tag` or `filter_id` at a time) schema: type: string example: 5ae9cc2a9007ba5b856c7bb8 query_deals_filter_id: name: filter_id in: query required: false description: >- Apply filter to deal listing (only use one of `contact_id`, `company_id`, `tag` or `filter_id` at a time) schema: type: string example: 5ae9cc2a9007ba5b856c7bb8 query_actions_date_filter: name: date_filter in: query required: false description: >- Signals which date field to be used for only returning resources, added or edited, in a specified date range (only to be used with `since` and/or `until`, not with `modified_since` or `unmodified_since`) schema: type: string enum: - created_at - modified_at - updated_at - date - close_date query_deals_date_filter: name: date_filter in: query required: false description: >- Signals which date field to be used for only returning resources, added or edited, in a specified date range (only to be used with `since` and/or `until`, not with `modified_since` or `unmodified_since`) schema: type: string enum: - created_at - modified_at - updated_at - date - close_date - expected_close_date query_notes_date_filter: name: date_filter in: query required: false description: >- Signals which date field to be used for only returning resources, added or edited, in a specified date range (only to be used with `since` and/or `until`, not with `modified_since` or `unmodified_since`) schema: type: string enum: - created_at - modified_at - updated_at - date query_calls_date_filter: name: date_filter in: query required: false description: >- Signals which date field to be used for only returning resources, added or edited, in a specified date range (only to be used with `since` and/or `until`, not with `modified_since` or `unmodified_since`) schema: type: string enum: - created_at - modified_at - updated_at - call_time query_meetings_date_filter: name: date_filter in: query required: false description: >- Signals which date field to be used for only returning resources, added or edited, in a specified date range (only to be used with `since` and/or `until`, not with `modified_since` or `unmodified_since`) schema: type: string enum: - created_at - modified_at - updated_at - meeting_time query_date_filter: name: date_filter in: query required: false description: >- Signals which date field to be used for only returning resources, added or edited, in a specified date range (only to be used with `since` and/or `until`, not with `modified_since` or `unmodified_since`) schema: type: string enum: - created_at - modified_at - updated_at query_since: name: since in: query required: false description: >- Specifies the start of the date range to filter resources, which have been added or edited (use with `date_filter` - date must be in format `YYYY-MM-DD` or UNIX timestamp) schema: type: string format: date-time example: '2018-07-01' query_until: in: query name: until description: >- Specifies the end of the date range to filter resources, which have been added or edited (use with `date_filter` - date must be in format `YYYY-MM-DD` or UNIX timestamp) schema: type: string format: date-time example: '2018-07-31' query_modified_since: in: query name: modified_since description: >- Return only resources that were modified since specified time (cannot be used with `date_filter` - date must be in format `YYYY-MM-DD` or UNIX timestamp) schema: type: string format: date-time example: '2018-07-01' query_unmodified_since: in: query name: unmodified_since description: >- Return only resources that were unmodified since specified time (cannot be used with `date_filter` - date must be in format `YYYY-MM-DD` or UNIX timestamp) schema: type: string format: date-time example: '2018-07-01' query_actions_contact_id: name: contact_id in: query description: >- Return actions for a specific contact (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 5ae06ef9d55673108fe8877b query_deals_contact_id: name: contact_id in: query description: >- Return deals for a specific contact (only use one of `contact_id`, `company_id`, `tag` or `filter_id` at a time) required: false schema: type: string example: 5ae06ef9d55673108fe8877b query_notes_contact_id: name: contact_id in: query description: >- Return notes for a specific contact (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 5ae06ef9d55673108fe8877b query_calls_contact_id: name: contact_id in: query description: >- Return calls for a specific contact (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 5ae06ef9d55673108fe8877b query_meetings_contact_id: name: contact_id in: query description: >- Return meetings for a specific contact (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 5ae06ef9d55673108fe8877b query_emails_contact_id: name: contact_id in: query description: >- Return emails for a specific contact (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 5ae06ef9d55673108fe8877b query_contacts_company_id: name: company_id in: query description: >- Return contacts from a specific company (only use one of `company_id`, `tag` or `filter_id` at a time) required: false schema: type: string example: 6se06df9d55673108re84745 query_deals_company_id: name: company_id in: query description: >- Return deals for a specific company (only use one of `contact_id`, `company_id`, `tag` or `filter_id` at a time) required: false schema: type: string example: 6se06df9d55673108re84745 query_actions_company_id: name: company_id in: query description: >- Return actions for a specific company (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 6se06df9d55673108re84745 query_notes_company_id: name: company_id in: query description: >- Return notes for a specific company (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 6se06df9d55673108re84745 query_calls_company_id: name: company_id in: query description: >- Return calls for a specific company (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 6se06df9d55673108re84745 query_meetings_company_id: name: company_id in: query description: >- Return meetings for a specific company (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 6se06df9d55673108re84745 query_emails_company_id: name: company_id in: query description: >- Return emails for a specific company (only use one of `contact_id` or `company_id` at a time) required: false schema: type: string example: 6se06df9d55673108re84745 query_action_stream: name: action_stream in: query description: Only return results that are also in action stream required: false schema: type: boolean example: true query_email: name: email in: query description: >- Return contacts whose email matches that provided with this query param required: false schema: type: string example: abc@example.com query_has_actions: name: has_actions in: query description: >- Only return contacts who are owned by the logged user, and have actions for any user (can not query by `has_actions` and `has_actions_for_me` at the same time) required: false schema: type: boolean example: true query_has_actions_for_me: name: has_actions_for_me in: query description: >- Only return contacts who are owned by, and have actions for, the logged user (can not query by `has_actions` and `has_actions_for_me` at the same time) required: false schema: type: boolean example: true query_has_actions_today: name: has_actions_today in: query description: >- Only return contacts who are owned by, and have actions today for, the logged user required: false schema: type: boolean example: true query_lead_source: name: lead_source in: query description: >- Return contacts of a specific lead source (only use one of `lead_source` and `lead_source_id` at a time) required: false schema: type: string example: '' query_lead_source_id: name: lead_source_id in: query description: >- Return contacts of a specific lead source (only use one of `lead_source` and `lead_source_id` at a time) required: false schema: type: string example: 5aec63769007ba365a4e9ba0 query_pending_deal: name: pending_deal in: query description: >- Only return contacts who have a pending deal required: false schema: type: boolean example: true query_starred: name: starred in: query description: >- Only return contacts who are starred required: false schema: type: boolean example: false query_status_id: name: status_id in: query description: Return contacts of a particular status required: false schema: type: string example: 5aaa9b039007ba08c9ebaf0b query_team: name: team in: query description: Include contacts owned by other users required: false schema: type: boolean example: true query_url: name: url in: query description: Search contacts by web address required: false schema: type: string example: https://example.com query_waiting: name: waiting in: query description: Only return contacts, for whom I have a next action, of status `waiting` required: false schema: type: boolean example: false query_not_linked_with: name: not_linked_with in: query description: >- Only return contacts who are not linked to a particular company (company's id expected here - cannot be used in conjunction with `company_id` param) required: false schema: type: string example: 5aba31e99007ba0f570c92ac query_custom_field_id: name: custom_field_id in: query description: Filter contacts by custom field value (combine with `custom_field_value`) required: false schema: type: string example: 5afaf6299007ba5c417f0d72 query_custom_field_value: name: custom_field_value in: query description: Filter contacts by custom field value (combine with `custom_field_id`) required: false schema: type: string query_order: in: query name: order description: >- Specify the order (ascending or descending) of the sort of the results (use in conjunction with `sort_by`) schema: type: string enum: - asc - desc query_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at query_contacts_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at - first_name - last_name - company_name - name query_companies_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at - name query_deals_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at - date - close_date - expected_close_date query_notes_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at - updated_at - date query_calls_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at - updated_at query_meetings_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at - updated_at query_custom_fields_sort_by: name: sort_by in: query description: >- Specify field by which to order the results (use in conjunction with `order`) schema: type: string enum: - created_at - modified_at - updated_at - position query_per_page: name: per_page in: query description: Number of records to return. Maximum 100 allowed. Default is 10. required: false schema: type: integer default: 10 example: 10 query_page: name: page in: query required: false description: Page number. Starts from 1. Default is 1. schema: type: integer default: 1 example: 1 query_contacts_delete_ids: name: ids in: query required: true description: Comma seperated list of contact IDs, to be deleted schema: type: string minimum: 1 query_pipeline_id: name: pipeline_id in: query required: false description: Return deals from the specified pipeline only schema: type: string example: 5cfa87a4849d7873db082f98 query_sales_pipeline_id: name: sales_pipeline_id in: query required: false description: Return deals referencing a specified sales pipeline only schema: type: string example: 5cfa87a4849d7873db082f98 query_include_history: name: include_history in: query required: false description: | Returns deal stages history, i.e. the most recent stages for each pipeline for the deal
This field is returned only when 'include_history=true' param is supplied in request (query string or request body)
Format: pipeline_id => stage schema: type: boolean example: true query_relationship_symmetrical: name: symmetrical in: query required: false description: Filter only symmetrical/non-symmetrical relationship types schema: type: boolean example: false query_relationships_type_id: name: relationship_type_id in: query required: false description: >- Return relationships of a specific type schema: type: string example: 5aaa9b059007ba08c9ebaf58 query_relationships_contact_id_filter: name: contact_id_filter in: query required: false description: >- Return relationships in which the provided contact participate schema: type: string example: 5aaa9b059007ba08c9ebaf58 query_relationships_variant_id_filter: name: variant_id_filter in: query required: false description: >- Return relationships in which the provided variant participate schema: type: string example: 5aaa9b059007ba08c9ebaf58 responses: '200': description: OK '201': description: Created '400': description: >- Bad Request. The request is not properly formatted, does not properly specify response format or contains improper parameters or data. Code 400 means a problem is in your implementation. Fault is on you. The example below is the format for all responses in the 4XX range. content: application/json: schema: properties: status: type: integer format: int32 description: HTTP status code of the response readOnly: true example: 400 message: type: string description: Summary of the reason for the failure readOnly: true example: Some generic error message error_name: type: string description: Key used to identify which error has occurred readOnly: true example: some_generic_error_message error_message: type: string description: Message to be shown to the user with more details about the error readOnly: true example: Could not find suitable error message, initiating self-destruct sequence... errors: description: Specific errors (commonly associated with invalid parameters) readOnly: true properties: attribute_name: type: string description: Reason why this parameter is invalid readOnly: true example: '{attribute_name} is invalid or missing' '401': description: >- Unauthorized. Authorization data is absent, invalid or expired. Generally this means that a login form should be displayed to a user. Code 401 means user just needs to login. Generally, fault is on no one. content: application/json: schema: properties: status: type: integer format: int32 description: HTTP status code of the response readOnly: true example: 401 message: type: string description: Summary of the reason for the failure readOnly: true example: Authorization data not found error_name: type: string description: Key used to identify which error has occurred readOnly: true example: authorization_data_not_found error_message: type: string description: Message to be shown to the user with more details about the error readOnly: true example: Cannot find suitable authorization data or data provided is not complete. errors: type: object readOnly: true '403': description: >- Forbidden. Issued when user is logged in, but does not have permission for requested operation. This includes cases when user has reached limits like allowed number of contacts. Code 403 means operation is forbidden for a user. Fault is on user. Although in some cases, you could have prevented this by not sending the request in the first place. '404': description: >- Resource Not Found. When an id was provided for a request but no resource exists for that object. '409': description: >- Precondition Failed. Server state does not allow requested operation to be carried on. Issued in cases such as when trying to add an assigned next action to a contact which already has one assigned for a user. Code 409 means the stars were not aligned for this to happen. Sometimes you could have foreseen it, sometimes not. '415': description: >- The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format. '422': description: The request was well-formed (i.e., syntactically correct) but could not be processed. '500': description: Internal Server Error. Code 500 means server messed up. Fault is on us. securitySchemes: BasicAuth: type: http scheme: basic