Last active
February 12, 2026 17:03
-
-
Save chhhris/0f931162b3b8ffcb8fba2d48da750962 to your computer and use it in GitHub Desktop.
Integration ENV copper spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.1.0", | |
| "info": { | |
| "title": "Copper CRM Read-Only API", | |
| "description": "Read-only operations for Copper CRM API - optimized for ChatGPT integration", | |
| "version": "1.0.0", | |
| "contact": { | |
| "name": "Copper Developer Support", | |
| "url": "https://developer.copper.com/", | |
| "email": "support@copper.com" | |
| } | |
| }, | |
| "servers": [ | |
| { | |
| "url": "https://api.copper.com/developer_api/v1", | |
| "description": "Copper API Production Server" | |
| } | |
| ], | |
| "tags": [ | |
| { | |
| "name": "Account", | |
| "description": "Account and user information operations" | |
| }, | |
| { | |
| "name": "Leads", | |
| "description": "Lead management operations" | |
| }, | |
| { | |
| "name": "People", | |
| "description": "People/contact management operations" | |
| }, | |
| { | |
| "name": "Companies", | |
| "description": "Company management operations" | |
| }, | |
| { | |
| "name": "Opportunities", | |
| "description": "Sales opportunity operations" | |
| }, | |
| { | |
| "name": "Tasks", | |
| "description": "Task management operations" | |
| }, | |
| { | |
| "name": "Activities", | |
| "description": "Activity tracking operations" | |
| }, | |
| { | |
| "name": "Custom Fields", | |
| "description": "Custom field definitions and operations" | |
| }, | |
| { | |
| "name": "Field Layouts", | |
| "description": "Field layout configuration for entity types" | |
| }, | |
| { | |
| "name": "Related Items", | |
| "description": "Related items and relationship operations" | |
| }, | |
| { | |
| "name": "Tags", | |
| "description": "Tag management operations" | |
| } | |
| ], | |
| "components": { | |
| "securitySchemes": { | |
| "bearerAuth": { | |
| "type": "http", | |
| "scheme": "bearer", | |
| "description": "Copper API key for authentication. Get your API key from your Copper account settings." | |
| } | |
| }, | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "description": "The maximum number of requests allowed in the current time window", | |
| "schema": { | |
| "type": "integer", | |
| "example": 180 | |
| } | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "description": "The number of requests remaining in the current time window", | |
| "schema": { | |
| "type": "integer", | |
| "example": 179 | |
| } | |
| }, | |
| "X-RateLimit-Reset": { | |
| "description": "The time at which the current rate limit window resets, in UTC epoch seconds", | |
| "schema": { | |
| "type": "integer", | |
| "example": 1640995200 | |
| } | |
| }, | |
| "Retry-After": { | |
| "description": "The number of seconds to wait before making a new request after hitting the rate limit", | |
| "schema": { | |
| "type": "integer", | |
| "example": 60 | |
| } | |
| }, | |
| "X-PW-TOTAL": { | |
| "description": "An upper bound of the total number of records that match the search criteria. This value is now also surfaced inside the response body as the 'total' field of the pagination envelope so ChatGPT does not need to read headers. Use this with page_size (or the body-level total) to calculate the number of pages needed for pagination. Note: Search requests are limited to returning only the first 100,000 records regardless of pagination parameters.", | |
| "schema": { | |
| "type": "integer", | |
| "example": 775 | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "BadRequest": { | |
| "description": "Bad Request - The request was invalid or cannot be served", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "Unauthorized": { | |
| "description": "Unauthorized - Authentication credentials were missing or incorrect", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "Forbidden": { | |
| "description": "Forbidden - The request was valid but the server is refusing action", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "NotFound": { | |
| "description": "Not Found - The requested resource was not found", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "TooManyRequests": { | |
| "description": "Too Many Requests - Rate limit exceeded", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "Retry-After": { | |
| "$ref": "#/components/headers/Retry-After" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| }, | |
| "InternalServerError": { | |
| "description": "Internal Server Error - An unexpected error occurred", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Error" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "schemas": { | |
| "Error": { | |
| "type": "object", | |
| "properties": { | |
| "error": { | |
| "type": "object", | |
| "properties": { | |
| "code": { | |
| "type": "string", | |
| "description": "Error code", | |
| "example": "RATE_LIMIT_EXCEEDED" | |
| }, | |
| "message": { | |
| "type": "string", | |
| "description": "Human-readable error message", | |
| "example": "You have exceeded your rate limit of 180 requests per minute" | |
| }, | |
| "details": { | |
| "type": "object", | |
| "description": "Additional error details", | |
| "additionalProperties": true | |
| } | |
| }, | |
| "required": [ | |
| "code", | |
| "message" | |
| ] | |
| } | |
| }, | |
| "required": [ | |
| "error" | |
| ] | |
| }, | |
| "User": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the user", | |
| "example": 159258 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Full name of the user", | |
| "example": "Demo User" | |
| }, | |
| "email": { | |
| "type": "string", | |
| "format": "email", | |
| "description": "Email address of the user", | |
| "example": "demouser@example.com" | |
| }, | |
| "groups": { | |
| "type": "array", | |
| "description": "A list of teams (previously known as 'Groups') that the user belongs to", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the team", | |
| "example": 1 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the team", | |
| "example": "Sales" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name", | |
| "email" | |
| ] | |
| }, | |
| "Account": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the account", | |
| "example": 123 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the account", | |
| "example": "Company Name" | |
| }, | |
| "primary_timezone": { | |
| "type": "string", | |
| "description": "Primary timezone for the account", | |
| "example": "America/New_York" | |
| }, | |
| "settings": { | |
| "type": "object", | |
| "description": "Account settings and feature flags", | |
| "properties": { | |
| "setting_team_permissions_enabled": { | |
| "type": "boolean", | |
| "description": "Whether team permissions are enabled", | |
| "example": true | |
| }, | |
| "setting_enable_leads": { | |
| "type": "boolean", | |
| "description": "Whether leads are enabled for this account", | |
| "example": true | |
| } | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| }, | |
| "Lead": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the lead", | |
| "example": 8894157 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "The first and last name of the lead", | |
| "example": "Test Lead" | |
| }, | |
| "prefix": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Name prefix", | |
| "example": null | |
| }, | |
| "first_name": { | |
| "type": "string", | |
| "description": "First name of the lead", | |
| "example": "Test" | |
| }, | |
| "last_name": { | |
| "type": "string", | |
| "description": "Last name of the lead", | |
| "example": "Lead" | |
| }, | |
| "middle_name": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Middle name of the lead", | |
| "example": null | |
| }, | |
| "suffix": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Name suffix", | |
| "example": null | |
| }, | |
| "address": { | |
| "type": "object", | |
| "description": "An object containing the lead's address", | |
| "properties": { | |
| "street": { | |
| "type": "string", | |
| "example": "301 Howard St Ste 600" | |
| }, | |
| "city": { | |
| "type": "string", | |
| "example": "San Francisco" | |
| }, | |
| "state": { | |
| "type": "string", | |
| "example": "CA" | |
| }, | |
| "postal_code": { | |
| "type": "string", | |
| "example": "94105" | |
| }, | |
| "country": { | |
| "type": "string", | |
| "example": "US" | |
| } | |
| } | |
| }, | |
| "assignee_id": { | |
| "type": "integer", | |
| "description": "Unique identifier of the user that will be the owner of the lead", | |
| "example": 137658 | |
| }, | |
| "company_name": { | |
| "type": "string", | |
| "description": "The name of the company to which the lead belongs", | |
| "example": "Lead's Company" | |
| }, | |
| "customer_source_id": { | |
| "type": "integer", | |
| "description": "Unique identifier of the customer source that generated this lead", | |
| "example": 331241 | |
| }, | |
| "details": { | |
| "type": "string", | |
| "description": "Description of the lead", | |
| "example": "This is a demo description" | |
| }, | |
| "email": { | |
| "type": "object", | |
| "description": "An object containing the lead's email address and category", | |
| "properties": { | |
| "email": { | |
| "type": "string", | |
| "format": "email", | |
| "example": "address@workemail.com" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "example": "work" | |
| } | |
| } | |
| }, | |
| "monetary_value": { | |
| "type": "number", | |
| "description": "The expected monetary value of business with the lead", | |
| "example": 100 | |
| }, | |
| "phone_numbers": { | |
| "type": "array", | |
| "description": "An array of phone numbers belonging to the lead", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "number": { | |
| "type": "string", | |
| "description": "A phone number", | |
| "example": "415-999-4321" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the phone number", | |
| "example": "mobile" | |
| } | |
| } | |
| } | |
| }, | |
| "socials": { | |
| "type": "array", | |
| "description": "An array of social profiles belonging to the lead", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string", | |
| "description": "The URL of a social profile", | |
| "example": "facebook.com/test_lead" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the social profile", | |
| "example": "facebook" | |
| } | |
| } | |
| } | |
| }, | |
| "status": { | |
| "type": "string", | |
| "description": "A string representing the status of the lead", | |
| "enum": [ | |
| "New", | |
| "Unqualified", | |
| "Contacted", | |
| "Qualified" | |
| ], | |
| "example": "New" | |
| }, | |
| "status_id": { | |
| "type": "integer", | |
| "description": "Unique identifier of the lead status", | |
| "example": 208231 | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "description": "An array of the tags associated with the lead", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "example": [ | |
| "tag 1", | |
| "tag 2" | |
| ] | |
| }, | |
| "title": { | |
| "type": "string", | |
| "description": "The professional title of the lead", | |
| "example": "Title" | |
| }, | |
| "websites": { | |
| "type": "array", | |
| "description": "An array of websites belonging to the lead", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string", | |
| "description": "The URL of a website", | |
| "example": "www.workwebsite.com" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the website", | |
| "example": "work" | |
| } | |
| } | |
| } | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field values belonging to the lead. When custom_field_computed_values query parameter is true, each field will include a computed_value with human-readable labels for Dropdown and Multi-select fields.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The id of the custom field definition for which this custom field stores a value", | |
| "example": 100764 | |
| }, | |
| "value": { | |
| "description": "The value (number, string, option id, or timestamp) of this custom field", | |
| "nullable": true, | |
| "example": null | |
| }, | |
| "computed_value": { | |
| "description": "The human-readable value of this custom field. For Dropdown/Multi-select fields, this contains the option label(s) instead of IDs. Only present when custom_field_computed_values=true is specified.", | |
| "nullable": true | |
| } | |
| } | |
| } | |
| }, | |
| "date_created": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this lead was created", | |
| "example": 1489018784 | |
| }, | |
| "date_modified": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this lead was last modified", | |
| "example": 1489173601 | |
| }, | |
| "date_last_contacted": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this lead was last contacted", | |
| "example": 1515796263 | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| }, | |
| "Person": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the person", | |
| "example": 27140442 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "The first and last name of the person", | |
| "example": "My Contact" | |
| }, | |
| "prefix": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Name prefix", | |
| "example": null | |
| }, | |
| "first_name": { | |
| "type": "string", | |
| "description": "First name of the person", | |
| "example": "My" | |
| }, | |
| "middle_name": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Middle name of the person", | |
| "example": null | |
| }, | |
| "last_name": { | |
| "type": "string", | |
| "description": "Last name of the person", | |
| "example": "Contact" | |
| }, | |
| "suffix": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Name suffix", | |
| "example": null | |
| }, | |
| "address": { | |
| "type": "object", | |
| "nullable": true, | |
| "description": "An object containing the person's address", | |
| "properties": { | |
| "street": { | |
| "type": "string", | |
| "example": "213 West Main Street" | |
| }, | |
| "city": { | |
| "type": "string", | |
| "example": "Scranton" | |
| }, | |
| "state": { | |
| "type": "string", | |
| "example": "PA" | |
| }, | |
| "postal_code": { | |
| "type": "string", | |
| "example": "18501" | |
| }, | |
| "country": { | |
| "type": "string", | |
| "example": "" | |
| } | |
| } | |
| }, | |
| "assignee_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "Unique identifier of the user that will be the owner of the person", | |
| "example": null | |
| }, | |
| "company_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "ID of the associated company", | |
| "example": 3 | |
| }, | |
| "company_name": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Name of the associated company", | |
| "example": "Dunder Mifflin (sample)" | |
| }, | |
| "contact_type_id": { | |
| "type": "integer", | |
| "description": "Unique identifier of the contact type", | |
| "example": 451492 | |
| }, | |
| "details": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Description of the person", | |
| "example": null | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "description": "An array of email addresses belonging to the person", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "email": { | |
| "type": "string", | |
| "format": "email", | |
| "example": "mycontact_123@noemail.com" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "example": "work" | |
| } | |
| } | |
| } | |
| }, | |
| "phone_numbers": { | |
| "type": "array", | |
| "description": "An array of phone numbers belonging to the person", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "number": { | |
| "type": "string", | |
| "description": "A phone number", | |
| "example": "415-123-45678" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the phone number", | |
| "example": "mobile" | |
| } | |
| } | |
| } | |
| }, | |
| "socials": { | |
| "type": "array", | |
| "description": "An array of social profiles belonging to the person", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string", | |
| "description": "The URL of a social profile", | |
| "example": "facebook.com/person" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the social profile", | |
| "example": "facebook" | |
| } | |
| } | |
| } | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "description": "An array of the tags associated with the person", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "example": [] | |
| }, | |
| "title": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "The professional title of the person", | |
| "example": "Regional Manager" | |
| }, | |
| "websites": { | |
| "type": "array", | |
| "description": "An array of websites belonging to the person", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string", | |
| "description": "The URL of a website", | |
| "example": "http://www.dundermifflin.com/index.shtml" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the website", | |
| "example": "work" | |
| } | |
| } | |
| } | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field values belonging to the person. When custom_field_computed_values query parameter is true, each field will include a computed_value with human-readable labels for Dropdown and Multi-select fields.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The id of the custom field definition for which this custom field stores a value", | |
| "example": 100764 | |
| }, | |
| "value": { | |
| "description": "The value (number, string, option id, or timestamp) of this custom field", | |
| "nullable": true, | |
| "example": null | |
| }, | |
| "computed_value": { | |
| "description": "The human-readable value of this custom field. For Dropdown/Multi-select fields, this contains the option label(s) instead of IDs. Only present when custom_field_computed_values=true is specified.", | |
| "nullable": true | |
| } | |
| } | |
| } | |
| }, | |
| "date_created": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this person was created", | |
| "example": 1490045413 | |
| }, | |
| "date_modified": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this person was last modified", | |
| "example": 1490045413 | |
| }, | |
| "date_last_contacted": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "A Unix timestamp representing the time at which this person was last contacted", | |
| "example": null | |
| }, | |
| "interaction_count": { | |
| "type": "integer", | |
| "description": "The number of interactions with this person", | |
| "example": 0 | |
| }, | |
| "leads_converted_from": { | |
| "type": "array", | |
| "description": "An array of lead IDs that were converted to this person", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "example": [] | |
| }, | |
| "date_lead_created": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "A Unix timestamp representing when the lead was created before conversion", | |
| "example": null | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| }, | |
| "Company": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the company", | |
| "example": 9607580 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "The name of the company", | |
| "example": "Dunder Mifflin (sample)" | |
| }, | |
| "address": { | |
| "type": "object", | |
| "nullable": true, | |
| "description": "An encapsulation of the company's street, city, state, postal code, and country", | |
| "properties": { | |
| "street": { | |
| "type": "string", | |
| "example": "213 West Main Street" | |
| }, | |
| "city": { | |
| "type": "string", | |
| "example": "Scranton" | |
| }, | |
| "state": { | |
| "type": "string", | |
| "example": "PA" | |
| }, | |
| "postal_code": { | |
| "type": "string", | |
| "example": "18501" | |
| }, | |
| "country": { | |
| "type": "string", | |
| "example": "" | |
| } | |
| } | |
| }, | |
| "assignee_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "Unique identifier of the user that will be the owner of the company", | |
| "example": null | |
| }, | |
| "contact_type_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The unique identifier of the contact type of the company", | |
| "example": null | |
| }, | |
| "details": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Description of the company", | |
| "example": "Keywords: Dunder Mifflin, Dunder Mifflin Infinity, Dunder Mifflin Paper" | |
| }, | |
| "email_domain": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "The domain to which email addresses for the company belong. This is a unique key for companies - no two records can have the same domain name.", | |
| "example": "dundermifflin.com" | |
| }, | |
| "phone_numbers": { | |
| "type": "array", | |
| "description": "An array of phone numbers belonging to the company", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "number": { | |
| "type": "string", | |
| "description": "A phone number", | |
| "example": "4153554776" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the phone number", | |
| "example": "work" | |
| } | |
| } | |
| } | |
| }, | |
| "primary_contact_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The unique identifier of the person who is the primary contact for this company", | |
| "example": 27140359 | |
| }, | |
| "socials": { | |
| "type": "array", | |
| "description": "An array of social profiles belonging to the company", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string", | |
| "description": "The URL of a social profile", | |
| "example": "https://www.linkedin.com/in/sabreinc" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the social profile", | |
| "example": "linkedin" | |
| } | |
| } | |
| } | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "description": "An array of the tags associated with the company", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "example": [] | |
| }, | |
| "websites": { | |
| "type": "array", | |
| "description": "An array of websites belonging to the company", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "url": { | |
| "type": "string", | |
| "description": "The URL of a website", | |
| "example": "http://www.dundermifflin.com/index.shtml" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the website", | |
| "example": "work" | |
| } | |
| } | |
| } | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field values belonging to the company. When custom_field_computed_values query parameter is true, each field will include a computed_value with human-readable labels for Dropdown and Multi-select fields.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The id of the custom field definition for which this custom field stores a value", | |
| "example": 100764 | |
| }, | |
| "value": { | |
| "description": "The value (number, string, option id, or timestamp) of this custom field", | |
| "nullable": true, | |
| "example": null | |
| }, | |
| "computed_value": { | |
| "description": "The human-readable value of this custom field. For Dropdown/Multi-select fields, this contains the option label(s) instead of IDs. Only present when custom_field_computed_values=true is specified.", | |
| "nullable": true | |
| } | |
| } | |
| } | |
| }, | |
| "interaction_count": { | |
| "type": "integer", | |
| "description": "The number of interactions with this company", | |
| "example": 0 | |
| }, | |
| "date_created": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this company was created", | |
| "example": 1483988828 | |
| }, | |
| "date_modified": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this company was last modified", | |
| "example": 1489018922 | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| }, | |
| "Opportunity": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the opportunity", | |
| "example": 2827698 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "The name of the opportunity", | |
| "example": "8 New Copy Machines (sample)" | |
| }, | |
| "assignee_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "Unique identifier of the user that will be the owner of the opportunity", | |
| "example": null | |
| }, | |
| "close_date": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The expected close date of the opportunity (Unix timestamp)", | |
| "example": 1484899200 | |
| }, | |
| "company_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The unique identifier of the primary company with which the opportunity is associated", | |
| "example": 9607580 | |
| }, | |
| "company_name": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "The name of the primary company with which the opportunity is associated", | |
| "example": "Dunder Mifflin (sample)" | |
| }, | |
| "customer_source_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "Unique identifier of the customer source that generated this opportunity", | |
| "example": 331241 | |
| }, | |
| "details": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Description of the opportunity", | |
| "example": "Opportunities are created for People and Companies that are interested in buying your products or services." | |
| }, | |
| "loss_reason_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "If the opportunity's status is 'Lost', the unique identifier of the loss reason that caused this opportunity to be lost", | |
| "example": null | |
| }, | |
| "monetary_value": { | |
| "type": "number", | |
| "nullable": true, | |
| "description": "The monetary value of the opportunity", | |
| "example": 250000 | |
| }, | |
| "pipeline_id": { | |
| "type": "integer", | |
| "description": "The unique identifier of the pipeline in which this opportunity is", | |
| "example": 213214 | |
| }, | |
| "pipeline_is_revenue": { | |
| "type": "boolean", | |
| "description": "The revenue type of the pipeline associated with the opportunity", | |
| "example": false | |
| }, | |
| "pipeline_stage_id": { | |
| "type": "integer", | |
| "description": "The unique identifier of the pipeline stage of the opportunity", | |
| "example": 987790 | |
| }, | |
| "pipeline_type": { | |
| "type": "string", | |
| "description": "The type of the pipeline ('opportunity', 'project', or 'item') associated with the opportunity", | |
| "enum": [ | |
| "opportunity", | |
| "project", | |
| "item" | |
| ], | |
| "example": "opportunity" | |
| }, | |
| "primary_contact_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The unique identifier of the person who is the primary contact for this opportunity", | |
| "example": null | |
| }, | |
| "priority": { | |
| "type": "string", | |
| "description": "The priority of the opportunity", | |
| "enum": [ | |
| "None", | |
| "Low", | |
| "Medium", | |
| "High" | |
| ], | |
| "example": "None" | |
| }, | |
| "status": { | |
| "type": "string", | |
| "description": "The status of the opportunity", | |
| "enum": [ | |
| "Open", | |
| "Won", | |
| "Lost", | |
| "Abandoned" | |
| ], | |
| "example": "Open" | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "description": "An array of the tags associated with the opportunity", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "example": [] | |
| }, | |
| "win_probability": { | |
| "type": "integer", | |
| "description": "The expected probability of winning the opportunity. Valid values are [0-100] (inclusive)", | |
| "minimum": 0, | |
| "maximum": 100, | |
| "example": 5 | |
| }, | |
| "interaction_count": { | |
| "type": "integer", | |
| "description": "The number of interactions with this opportunity", | |
| "example": 0 | |
| }, | |
| "date_created": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this opportunity was created", | |
| "example": 1483988829 | |
| }, | |
| "date_modified": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this opportunity was last modified", | |
| "example": 1489018922 | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field values belonging to the opportunity. When custom_field_computed_values query parameter is true, each field will include a computed_value with human-readable labels for Dropdown and Multi-select fields.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The id of the custom field definition for which this custom field stores a value", | |
| "example": 100764 | |
| }, | |
| "value": { | |
| "description": "The value (number, string, option id, or timestamp) of this custom field", | |
| "nullable": true, | |
| "example": null | |
| }, | |
| "computed_value": { | |
| "description": "The human-readable value of this custom field. For Dropdown/Multi-select fields, this contains the option label(s) instead of IDs. Only present when custom_field_computed_values=true is specified.", | |
| "nullable": true | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| }, | |
| "Task": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the task", | |
| "example": 3716920 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "The name of the task", | |
| "example": "My First Task" | |
| }, | |
| "related_resource": { | |
| "type": "object", | |
| "nullable": true, | |
| "description": "The primary related resource for the task", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The ID of the related resource", | |
| "example": 144296 | |
| }, | |
| "type": { | |
| "type": "string", | |
| "description": "The type of the related resource", | |
| "example": "project" | |
| } | |
| } | |
| }, | |
| "assignee_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "Unique identifier of the user that will be the owner of the task", | |
| "example": 137658 | |
| }, | |
| "due_date": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The date on which the task is due (Unix timestamp)", | |
| "example": 1496799000 | |
| }, | |
| "reminder_date": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The date on which to receive a reminder about the task (Unix timestamp)", | |
| "example": null | |
| }, | |
| "completed_date": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The date on which the task was completed (Unix timestamp). This is automatically set when the status changes from Open to Completed, and cannot be set directly.", | |
| "example": null | |
| }, | |
| "priority": { | |
| "type": "string", | |
| "description": "The priority of the task", | |
| "enum": [ | |
| "None", | |
| "Low", | |
| "Medium", | |
| "High" | |
| ], | |
| "example": "None" | |
| }, | |
| "status": { | |
| "type": "string", | |
| "description": "The status of the task", | |
| "enum": [ | |
| "Open", | |
| "Completed" | |
| ], | |
| "example": "Open" | |
| }, | |
| "details": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Description of the task", | |
| "example": null | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "description": "An array of the tags associated with the task", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "example": [] | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field values belonging to the task. When custom_field_computed_values query parameter is true, each field will include a computed_value with human-readable labels for Dropdown and Multi-select fields.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The id of the custom field definition for which this custom field stores a value", | |
| "example": 100764 | |
| }, | |
| "value": { | |
| "description": "The value (number, string, option id, or timestamp) of this custom field", | |
| "nullable": true, | |
| "example": null | |
| }, | |
| "computed_value": { | |
| "description": "The human-readable value of this custom field. For Dropdown/Multi-select fields, this contains the option label(s) instead of IDs. Only present when custom_field_computed_values=true is specified.", | |
| "nullable": true | |
| } | |
| } | |
| } | |
| }, | |
| "custom_activity_type_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "The custom activity type ID associated with this task", | |
| "example": null | |
| }, | |
| "date_created": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this task was created", | |
| "example": 1496712856 | |
| }, | |
| "date_modified": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this task was last modified", | |
| "example": 1496712857 | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| }, | |
| "Activity": { | |
| "type": "object", | |
| "description": "Copper keeps a record of activities for People, Leads, Opportunities, and Companies. Only 'User' type Activities can be created or modified using the developer API. 'System' type Activities are read-only.", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the activity", | |
| "example": 3061844454 | |
| }, | |
| "parent": { | |
| "type": "object", | |
| "description": "The identifier of the resource to which this activity belongs", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The ID of the parent resource", | |
| "example": 9607580 | |
| }, | |
| "type": { | |
| "type": "string", | |
| "description": "The type of the parent resource", | |
| "enum": [ | |
| "lead", | |
| "person", | |
| "company", | |
| "opportunity" | |
| ], | |
| "example": "company" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "type" | |
| ] | |
| }, | |
| "type": { | |
| "type": "object", | |
| "description": "The activity type of this activity", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The ID of the activity type", | |
| "example": 190711 | |
| }, | |
| "category": { | |
| "type": "string", | |
| "description": "The category of the activity type", | |
| "enum": [ | |
| "user", | |
| "system" | |
| ], | |
| "example": "user" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "category" | |
| ] | |
| }, | |
| "user_id": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "When applicable, the id of the user who performed this activity", | |
| "example": 137658 | |
| }, | |
| "details": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "When applicable, the text body of this activity", | |
| "example": "Demo phone call" | |
| }, | |
| "activity_date": { | |
| "type": "integer", | |
| "nullable": true, | |
| "description": "A Unix timestamp representing the time at which this activity took place", | |
| "example": 1496710783 | |
| }, | |
| "old_value": { | |
| "nullable": true, | |
| "description": "When applicable, the value of a resource's property before this activity took place", | |
| "example": null | |
| }, | |
| "new_value": { | |
| "nullable": true, | |
| "description": "When applicable, the value of a resource's property after this activity took place", | |
| "example": null | |
| }, | |
| "date_created": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this activity was created", | |
| "example": 1496710787 | |
| }, | |
| "date_modified": { | |
| "type": "integer", | |
| "description": "A Unix timestamp representing the time at which this activity was last modified", | |
| "example": 1496710783 | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "parent", | |
| "type", | |
| "details" | |
| ] | |
| }, | |
| "Tag": { | |
| "type": "object", | |
| "description": "A tag is a string that can be associated to any of the 6 core entities in Copper (Leads, People, Companies, Opportunities, Tasks, Projects)", | |
| "properties": { | |
| "name": { | |
| "type": "string", | |
| "description": "The name of the tag", | |
| "example": "Apples" | |
| }, | |
| "count": { | |
| "type": "integer", | |
| "description": "The total number of entities the tag is associated to", | |
| "example": 5 | |
| }, | |
| "count_people": { | |
| "type": "integer", | |
| "description": "The number of people the tag is associated to", | |
| "example": 1 | |
| }, | |
| "count_leads": { | |
| "type": "integer", | |
| "description": "The number of leads the tag is associated to", | |
| "example": 1 | |
| }, | |
| "count_companies": { | |
| "type": "integer", | |
| "description": "The number of companies the tag is associated to", | |
| "example": 1 | |
| }, | |
| "count_opportunities": { | |
| "type": "integer", | |
| "description": "The number of opportunities the tag is associated to", | |
| "example": 1 | |
| }, | |
| "count_projects": { | |
| "type": "integer", | |
| "description": "The number of projects the tag is associated to", | |
| "example": 1 | |
| }, | |
| "count_tasks": { | |
| "type": "integer", | |
| "description": "The number of tasks the tag is associated to", | |
| "example": 0 | |
| } | |
| }, | |
| "required": [ | |
| "name" | |
| ] | |
| }, | |
| "CustomFieldDefinition": { | |
| "type": "object", | |
| "description": "Custom fields are available on all main objects: Leads, People, Companies, Opportunities, Projects, and Tasks. Custom fields can have various data types including text, dropdown, date, currency, percentage, etc.", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the custom field definition", | |
| "example": 100764 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the custom field", | |
| "example": "Multi-Select Dropdown" | |
| }, | |
| "canonical_name": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Canonical name for the custom field", | |
| "example": null | |
| }, | |
| "data_type": { | |
| "type": "string", | |
| "description": "Data type of the custom field", | |
| "enum": [ | |
| "String", | |
| "Text", | |
| "Dropdown", | |
| "MultiSelect", | |
| "Date", | |
| "Checkbox", | |
| "Float", | |
| "URL", | |
| "Percentage", | |
| "Currency", | |
| "Connect" | |
| ], | |
| "example": "MultiSelect" | |
| }, | |
| "available_on": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "lead", | |
| "person", | |
| "company", | |
| "opportunity", | |
| "project", | |
| "task" | |
| ] | |
| }, | |
| "description": "Array of entity types this field is available on", | |
| "example": [ | |
| "lead", | |
| "person", | |
| "opportunity", | |
| "company" | |
| ] | |
| }, | |
| "options": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The option ID" | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "The option name/value" | |
| }, | |
| "rank": { | |
| "type": "integer", | |
| "description": "The display order of the option" | |
| } | |
| } | |
| }, | |
| "description": "Available options for Dropdown and MultiSelect field types" | |
| }, | |
| "currency": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Currency code for Currency field types", | |
| "example": "USD" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name", | |
| "data_type", | |
| "available_on" | |
| ] | |
| }, | |
| "CustomActivityType": { | |
| "type": "object", | |
| "description": "Custom activity types allow you to define custom activities beyond the default Copper activity types", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the custom activity type", | |
| "example": 12345 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the custom activity type", | |
| "example": "Product Demo" | |
| }, | |
| "icon_type": { | |
| "type": "string", | |
| "nullable": true, | |
| "description": "Icon type for the custom activity", | |
| "example": "calendar" | |
| }, | |
| "is_disabled": { | |
| "type": "boolean", | |
| "description": "Whether the custom activity type is disabled", | |
| "example": false | |
| }, | |
| "is_interaction": { | |
| "type": "boolean", | |
| "description": "Whether this activity type counts as an interaction", | |
| "example": true | |
| }, | |
| "count_as_interaction": { | |
| "type": "boolean", | |
| "description": "Legacy field - same as is_interaction", | |
| "example": true | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| }, | |
| "RelatedItem": { | |
| "type": "object", | |
| "description": "A related item represents a relationship between two entities in Copper. All relationships are bidirectional. Relationships can only exist between certain types of entities: Leads-Tasks, People-Companies/Opportunities/Tasks/Projects, Companies-Opportunities/People/Tasks/Projects, Opportunities-Companies/People/Tasks/Projects, Projects-Companies/People/Opportunities/Tasks, Tasks-Companies/People/Opportunities/Leads/Projects.", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The ID of the related entity", | |
| "example": 208105 | |
| }, | |
| "type": { | |
| "type": "string", | |
| "enum": [ | |
| "lead", | |
| "person", | |
| "company", | |
| "opportunity", | |
| "project", | |
| "task" | |
| ], | |
| "description": "The type of the related entity", | |
| "example": "project" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "type" | |
| ] | |
| }, | |
| "SearchResponse": { | |
| "type": "object", | |
| "properties": { | |
| "items": { | |
| "type": "array", | |
| "items": { | |
| "type": "object" | |
| }, | |
| "description": "Array of search results" | |
| }, | |
| "page": { | |
| "type": "object", | |
| "properties": { | |
| "page_number": { | |
| "type": "integer", | |
| "description": "Current page number", | |
| "example": 1 | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "description": "Number of items per page", | |
| "example": 20 | |
| } | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "items", | |
| "page" | |
| ] | |
| }, | |
| "PaginationEnvelope": { | |
| "type": "object", | |
| "description": "Standard paginated response envelope returned for ChatGPT-only requests. Mirrors the previous pagination headers by surfacing totals inside the response body while keeping the original headers available.", | |
| "properties": { | |
| "page_number": { | |
| "type": "integer", | |
| "description": "Current page number (defaults to 1 when not provided in the request).", | |
| "example": 1 | |
| }, | |
| "total": { | |
| "type": "integer", | |
| "description": "Total number of records that match the request filters (equivalent to the X-PW-TOTAL header).", | |
| "example": 775 | |
| }, | |
| "data": { | |
| "type": "array", | |
| "description": "Records returned for the requested page. The item schema depends on the endpoint using this envelope.", | |
| "items": {} | |
| } | |
| }, | |
| "required": [ | |
| "page_number", | |
| "total", | |
| "data" | |
| ], | |
| "example": { | |
| "page_number": 1, | |
| "total": 775, | |
| "data": [] | |
| } | |
| } | |
| } | |
| }, | |
| "security": [ | |
| { | |
| "bearerAuth": [] | |
| } | |
| ], | |
| "paths": { | |
| "/users/search": { | |
| "post": { | |
| "tags": [ | |
| "Account" | |
| ], | |
| "summary": "List users", | |
| "description": "Retrieve all users. Response returns a pagination envelope (`page_number`, `total`, `data`) so ChatGPT can read pagination info; the X-PW-TOTAL header remains available. Continue paging with page_number/page_size until the received records match the total value.", | |
| "operationId": "listUsers", | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Users retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/User" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/users/{id}": { | |
| "get": { | |
| "tags": [ | |
| "Account" | |
| ], | |
| "summary": "Get user by ID", | |
| "description": "Retrieve a specific user by their ID. Special ID 'me' can be passed in to obtain the current API user.", | |
| "operationId": "getUser", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "description": "User ID or 'me' for the current API user", | |
| "schema": { | |
| "oneOf": [ | |
| { | |
| "type": "integer" | |
| }, | |
| { | |
| "type": "string", | |
| "enum": [ | |
| "me" | |
| ] | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "User retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/User" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/leads/search": { | |
| "post": { | |
| "tags": [ | |
| "Leads" | |
| ], | |
| "summary": "Search leads", | |
| "description": "Search leads. Response uses a pagination envelope (`page_number`,`total`,`data`) so ChatGPT can read pagination info; the X-PW-TOTAL header still exists. Paginate with page_number/page_size (max 200) until received records equal total. Limited to 100K results.", | |
| "operationId": "searchLeads", | |
| "parameters": [ | |
| { | |
| "name": "custom_field_computed_values", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, returns computed custom field values (human-readable labels) in addition to option IDs for Dropdown and Multi-select fields. The response will include a 'computed_value' field alongside the 'value' field in custom_fields array.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of Lead IDs to retrieve" | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Filter by lead's full name (first and last name)" | |
| }, | |
| "first_name": { | |
| "type": "string", | |
| "description": "Filter by lead's first name" | |
| }, | |
| "last_name": { | |
| "type": "string", | |
| "description": "Filter by lead's last name" | |
| }, | |
| "middle_name": { | |
| "type": "string", | |
| "description": "Filter by lead's middle name" | |
| }, | |
| "emails": { | |
| "type": "string", | |
| "format": "email", | |
| "description": "Filter by email address" | |
| }, | |
| "phone_number": { | |
| "type": "string", | |
| "description": "Filter by phone number" | |
| }, | |
| "company_name": { | |
| "type": "string", | |
| "description": "Filter by the name of the company the lead belongs to" | |
| }, | |
| "title": { | |
| "type": "string", | |
| "description": "Filter by professional title" | |
| }, | |
| "city": { | |
| "type": "string", | |
| "description": "Filter by city in address" | |
| }, | |
| "state": { | |
| "type": "string", | |
| "description": "Filter by state in address" | |
| }, | |
| "postal_code": { | |
| "type": "string", | |
| "description": "Filter by postal code in address" | |
| }, | |
| "country": { | |
| "type": "string", | |
| "description": "Filter by country in address (two-character country code)" | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of tags to filter by" | |
| }, | |
| "assignee_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of assignee IDs to filter by (the user IDs who own these leads). To get User IDs, see List Users. Use -2 for no assignee." | |
| }, | |
| "status_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of status IDs to filter by. To get lead status IDs, see List Lead Statuses." | |
| }, | |
| "customer_source_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of customer source IDs to filter by. To get customer source IDs, see List Customer Sources. Use -2 for no customer source." | |
| }, | |
| "socials": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of social profile URLs to filter by" | |
| }, | |
| "followed": { | |
| "type": "integer", | |
| "enum": [ | |
| 1, | |
| 2 | |
| ], | |
| "description": "Filter by followed status. Use 1 for followed leads, 2 for not followed." | |
| }, | |
| "age": { | |
| "type": "integer", | |
| "description": "Maximum age in seconds of the lead" | |
| }, | |
| "minimum_monetary_value": { | |
| "type": "number", | |
| "description": "Filter by minimum monetary value" | |
| }, | |
| "maximum_monetary_value": { | |
| "type": "number", | |
| "description": "Filter by maximum monetary value" | |
| }, | |
| "minimum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by minimum number of interactions the lead has had" | |
| }, | |
| "maximum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by maximum number of interactions the lead has had" | |
| }, | |
| "minimum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the earliest date of the last interaction" | |
| }, | |
| "maximum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the latest date of the last interaction" | |
| }, | |
| "minimum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum creation date" | |
| }, | |
| "maximum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum creation date" | |
| }, | |
| "minimum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum modification date" | |
| }, | |
| "maximum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum modification date" | |
| }, | |
| "include_converted_leads": { | |
| "type": "boolean", | |
| "description": "When true, includes converted leads in the response", | |
| "default": false | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field filters to search by. For multi-select fields, you can optionally include an 'option' property set to 'ANY' to match any of the specified values.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The custom field definition ID to filter by" | |
| }, | |
| "value": { | |
| "description": "The value to match (can be string, number, array of option IDs, etc.)" | |
| }, | |
| "option": { | |
| "type": "string", | |
| "enum": [ | |
| "ANY" | |
| ], | |
| "description": "For multi-select fields, set to 'ANY' to match any of the specified values" | |
| } | |
| } | |
| } | |
| }, | |
| "sort_by": { | |
| "type": "string", | |
| "enum": [ | |
| "name", | |
| "company_name", | |
| "title", | |
| "value", | |
| "email", | |
| "phone", | |
| "date_modified", | |
| "date_created", | |
| "city", | |
| "state", | |
| "country", | |
| "zip", | |
| "inactive_days", | |
| "socials" | |
| ], | |
| "description": "The field on which to sort the results. Note: date_modified and date_created sort from oldest to newest; inactive_days sorts from newest to oldest." | |
| }, | |
| "sort_direction": { | |
| "type": "string", | |
| "enum": [ | |
| "asc", | |
| "desc" | |
| ], | |
| "description": "The direction in which to sort the results" | |
| }, | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 25, | |
| "default": 25, | |
| "description": "The number of entries included in a page of results" | |
| }, | |
| "fields": { | |
| "type": "array", | |
| "description": "Specify which fields to include in the response to reduce payload size. Include system field names as strings (e.g., 'name', 'status', 'email'). To include specific custom fields, add an object with custom_fields array. If omitted, all fields are returned.", | |
| "items": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "System field name (e.g., 'id', 'name', 'first_name', 'last_name', 'company_name', 'title', 'email', 'phone_numbers', 'assignee_id', 'status', 'status_id', 'monetary_value', 'customer_source_id', 'tags', 'address', 'socials', 'websites', 'date_created', 'date_modified')" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "Array of custom field definition IDs to include", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The ID of the custom field definition to include in the response" | |
| } | |
| }, | |
| "required": [ | |
| "custom_field_definition_id" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "custom_fields" | |
| ] | |
| } | |
| ] | |
| }, | |
| "example": [ | |
| "id", | |
| "name", | |
| "company_name", | |
| "status", | |
| "assignee_id" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Leads retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Lead" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/leads/{id}/activities": { | |
| "post": { | |
| "tags": [ | |
| "Leads" | |
| ], | |
| "summary": "Get lead activities", | |
| "description": "Retrieve all activities associated with a specific lead", | |
| "operationId": "getLeadActivities", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "description": "Lead ID", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Lead activities retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Activity" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/customer_sources": { | |
| "get": { | |
| "tags": [ | |
| "Leads" | |
| ], | |
| "summary": "List customer sources", | |
| "description": "Retrieve a list of all customer sources in the account", | |
| "operationId": "listCustomerSources", | |
| "responses": { | |
| "200": { | |
| "description": "Customer sources retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the customer source", | |
| "example": 331241 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the customer source", | |
| "example": "Website" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/lead_statuses": { | |
| "get": { | |
| "tags": [ | |
| "Leads" | |
| ], | |
| "summary": "List lead statuses", | |
| "description": "Retrieve a list of all lead statuses in the account", | |
| "operationId": "listLeadStatuses", | |
| "responses": { | |
| "200": { | |
| "description": "Lead statuses retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the lead status", | |
| "example": 208231 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the lead status", | |
| "example": "New" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/people/search": { | |
| "post": { | |
| "tags": [ | |
| "People" | |
| ], | |
| "summary": "Search people", | |
| "description": "Search people. Response uses a pagination envelope (`page_number`,`total`,`data`) so ChatGPT can read pagination info; the X-PW-TOTAL header still exists. Paginate with page_number/page_size (max 200) until received records equal total. Limited to 100K results.", | |
| "operationId": "searchPeople", | |
| "parameters": [ | |
| { | |
| "name": "custom_field_computed_values", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, returns computed custom field values (human-readable labels) in addition to option IDs for Dropdown and Multi-select fields. The response will include a 'computed_value' field alongside the 'value' field in custom_fields array.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of Person IDs to retrieve" | |
| }, | |
| "name": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "Simple string for exact match (case-insensitive). Example: 'John Smith' will only match people named exactly 'John Smith'." | |
| }, | |
| { | |
| "type": "object", | |
| "description": "Advanced object format for controlling match type", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "description": "The person name to search for" | |
| }, | |
| "special_value": { | |
| "type": "array", | |
| "description": "Array specifying the match type", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "enum": ["partial", "exact"], | |
| "description": "Match type: 'partial' for substring matching (e.g., 'John' matches 'John Smith'), 'exact' for exact match" | |
| } | |
| }, | |
| "required": ["type"] | |
| }, | |
| "maxItems": 1 | |
| } | |
| }, | |
| "required": ["value", "special_value"], | |
| "example": { | |
| "value": "John", | |
| "special_value": [{"type": "partial"}] | |
| } | |
| } | |
| ], | |
| "description": "Filter by person's full name (first and last name). Use simple string for exact match (case-insensitive), or use object format with special_value for partial matching capability." | |
| }, | |
| "emails": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "format": "email" | |
| }, | |
| "description": "An array of email addresses to filter by" | |
| }, | |
| "phone_numbers": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of phone numbers to filter by" | |
| }, | |
| "title": { | |
| "type": "string", | |
| "description": "Filter by professional title" | |
| }, | |
| "city": { | |
| "type": "string", | |
| "description": "Filter by city in address" | |
| }, | |
| "state": { | |
| "type": "string", | |
| "description": "Filter by state in address" | |
| }, | |
| "postal_code": { | |
| "type": "string", | |
| "description": "Filter by postal code in address" | |
| }, | |
| "country": { | |
| "type": "string", | |
| "description": "Filter by country in address (two-character country code)" | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of tags to filter by" | |
| }, | |
| "assignee_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of assignee IDs to filter by (the user IDs who own these people). Use -2 for no assignee." | |
| }, | |
| "contact_type_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of contact type IDs to filter by. See List Contact Types." | |
| }, | |
| "company_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of company IDs to filter by (the companies these people are associated with)." | |
| }, | |
| "opportunity_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of opportunity IDs to filter by (people associated with these opportunities)" | |
| }, | |
| "socials": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of social profile URLs to filter by" | |
| }, | |
| "followed": { | |
| "type": "integer", | |
| "enum": [ | |
| 1, | |
| 2 | |
| ], | |
| "description": "Filter by followed status. Use 1 for followed people, 2 for not followed." | |
| }, | |
| "age": { | |
| "type": "integer", | |
| "description": "Maximum age in seconds of the person record" | |
| }, | |
| "minimum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by minimum number of interactions" | |
| }, | |
| "maximum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by maximum number of interactions" | |
| }, | |
| "minimum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the earliest date of the last interaction" | |
| }, | |
| "maximum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the latest date of the last interaction" | |
| }, | |
| "minimum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum creation date" | |
| }, | |
| "maximum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum creation date" | |
| }, | |
| "minimum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum modification date" | |
| }, | |
| "maximum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum modification date" | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field filters to search by. For date fields, use minimum_value and maximum_value. For multi-select fields, you can use allow_empty to include records where the field is empty.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The custom field definition ID to filter by" | |
| }, | |
| "value": { | |
| "description": "The value to match (can be string, number, array of option IDs, etc.)" | |
| }, | |
| "minimum_value": { | |
| "type": "integer", | |
| "description": "For date/number fields, the minimum value (Unix timestamp for dates)" | |
| }, | |
| "maximum_value": { | |
| "type": "integer", | |
| "description": "For date/number fields, the maximum value (Unix timestamp for dates)" | |
| }, | |
| "allow_empty": { | |
| "type": "boolean", | |
| "description": "When true, includes records where this custom field is empty/null" | |
| } | |
| } | |
| } | |
| }, | |
| "sort_by": { | |
| "type": "string", | |
| "enum": [ | |
| "name", | |
| "title", | |
| "email", | |
| "phone", | |
| "date_modified", | |
| "date_created", | |
| "city", | |
| "state", | |
| "country", | |
| "zip", | |
| "socials" | |
| ], | |
| "description": "The field on which to sort the results" | |
| }, | |
| "sort_direction": { | |
| "type": "string", | |
| "enum": [ | |
| "asc", | |
| "desc" | |
| ], | |
| "description": "The direction in which to sort the results" | |
| }, | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 25, | |
| "default": 25, | |
| "description": "The number of entries included in a page of results" | |
| }, | |
| "fields": { | |
| "type": "array", | |
| "description": "Specify which fields to include in the response to reduce payload size. Include system field names as strings (e.g., 'name', 'title', 'emails'). To include specific custom fields, add an object with custom_fields array. If omitted, all fields are returned.", | |
| "items": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "System field name (e.g., 'id', 'name', 'first_name', 'last_name', 'title', 'emails', 'phone_numbers', 'company_id', 'company_name', 'assignee_id', 'contact_type_id', 'address', 'tags', 'socials', 'websites', 'date_created', 'date_modified', 'date_last_contacted', 'interaction_count')" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "Array of custom field definition IDs to include", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The ID of the custom field definition to include in the response" | |
| } | |
| }, | |
| "required": [ | |
| "custom_field_definition_id" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "custom_fields" | |
| ] | |
| } | |
| ] | |
| }, | |
| "example": [ | |
| "id", | |
| "name", | |
| "title", | |
| "company_name", | |
| "emails" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "People retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Person" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/people/fetch_by_email": { | |
| "post": { | |
| "tags": [ | |
| "People" | |
| ], | |
| "summary": "Fetch a person by email", | |
| "description": "Email address is a unique key for People records in Copper. You can fetch a Person by its email address using this operation. This endpoint is eligible to return computed custom field values.", | |
| "operationId": "getPersonByEmail", | |
| "parameters": [ | |
| { | |
| "name": "custom_field_computed_values", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, returns computed custom field values (human-readable labels) in addition to option IDs for Dropdown and Multi-select fields. The response will include a 'computed_value' field alongside the 'value' field in custom_fields array.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "email": { | |
| "type": "string", | |
| "format": "email", | |
| "description": "The email address to search for", | |
| "example": "mycontact_123@noemail.com" | |
| } | |
| }, | |
| "required": [ | |
| "email" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Person retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Person" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/people/{id}/activities": { | |
| "post": { | |
| "tags": [ | |
| "People" | |
| ], | |
| "summary": "Get person activities", | |
| "description": "Retrieve all activities associated with a specific person", | |
| "operationId": "getPersonActivities", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "description": "Person ID", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Person activities retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Activity" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/contact_types": { | |
| "get": { | |
| "tags": [ | |
| "People" | |
| ], | |
| "summary": "List contact types", | |
| "description": "Retrieve a list of all contact types in the account", | |
| "operationId": "listContactTypes", | |
| "responses": { | |
| "200": { | |
| "description": "Contact types retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the contact type", | |
| "example": 451492 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the contact type", | |
| "example": "Potential Customer" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/companies/search": { | |
| "post": { | |
| "tags": [ | |
| "Companies" | |
| ], | |
| "summary": "Search companies", | |
| "description": "Search companies. Response uses a pagination envelope (`page_number`,`total`,`data`) so ChatGPT can read pagination info; the X-PW-TOTAL header still exists. Paginate with page_number/page_size (max 200) until received records equal total. Limited to 100K results.", | |
| "operationId": "searchCompanies", | |
| "parameters": [ | |
| { | |
| "name": "custom_field_computed_values", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, returns computed custom field values (human-readable labels) in addition to option IDs for Dropdown and Multi-select fields. The response will include a 'computed_value' field alongside the 'value' field in custom_fields array.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of Company IDs to retrieve" | |
| }, | |
| "name": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "Simple string for exact match (case-insensitive). Example: 'Acme Corp' will only match companies named exactly 'Acme Corp'." | |
| }, | |
| { | |
| "type": "object", | |
| "description": "Advanced object format for controlling match type", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "description": "The company name to search for" | |
| }, | |
| "special_value": { | |
| "type": "array", | |
| "description": "Array specifying the match type", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "enum": ["partial", "exact"], | |
| "description": "Match type: 'partial' for substring matching (e.g., 'Happy Cat' matches 'Happy Cat Hotels'), 'exact' for exact match" | |
| } | |
| }, | |
| "required": ["type"] | |
| }, | |
| "maxItems": 1 | |
| } | |
| }, | |
| "required": ["value", "special_value"], | |
| "example": { | |
| "value": "Happy Cat", | |
| "special_value": [{"type": "partial"}] | |
| } | |
| } | |
| ], | |
| "description": "Filter by company name. Use simple string for exact match (case-insensitive), or use object format with special_value for partial matching capability." | |
| }, | |
| "email_domain": { | |
| "type": "string", | |
| "description": "Filter by email domain (unique key for companies)" | |
| }, | |
| "email_domains": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of email domains to filter by" | |
| }, | |
| "phone_number": { | |
| "type": "string", | |
| "description": "Filter by phone number" | |
| }, | |
| "city": { | |
| "type": "string", | |
| "description": "Filter by city in address" | |
| }, | |
| "state": { | |
| "type": "string", | |
| "description": "Filter by state in address" | |
| }, | |
| "postal_code": { | |
| "type": "string", | |
| "description": "Filter by postal code in address" | |
| }, | |
| "country": { | |
| "type": "string", | |
| "description": "Filter by country in address (two-character country code)" | |
| }, | |
| "primary_contact_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of person IDs who are the primary contacts for these companies." | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of tags to filter by" | |
| }, | |
| "assignee_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of assignee IDs to filter by (the user IDs who own these companies). Use -2 for no assignee." | |
| }, | |
| "contact_type_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of contact type IDs to filter by. See List Contact Types." | |
| }, | |
| "socials": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of social profile URLs to filter by" | |
| }, | |
| "followed": { | |
| "type": "integer", | |
| "enum": [ | |
| 1, | |
| 2 | |
| ], | |
| "description": "Filter by followed status. Use 1 for followed companies, 2 for not followed." | |
| }, | |
| "age": { | |
| "type": "integer", | |
| "description": "Maximum age in seconds of the company record" | |
| }, | |
| "minimum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by minimum number of interactions" | |
| }, | |
| "maximum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by maximum number of interactions" | |
| }, | |
| "minimum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the earliest date of the last interaction" | |
| }, | |
| "maximum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the latest date of the last interaction" | |
| }, | |
| "minimum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum creation date" | |
| }, | |
| "maximum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum creation date" | |
| }, | |
| "minimum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum modification date" | |
| }, | |
| "maximum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum modification date" | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field filters to search by. For date fields, use minimum_value and maximum_value. For multi-select fields, you can use allow_empty to include records where the field is empty.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The custom field definition ID to filter by" | |
| }, | |
| "value": { | |
| "description": "The value to match (can be string, number, array of option IDs, etc.)" | |
| }, | |
| "minimum_value": { | |
| "type": "integer", | |
| "description": "For date/number fields, the minimum value (Unix timestamp for dates)" | |
| }, | |
| "maximum_value": { | |
| "type": "integer", | |
| "description": "For date/number fields, the maximum value (Unix timestamp for dates)" | |
| }, | |
| "allow_empty": { | |
| "type": "boolean", | |
| "description": "When true, includes records where this custom field is empty/null" | |
| } | |
| } | |
| } | |
| }, | |
| "sort_by": { | |
| "type": "string", | |
| "enum": [ | |
| "name", | |
| "phone", | |
| "contact", | |
| "contact_first_name", | |
| "contact_last_name", | |
| "date_modified", | |
| "date_created", | |
| "email_domain", | |
| "city", | |
| "state", | |
| "country", | |
| "zip", | |
| "assignee", | |
| "contact_group", | |
| "last_interaction", | |
| "interaction_count", | |
| "primary_website", | |
| "socials" | |
| ], | |
| "description": "The field on which to sort the results" | |
| }, | |
| "sort_direction": { | |
| "type": "string", | |
| "enum": [ | |
| "asc", | |
| "desc" | |
| ], | |
| "description": "The direction in which to sort the results" | |
| }, | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| }, | |
| "fields": { | |
| "type": "array", | |
| "description": "Specify which fields to include in the response to reduce payload size. Include system field names as strings (e.g., 'name', 'email_domain', 'phone_numbers'). To include specific custom fields, add an object with custom_fields array. If omitted, all fields are returned.", | |
| "items": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "System field name (e.g., 'id', 'name', 'email_domain', 'phone_numbers', 'address', 'assignee_id', 'contact_type_id', 'primary_contact_id', 'tags', 'socials', 'websites', 'interaction_count', 'date_created', 'date_modified')" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "Array of custom field definition IDs to include", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The ID of the custom field definition to include in the response" | |
| } | |
| }, | |
| "required": [ | |
| "custom_field_definition_id" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "custom_fields" | |
| ] | |
| } | |
| ] | |
| }, | |
| "example": [ | |
| "id", | |
| "name", | |
| "email_domain", | |
| "assignee_id", | |
| "interaction_count" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Companies retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Company" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/companies/{id}/activities": { | |
| "post": { | |
| "tags": [ | |
| "Companies" | |
| ], | |
| "summary": "Get company activities", | |
| "description": "Retrieve all activities associated with a specific company", | |
| "operationId": "getCompanyActivities", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "description": "Company ID", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Company activities retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Activity" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/opportunities/{id}": { | |
| "get": { | |
| "tags": [ | |
| "Opportunities" | |
| ], | |
| "summary": "Get opportunity by ID", | |
| "description": "Retrieve a specific opportunity by their ID. This endpoint is eligible to return computed custom field values.", | |
| "operationId": "getOpportunity", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "description": "Opportunity ID", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| }, | |
| { | |
| "name": "custom_field_computed_values", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, returns computed custom field values (human-readable labels) in addition to option IDs for Dropdown and Multi-select fields. The response will include a 'computed_value' field alongside the 'value' field in custom_fields array.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Opportunity retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "$ref": "#/components/schemas/Opportunity" | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/opportunities/{id}/activities": { | |
| "post": { | |
| "tags": [ | |
| "Opportunities" | |
| ], | |
| "summary": "Get opportunity activities", | |
| "description": "Retrieve all activities associated with a specific opportunity", | |
| "operationId": "getOpportunityActivities", | |
| "parameters": [ | |
| { | |
| "name": "id", | |
| "in": "path", | |
| "required": true, | |
| "description": "Opportunity ID", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Opportunity activities retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Activity" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/opportunities/search": { | |
| "post": { | |
| "tags": [ | |
| "Opportunities" | |
| ], | |
| "summary": "Search opportunities", | |
| "description": "Search opportunities. Response uses a pagination envelope (`page_number`,`total`,`data`) so ChatGPT can read pagination info; the X-PW-TOTAL header still exists. Paginate with page_number/page_size (max 200) until received records equal total. Limited to 100K results.", | |
| "operationId": "searchOpportunities", | |
| "parameters": [ | |
| { | |
| "name": "custom_field_computed_values", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, returns computed custom field values (human-readable labels) in addition to option IDs. WARNING: This significantly increases payload size. For ChatGPT/Copper GPT, only set this to true when the user explicitly asks for custom field labels, and then reduce page_size (<= 10) and fields to ONLY what is absolutely required.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of Opportunity IDs to retrieve" | |
| }, | |
| "name": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "Simple string for exact match (case-insensitive). Example: '2024 Q4 Deal' will only match opportunities named exactly '2024 Q4 Deal'." | |
| }, | |
| { | |
| "type": "object", | |
| "description": "Advanced object format for controlling match type", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "description": "The opportunity name to search for" | |
| }, | |
| "special_value": { | |
| "type": "array", | |
| "description": "Array specifying the match type", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "enum": ["partial", "exact"], | |
| "description": "Match type: 'partial' for substring matching (e.g., 'Q4' matches '2024 Q4 Deal'), 'exact' for exact match" | |
| } | |
| }, | |
| "required": ["type"] | |
| }, | |
| "maxItems": 1 | |
| } | |
| }, | |
| "required": ["value", "special_value"], | |
| "example": { | |
| "value": "Q4", | |
| "special_value": [{"type": "partial"}] | |
| } | |
| } | |
| ], | |
| "description": "Filter by opportunity name. Use simple string for exact match (case-insensitive), or use object format with special_value for partial matching capability." | |
| }, | |
| "company_name": { | |
| "type": "string", | |
| "description": "Filter by the name of the primary company associated with the opportunity" | |
| }, | |
| "company_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of company IDs to filter by (the companies these opportunities are associated with). Use -2 for no company." | |
| }, | |
| "primary_contact_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of person IDs who are the primary contacts for these opportunities" | |
| }, | |
| "close_date": { | |
| "type": "integer", | |
| "description": "Filter by expected close date (Unix timestamp)" | |
| }, | |
| "minimum_close_date": { | |
| "type": "integer", | |
| "description": "Filter by minimum close date (Unix timestamp)" | |
| }, | |
| "maximum_close_date": { | |
| "type": "integer", | |
| "description": "Filter by maximum close date (Unix timestamp)" | |
| }, | |
| "minimum_monetary_value": { | |
| "type": "number", | |
| "description": "Filter by minimum monetary value" | |
| }, | |
| "maximum_monetary_value": { | |
| "type": "number", | |
| "description": "Filter by maximum monetary value" | |
| }, | |
| "minimum_win_probability": { | |
| "type": "integer", | |
| "minimum": 0, | |
| "maximum": 100, | |
| "description": "Filter by minimum win probability (0-100)" | |
| }, | |
| "maximum_win_probability": { | |
| "type": "integer", | |
| "minimum": 0, | |
| "maximum": 100, | |
| "description": "Filter by maximum win probability (0-100)" | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of tags to filter by" | |
| }, | |
| "assignee_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of assignee IDs to filter by (the user IDs who own these opportunities). Use -2 for no assignee." | |
| }, | |
| "pipeline_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of pipeline IDs to filter by" | |
| }, | |
| "pipeline_stage_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of pipeline stage IDs to filter by" | |
| }, | |
| "statuses": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "Open", | |
| "Won", | |
| "Lost", | |
| "Abandoned" | |
| ] | |
| }, | |
| "description": "An array of statuses to filter by" | |
| }, | |
| "priorities": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "None", | |
| "Low", | |
| "Medium", | |
| "High" | |
| ] | |
| }, | |
| "description": "An array of priorities to filter by" | |
| }, | |
| "loss_reason_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of loss reason IDs to filter by (for Lost opportunities)" | |
| }, | |
| "customer_source_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of customer source IDs to filter by" | |
| }, | |
| "followed": { | |
| "type": "integer", | |
| "enum": [ | |
| 1, | |
| 2 | |
| ], | |
| "description": "Filter by followed status. Use 1 for followed opportunities, 2 for not followed." | |
| }, | |
| "age": { | |
| "type": "integer", | |
| "description": "Maximum age in seconds of the opportunity record" | |
| }, | |
| "minimum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by minimum number of interactions" | |
| }, | |
| "maximum_interaction_count": { | |
| "type": "integer", | |
| "description": "Filter by maximum number of interactions" | |
| }, | |
| "minimum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the earliest date of the last interaction" | |
| }, | |
| "maximum_interaction_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the latest date of the last interaction" | |
| }, | |
| "minimum_date_stage_changed": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum date when the pipeline stage was changed" | |
| }, | |
| "maximum_date_stage_changed": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum date when the pipeline stage was changed" | |
| }, | |
| "minimum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum creation date" | |
| }, | |
| "maximum_created_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum creation date" | |
| }, | |
| "minimum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum modification date" | |
| }, | |
| "maximum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum modification date" | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field filters to search by. For date fields, use minimum_value and maximum_value. For multi-select fields, you can use allow_empty to include records where the field is empty, or use option: 'ANY' to match any of the specified values.", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The custom field definition ID to filter by" | |
| }, | |
| "value": { | |
| "description": "The value to match (can be string, number, array of option IDs, etc.)" | |
| }, | |
| "minimum_value": { | |
| "type": "integer", | |
| "description": "For date/number fields, the minimum value (Unix timestamp for dates)" | |
| }, | |
| "maximum_value": { | |
| "type": "integer", | |
| "description": "For date/number fields, the maximum value (Unix timestamp for dates)" | |
| }, | |
| "allow_empty": { | |
| "type": "boolean", | |
| "description": "When true, includes records where this custom field is empty/null" | |
| }, | |
| "option": { | |
| "type": "string", | |
| "enum": [ | |
| "ANY" | |
| ], | |
| "description": "For multi-select fields, set to 'ANY' to match any of the specified values" | |
| } | |
| } | |
| } | |
| }, | |
| "sort_by": { | |
| "type": "string", | |
| "enum": [ | |
| "assignee", | |
| "company_name", | |
| "customer_source_id", | |
| "date_created", | |
| "date_modified", | |
| "inactive_days", | |
| "interaction_count", | |
| "last_interaction", | |
| "monetary_unit", | |
| "monetary_value", | |
| "name", | |
| "primary_contact", | |
| "priority", | |
| "stage", | |
| "status" | |
| ], | |
| "description": "The field on which to sort the results. Possible values: assignee, company_name, customer_source_id, date_created, date_modified, inactive_days, interaction_count, last_interaction, monetary_unit, monetary_value, name, primary_contact, priority, stage, status" | |
| }, | |
| "sort_direction": { | |
| "type": "string", | |
| "enum": [ | |
| "asc", | |
| "desc" | |
| ], | |
| "description": "The direction in which to sort the results" | |
| }, | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 25, | |
| "default": 25, | |
| "description": "The number of entries included in a page of results" | |
| }, | |
| "fields": { | |
| "type": "array", | |
| "description": "Specify which fields to include in the response to reduce payload size. For ChatGPT/Copper GPT, ALWAYS limit to the minimal set of fields needed for the current question. Default minimal set for deal analytics is: 'id', 'name', 'company_id', 'pipeline_id', 'pipeline_stage_id', 'monetary_value', 'close_date', 'assignee_id', 'status'. DO NOT request 'details', 'custom_fields', or 'custom_field_computed_values' unless the user explicitly asks for those values.", | |
| "items": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "System field name (e.g., 'id', 'name', 'status', 'monetary_value', 'close_date', 'pipeline_id', 'pipeline_stage_id', 'assignee_id', 'company_ids', 'primary_contact_id', 'tags')" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "Array of custom field definition IDs to include", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The ID of the custom field definition to include in the response" | |
| } | |
| }, | |
| "required": [ | |
| "custom_field_definition_id" | |
| ] | |
| } | |
| } | |
| }, | |
| "required": [ | |
| "custom_fields" | |
| ] | |
| } | |
| ] | |
| }, | |
| "example": [ | |
| "id", | |
| "name", | |
| "company_id", | |
| "pipeline_stage_id", | |
| "monetary_value", | |
| "close_date", | |
| "assignee_id" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Opportunities retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Opportunity" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/loss_reasons": { | |
| "get": { | |
| "tags": [ | |
| "Opportunities" | |
| ], | |
| "summary": "List loss reasons", | |
| "description": "Retrieve a list of all loss reasons in the account", | |
| "operationId": "listLossReasons", | |
| "responses": { | |
| "200": { | |
| "description": "Loss reasons retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the loss reason", | |
| "example": 98 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the loss reason", | |
| "example": "Too Expensive" | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/pipelines": { | |
| "get": { | |
| "tags": [ | |
| "Opportunities" | |
| ], | |
| "summary": "List pipelines", | |
| "description": "Retrieve a list of all pipelines in the account", | |
| "operationId": "listPipelines", | |
| "responses": { | |
| "200": { | |
| "description": "Pipelines retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the pipeline", | |
| "example": 213214 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the pipeline", | |
| "example": "Sales Pipeline" | |
| }, | |
| "stages": { | |
| "type": "array", | |
| "description": "The stages defined in this pipeline", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the pipeline stage", | |
| "example": 987790 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the pipeline stage", | |
| "example": "Qualified" | |
| }, | |
| "win_probability": { | |
| "type": "integer", | |
| "description": "The default win probability for opportunities in this stage", | |
| "nullable": true, | |
| "example": 25 | |
| } | |
| } | |
| } | |
| }, | |
| "type": { | |
| "type": "string", | |
| "description": "The type of the pipeline", | |
| "enum": [ | |
| "opportunity", | |
| "project", | |
| "item" | |
| ], | |
| "example": "opportunity" | |
| }, | |
| "is_revenue": { | |
| "type": "boolean", | |
| "description": "Whether the pipeline is used for revenue tracking", | |
| "example": true | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/pipeline_stages": { | |
| "get": { | |
| "tags": [ | |
| "Opportunities" | |
| ], | |
| "summary": "List all pipeline stages", | |
| "description": "Retrieve a list of all pipeline stages across all pipelines in the account", | |
| "operationId": "listPipelineStages", | |
| "responses": { | |
| "200": { | |
| "description": "Pipeline stages retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "Unique identifier for the pipeline stage", | |
| "example": 987790 | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "Name of the pipeline stage", | |
| "example": "Qualified" | |
| }, | |
| "pipeline_id": { | |
| "type": "integer", | |
| "description": "The pipeline that this stage belongs to", | |
| "example": 213214 | |
| }, | |
| "win_probability": { | |
| "type": "integer", | |
| "description": "The default win probability for opportunities in this stage", | |
| "minimum": 0, | |
| "maximum": 100, | |
| "example": 25 | |
| } | |
| }, | |
| "required": [ | |
| "id", | |
| "name", | |
| "pipeline_id" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/tasks/search": { | |
| "post": { | |
| "tags": [ | |
| "Tasks" | |
| ], | |
| "summary": "Search tasks", | |
| "description": "Search tasks. Response uses a pagination envelope (`page_number`,`total`,`data`) so ChatGPT can read pagination info; the X-PW-TOTAL header still exists. Paginate with page_number/page_size (max 200) until received records equal total. Limited to 100K results.", | |
| "operationId": "searchTasks", | |
| "parameters": [ | |
| { | |
| "name": "custom_field_computed_values", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, returns computed custom field values (human-readable labels) in addition to option IDs for Dropdown and Multi-select fields. The response will include a 'computed_value' field alongside the 'value' field in custom_fields array.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| } | |
| ], | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "Simple string for exact match (case-insensitive). Example: 'Follow up call' will only match tasks named exactly 'Follow up call'." | |
| }, | |
| { | |
| "type": "object", | |
| "description": "Advanced object format for controlling match type", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "description": "The task name to search for" | |
| }, | |
| "special_value": { | |
| "type": "array", | |
| "description": "Array specifying the match type", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "enum": ["partial", "exact"], | |
| "description": "Match type: 'partial' for substring matching (e.g., 'Follow' matches 'Follow up call'), 'exact' for exact match" | |
| } | |
| }, | |
| "required": ["type"] | |
| }, | |
| "maxItems": 1 | |
| } | |
| }, | |
| "required": ["value", "special_value"], | |
| "example": { | |
| "value": "Follow", | |
| "special_value": [{"type": "partial"}] | |
| } | |
| } | |
| ], | |
| "description": "Filter by task name. Use simple string for exact match (case-insensitive), or use object format with special_value for partial matching capability." | |
| }, | |
| "phrase": { | |
| "oneOf": [ | |
| { | |
| "type": "string", | |
| "description": "Simple string for exact match (case-insensitive). Alias for 'name' parameter." | |
| }, | |
| { | |
| "type": "object", | |
| "description": "Advanced object format for controlling match type", | |
| "properties": { | |
| "value": { | |
| "type": "string", | |
| "description": "The task name/phrase to search for" | |
| }, | |
| "special_value": { | |
| "type": "array", | |
| "description": "Array specifying the match type", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "type": { | |
| "type": "string", | |
| "enum": ["partial", "exact"], | |
| "description": "Match type: 'partial' for substring matching, 'exact' for exact match" | |
| } | |
| }, | |
| "required": ["type"] | |
| }, | |
| "maxItems": 1 | |
| } | |
| }, | |
| "required": ["value", "special_value"], | |
| "example": { | |
| "value": "Follow", | |
| "special_value": [{"type": "partial"}] | |
| } | |
| } | |
| ], | |
| "description": "Filter by task name (alias for 'name'). Use simple string for exact match (case-insensitive), or use object format with special_value for partial matching capability." | |
| }, | |
| "related_resource": { | |
| "type": "object", | |
| "description": "Filter by the primary related resource for the task", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The ID of the related resource" | |
| }, | |
| "type": { | |
| "type": "string", | |
| "enum": [ | |
| "person", | |
| "company", | |
| "opportunity", | |
| "project", | |
| "lead" | |
| ], | |
| "description": "The type of the related resource" | |
| } | |
| } | |
| }, | |
| "tags": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "description": "An array of tags to filter by" | |
| }, | |
| "assignee_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of assignee IDs to filter by (the user IDs who own these tasks)" | |
| }, | |
| "statuses": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "Open", | |
| "Completed" | |
| ] | |
| }, | |
| "description": "An array of statuses to filter by" | |
| }, | |
| "priorities": { | |
| "type": "array", | |
| "items": { | |
| "type": "string", | |
| "enum": [ | |
| "None", | |
| "Low", | |
| "Medium", | |
| "High" | |
| ] | |
| }, | |
| "description": "An array of priorities to filter by" | |
| }, | |
| "minimum_due_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum due date" | |
| }, | |
| "maximum_due_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum due date" | |
| }, | |
| "minimum_reminder_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum reminder date" | |
| }, | |
| "maximum_reminder_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum reminder date" | |
| }, | |
| "minimum_completed_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum completed date" | |
| }, | |
| "maximum_completed_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum completed date" | |
| }, | |
| "minimum_close_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum creation date" | |
| }, | |
| "maximum_close_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum creation date" | |
| }, | |
| "minimum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum modification date" | |
| }, | |
| "maximum_modified_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum modification date" | |
| }, | |
| "custom_fields": { | |
| "type": "array", | |
| "description": "An array of custom field filters. Each filter can include custom_field_definition_id and optionally allow_empty to include records where the field is empty", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "custom_field_definition_id": { | |
| "type": "integer", | |
| "description": "The custom field definition ID to filter by" | |
| }, | |
| "value": { | |
| "description": "The value to match (can be string, number, array of option IDs, etc.)" | |
| }, | |
| "allow_empty": { | |
| "type": "boolean", | |
| "description": "When true, includes records where this custom field is empty/null" | |
| } | |
| } | |
| } | |
| }, | |
| "sort_by": { | |
| "type": "string", | |
| "enum": [ | |
| "name", | |
| "assigned_to", | |
| "related_to", | |
| "status", | |
| "priority", | |
| "due_date", | |
| "reminder_date", | |
| "completed_date", | |
| "date_created", | |
| "date_modified" | |
| ], | |
| "description": "The field on which to sort the results" | |
| }, | |
| "sort_direction": { | |
| "type": "string", | |
| "enum": [ | |
| "asc", | |
| "desc" | |
| ], | |
| "description": "The direction in which to sort the results" | |
| }, | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Tasks retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Task" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/activities/search": { | |
| "post": { | |
| "tags": [ | |
| "Activities" | |
| ], | |
| "summary": "Search activities", | |
| "description": "Search activities (use min/max_activity_date for ranges). Response uses pagination envelope (`page_number`,`total`,`data`) so ChatGPT can read pagination info; the X-PW-TOTAL header still exists. Paginate with page_number/page_size (max 200) until received records equal total. Limit to 100K results.", | |
| "operationId": "searchActivities", | |
| "requestBody": { | |
| "required": false, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "properties": { | |
| "parent": { | |
| "type": "object", | |
| "description": "Filter activities by parent resource", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The ID of the parent resource" | |
| }, | |
| "type": { | |
| "type": "string", | |
| "enum": [ | |
| "lead", | |
| "person", | |
| "company", | |
| "opportunity" | |
| ], | |
| "description": "The type of the parent resource" | |
| } | |
| } | |
| }, | |
| "activity_types": { | |
| "type": "array", | |
| "description": "An array of activity type objects to filter by", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The activity type ID" | |
| }, | |
| "category": { | |
| "type": "string", | |
| "enum": [ | |
| "user", | |
| "system" | |
| ], | |
| "description": "The activity type category" | |
| } | |
| } | |
| } | |
| }, | |
| "user_ids": { | |
| "type": "array", | |
| "items": { | |
| "type": "integer" | |
| }, | |
| "description": "An array of user IDs to filter by" | |
| }, | |
| "minimum_activity_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the minimum activity date to filter by" | |
| }, | |
| "maximum_activity_date": { | |
| "type": "integer", | |
| "description": "Unix timestamp for the maximum activity date to filter by" | |
| }, | |
| "full_result": { | |
| "type": "boolean", | |
| "description": "When true, returns all activities matching the criteria (pagination still applies)", | |
| "default": false | |
| }, | |
| "sort_by": { | |
| "type": "string", | |
| "description": "The field on which to sort the results" | |
| }, | |
| "sort_direction": { | |
| "type": "string", | |
| "enum": [ | |
| "asc", | |
| "desc" | |
| ], | |
| "description": "The direction in which to sort the results" | |
| }, | |
| "page_number": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "default": 1, | |
| "description": "The page number (starting with 1) that you would like to view" | |
| }, | |
| "page_size": { | |
| "type": "integer", | |
| "minimum": 1, | |
| "maximum": 200, | |
| "default": 50, | |
| "description": "The number of entries included in a page of results" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "responses": { | |
| "200": { | |
| "description": "Activities retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| }, | |
| "X-PW-TOTAL": { | |
| "$ref": "#/components/headers/X-PW-TOTAL" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "allOf": [ | |
| { | |
| "$ref": "#/components/schemas/PaginationEnvelope" | |
| }, | |
| { | |
| "type": "object", | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/Activity" | |
| } | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/activity_types": { | |
| "get": { | |
| "tags": [ | |
| "Activities" | |
| ], | |
| "summary": "List activity types", | |
| "description": "Retrieve a list of all available activity types in Copper", | |
| "operationId": "listActivityTypes", | |
| "responses": { | |
| "200": { | |
| "description": "Activity types retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "id": { | |
| "type": "integer", | |
| "description": "The activity type ID", | |
| "example": 190711 | |
| }, | |
| "category": { | |
| "type": "string", | |
| "enum": [ | |
| "user", | |
| "system" | |
| ], | |
| "description": "The activity type category", | |
| "example": "user" | |
| }, | |
| "name": { | |
| "type": "string", | |
| "description": "The activity type name", | |
| "example": "Phone Call" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/tags": { | |
| "get": { | |
| "tags": [ | |
| "Tags" | |
| ], | |
| "summary": "List all tags", | |
| "description": "Retrieve a list of all tags and their entity usage counts. When tag_names_only=true, returns an array of strings instead of tag objects.", | |
| "operationId": "listTags", | |
| "parameters": [ | |
| { | |
| "name": "sort_by", | |
| "in": "query", | |
| "required": false, | |
| "description": "Can sort by the tag name or count (the total number of times it is used). Only applicable when tag_names_only=false, otherwise it is auto-sorted by name.", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "name", | |
| "count" | |
| ], | |
| "default": "name" | |
| } | |
| }, | |
| { | |
| "name": "tag_names_only", | |
| "in": "query", | |
| "required": false, | |
| "description": "When true, only a list of tag names is provided with no entity usage counts (returns array of strings). When false or omitted, returns full tag objects with counts.", | |
| "schema": { | |
| "type": "boolean", | |
| "default": false | |
| } | |
| }, | |
| { | |
| "name": "last_tag_value", | |
| "in": "query", | |
| "required": false, | |
| "description": "Requires tag_names_only=true. Allows you to provide a tag value to get all the tags that occur after it in the alphabetically-sorted list. The max page size is 10000 so you can use this to paginate through large tag lists.", | |
| "schema": { | |
| "type": "string" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Tags retrieved successfully. Response format depends on tag_names_only parameter: array of Tag objects (default) or array of strings (when tag_names_only=true).", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "oneOf": [ | |
| { | |
| "type": "array", | |
| "description": "Array of tag objects with usage counts (default when tag_names_only=false or omitted)", | |
| "items": { | |
| "$ref": "#/components/schemas/Tag" | |
| } | |
| }, | |
| { | |
| "type": "array", | |
| "description": "Array of tag name strings (when tag_names_only=true)", | |
| "items": { | |
| "type": "string", | |
| "example": "Apples" | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/custom_activity_types": { | |
| "get": { | |
| "tags": [ | |
| "Custom Fields" | |
| ], | |
| "summary": "List all custom activity types", | |
| "description": "Retrieve a list of all custom activity types in the account", | |
| "operationId": "listCustomActivityTypes", | |
| "responses": { | |
| "200": { | |
| "description": "Custom activity types retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/CustomActivityType" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/custom_field_definitions": { | |
| "get": { | |
| "tags": [ | |
| "Custom Fields" | |
| ], | |
| "summary": "List custom field definitions", | |
| "description": "Retrieve a list of all custom field definitions in the account", | |
| "operationId": "listCustomFieldDefinitions", | |
| "responses": { | |
| "200": { | |
| "description": "Custom field definitions retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/CustomFieldDefinition" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/field_layouts/by_entity/{entity_type}": { | |
| "get": { | |
| "tags": [ | |
| "Field Layouts" | |
| ], | |
| "summary": "List field layout by entity type", | |
| "description": "Retrieve the field layout for a given entity type. A field layout is an array of field objects, defining which fields apply to an entity type, and their display order. Layouts are configured in Copper under Settings > Manage Fields On Records. For 'opportunities', you MUST specify a pipeline_id.", | |
| "operationId": "listFieldLayoutByEntityType", | |
| "parameters": [ | |
| { | |
| "name": "entity_type", | |
| "in": "path", | |
| "required": true, | |
| "description": "The entity type to retrieve the field layout for", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "leads", | |
| "people", | |
| "companies", | |
| "opportunities", | |
| "projects", | |
| "tasks" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "pipeline_id", | |
| "in": "query", | |
| "required": false, | |
| "description": "Pipeline ID. Required when entity_type is 'opportunities'.", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Field layout retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", | |
| "properties": { | |
| "field_id": { | |
| "type": "integer", | |
| "description": "The id of the field. Default fields are sequential integers; custom fields and embedded-app fields use the ids of those entities.", | |
| "example": 0 | |
| }, | |
| "field_label": { | |
| "type": "string", | |
| "description": "The user-friendly label of the field", | |
| "example": "Name" | |
| }, | |
| "field_key": { | |
| "type": "string", | |
| "description": "An internal identifying name of the field. Custom fields follow the format 'cf_<field_id>'. Embedded-app fields are defined as 'embedded_<field_id>'.", | |
| "example": "full_name" | |
| }, | |
| "field_type": { | |
| "type": "string", | |
| "description": "The type of the field", | |
| "enum": [ | |
| "static_field", | |
| "custom_field", | |
| "embedded_app_field" | |
| ], | |
| "example": "static_field" | |
| }, | |
| "enabled": { | |
| "type": "boolean", | |
| "description": "Whether the field is enabled for the current entity_type in the webapp", | |
| "example": true | |
| }, | |
| "required": { | |
| "type": "boolean", | |
| "description": "Whether the field is required to be set on create", | |
| "example": true | |
| }, | |
| "required_editable": { | |
| "type": "boolean", | |
| "description": "Whether the field is required to be set on edit", | |
| "example": true | |
| } | |
| }, | |
| "required": [ | |
| "field_id", | |
| "field_label", | |
| "field_key", | |
| "field_type", | |
| "enabled", | |
| "required", | |
| "required_editable" | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "400": { | |
| "$ref": "#/components/responses/BadRequest" | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/{entity_type}/{entity_id}/related": { | |
| "get": { | |
| "tags": [ | |
| "Related Items" | |
| ], | |
| "summary": "View all records related to an entity", | |
| "description": "Retrieve all related items for a specific entity. All relationships are bidirectional. Supported relationships include connections between Leads, People, Companies, Opportunities, Projects and Tasks. See docs for details.", | |
| "operationId": "getRelatedItems", | |
| "parameters": [ | |
| { | |
| "name": "entity_type", | |
| "in": "path", | |
| "required": true, | |
| "description": "Type of the source entity", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "leads", | |
| "people", | |
| "companies", | |
| "opportunities", | |
| "projects", | |
| "tasks" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "entity_id", | |
| "in": "path", | |
| "required": true, | |
| "description": "ID of the source entity", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Related items retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/RelatedItem" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| }, | |
| "/{entity_type}/{entity_id}/related/{related_entity_type}": { | |
| "get": { | |
| "tags": [ | |
| "Related Items" | |
| ], | |
| "summary": "View all records of a given entity type related to an entity", | |
| "description": "Retrieve all related items of a specific type for a given entity. For example, get all opportunities related to a person, or all tasks related to a company.", | |
| "operationId": "getRelatedItemsByType", | |
| "parameters": [ | |
| { | |
| "name": "entity_type", | |
| "in": "path", | |
| "required": true, | |
| "description": "Type of the source entity", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "leads", | |
| "people", | |
| "companies", | |
| "opportunities", | |
| "projects", | |
| "tasks" | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "entity_id", | |
| "in": "path", | |
| "required": true, | |
| "description": "ID of the source entity", | |
| "schema": { | |
| "type": "integer" | |
| } | |
| }, | |
| { | |
| "name": "related_entity_type", | |
| "in": "path", | |
| "required": true, | |
| "description": "Type of related entities to retrieve", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "leads", | |
| "people", | |
| "companies", | |
| "opportunities", | |
| "projects", | |
| "tasks" | |
| ] | |
| } | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "description": "Related items retrieved successfully", | |
| "headers": { | |
| "X-RateLimit-Limit": { | |
| "$ref": "#/components/headers/X-RateLimit-Limit" | |
| }, | |
| "X-RateLimit-Remaining": { | |
| "$ref": "#/components/headers/X-RateLimit-Remaining" | |
| }, | |
| "X-RateLimit-Reset": { | |
| "$ref": "#/components/headers/X-RateLimit-Reset" | |
| } | |
| }, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/components/schemas/RelatedItem" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "401": { | |
| "$ref": "#/components/responses/Unauthorized" | |
| }, | |
| "404": { | |
| "$ref": "#/components/responses/NotFound" | |
| }, | |
| "429": { | |
| "$ref": "#/components/responses/TooManyRequests" | |
| }, | |
| "500": { | |
| "$ref": "#/components/responses/InternalServerError" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "x-rate-limit": { | |
| "description": "Copper API rate limiting information", | |
| "general": { | |
| "limit": 180, | |
| "period": "minute", | |
| "description": "Maximum of 180 requests per minute for general API calls" | |
| }, | |
| "bulk": { | |
| "limit": 3, | |
| "period": "second", | |
| "description": "Maximum of 3 requests per second for bulk operations" | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment