Copper Leads API

Lead records and conversion

Documentation

Specifications

Other Resources

OpenAPI Specification

copper-leads-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Copper Developer Activities Leads API
  version: '1.0'
  description: Copper is a CRM platform built natively for Google Workspace. The Copper Developer API is a RESTful JSON API providing programmatic access to people, companies, leads, opportunities, projects, tasks, activities, and webhooks.
  contact:
    name: Copper Support
    url: https://www.copper.com/contact-us
  license:
    name: Proprietary
    url: https://www.copper.com/terms-of-service
servers:
- url: https://api.copper.com/developer_api/v1
  description: Copper Developer API production server
security:
- PWAccessToken: []
  PWApplication: []
  PWUserEmail: []
tags:
- name: Leads
  description: Lead records and conversion
paths:
  /leads/search:
    post:
      operationId: searchLeads
      summary: Search Leads
      description: Search and list Lead records using filter criteria.
      tags:
      - Leads
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LeadSearchRequest'
      responses:
        '200':
          description: List of matching Lead records
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Lead'
  /leads:
    post:
      operationId: createLead
      summary: Create a Lead
      tags:
      - Leads
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Lead'
      responses:
        '200':
          description: Created Lead record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
  /leads/{id}:
    get:
      operationId: getLead
      summary: Get a Lead
      tags:
      - Leads
      parameters:
      - $ref: '#/components/parameters/IdPathParam'
      responses:
        '200':
          description: Lead record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
    put:
      operationId: updateLead
      summary: Update a Lead
      tags:
      - Leads
      parameters:
      - $ref: '#/components/parameters/IdPathParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Lead'
      responses:
        '200':
          description: Updated Lead record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lead'
    delete:
      operationId: deleteLead
      summary: Delete a Lead
      tags:
      - Leads
      parameters:
      - $ref: '#/components/parameters/IdPathParam'
      responses:
        '200':
          description: Deletion confirmation
  /leads/{id}/convert:
    post:
      operationId: convertLead
      summary: Convert a Lead
      description: Convert a Lead into a Person, Company, and Opportunity.
      tags:
      - Leads
      parameters:
      - $ref: '#/components/parameters/IdPathParam'
      responses:
        '200':
          description: Conversion result with new Person, Company, and Opportunity references
          content:
            application/json:
              schema:
                type: object
                properties:
                  person_id:
                    type: integer
                  company_id:
                    type: integer
                  opportunity_id:
                    type: integer
components:
  schemas:
    LeadSearchRequest:
      type: object
      properties:
        page_number:
          type: integer
        page_size:
          type: integer
        sort_by:
          type: string
        name:
          type: string
        emails:
          type: array
          items:
            type: string
        status_ids:
          type: array
          items:
            type: integer
        tags:
          type: array
          items:
            type: string
    Lead:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        prefix:
          type: string
          nullable: true
        first_name:
          type: string
        last_name:
          type: string
        title:
          type: string
        company_name:
          type: string
        email:
          type: object
          properties:
            email:
              type: string
              format: email
            category:
              type: string
        phone_numbers:
          type: array
          items:
            type: object
        status:
          type: string
        status_id:
          type: integer
        source_id:
          type: integer
          nullable: true
        monetary_value:
          type: number
          nullable: true
        details:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldValue'
    CustomFieldValue:
      type: object
      properties:
        custom_field_definition_id:
          type: integer
        value:
          oneOf:
          - type: string
          - type: number
          - type: integer
          - type: boolean
          - type: array
            items:
              type: integer
          - type: 'null'
  parameters:
    IdPathParam:
      name: id
      in: path
      required: true
      schema:
        type: integer
        format: int64
      description: The unique resource identifier
  securitySchemes:
    PWAccessToken:
      type: apiKey
      in: header
      name: X-PW-AccessToken
      description: API access token for the user
    PWApplication:
      type: apiKey
      in: header
      name: X-PW-Application
      description: Application identifier, set to 'developer_api'
    PWUserEmail:
      type: apiKey
      in: header
      name: X-PW-UserEmail
      description: Email address of the API token owner