{
  "opencollection": "1.0.0",
  "info": {
    "name": "Unified CRM Accounts Leads API",
    "version": "0.25.7"
  },
  "items": [
    {
      "info": {
        "name": "Leads",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List leads",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.supaglue.io/crm/v2/leads",
            "headers": [
              {
                "name": "x-customer-id",
                "value": "my-customer-1"
              },
              {
                "name": "x-provider-name",
                "value": "salesforce"
              }
            ],
            "params": [
              {
                "name": "include_raw_data",
                "value": "true",
                "type": "query",
                "description": "Whether to include raw data fetched from the 3rd party provider."
              },
              {
                "name": "read_from_cache",
                "value": "true",
                "type": "query",
                "description": "Whether to read from Supaglue's Managed Destination cache or to read directly from the provider. \n\n\n**NOTE**: `read_from_cache=true` requires you to have the object synced to the Supaglue Managed Destination.\n"
              },
              {
                "name": "modified_after",
                "value": "2023-02-23T00:00:00Z",
                "type": "query",
                "description": "If provided, will only return objects modified after this datetime. Datetime must be in ISO 8601 format and URI encoded."
              },
              {
                "name": "page_size",
                "value": "123",
                "type": "query",
                "description": "Number of results to return per page. (Max: 1000)"
              },
              {
                "name": "cursor",
                "value": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
                "type": "query",
                "description": "The pagination cursor value"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "List leads"
        },
        {
          "info": {
            "name": "Create lead",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.supaglue.io/crm/v2/leads",
            "headers": [
              {
                "name": "x-customer-id",
                "value": "my-customer-1"
              },
              {
                "name": "x-provider-name",
                "value": "salesforce"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create lead"
        },
        {
          "info": {
            "name": "Upsert lead",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.supaglue.io/crm/v2/leads/_upsert",
            "headers": [
              {
                "name": "x-customer-id",
                "value": "my-customer-1"
              },
              {
                "name": "x-provider-name",
                "value": "salesforce"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Upsert a lead. If the lead does not exist, it will be created. If the lead does exist, it will be updated.\nOnly supported for Salesforce.\n"
        },
        {
          "info": {
            "name": "Search leads",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.supaglue.io/crm/v2/leads/_search",
            "headers": [
              {
                "name": "x-customer-id",
                "value": "my-customer-1"
              },
              {
                "name": "x-provider-name",
                "value": "salesforce"
              }
            ],
            "params": [
              {
                "name": "include_raw_data",
                "value": "true",
                "type": "query",
                "description": "Whether to include raw data fetched from the 3rd party provider."
              },
              {
                "name": "page_size",
                "value": "123",
                "type": "query",
                "description": "Number of results to return per page. (Max: 1000)"
              },
              {
                "name": "cursor",
                "value": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
                "type": "query",
                "description": "The pagination cursor value"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Search leads by a filter.\nSupport:\n\n| Provider    | Search By       |\n| ----------- | --------------- |\n| Hubspot     | Email           |\n| Salesforce  | Email           |\n| Pipedrive   | (Not Supported) |\n| MS Dynamics | (Not Supported) |\n"
        },
        {
          "info": {
            "name": "Get lead",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.supaglue.io/crm/v2/leads/:lead_id",
            "headers": [
              {
                "name": "x-customer-id",
                "value": "my-customer-1"
              },
              {
                "name": "x-provider-name",
                "value": "salesforce"
              }
            ],
            "params": [
              {
                "name": "lead_id",
                "value": "82de27cb-6f8c-4278-b783-82d1d916eddc",
                "type": "path"
              },
              {
                "name": "include_raw_data",
                "value": "true",
                "type": "query",
                "description": "Whether to include raw data fetched from the 3rd party provider."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Get lead"
        },
        {
          "info": {
            "name": "Update lead",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.supaglue.io/crm/v2/leads/:lead_id",
            "headers": [
              {
                "name": "x-customer-id",
                "value": "my-customer-1"
              },
              {
                "name": "x-provider-name",
                "value": "salesforce"
              }
            ],
            "params": [
              {
                "name": "lead_id",
                "value": "82de27cb-6f8c-4278-b783-82d1d916eddc",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "x-api-key",
              "value": "{{x-api-key}}",
              "placement": "header"
            }
          },
          "docs": "Update lead"
        }
      ]
    }
  ],
  "bundled": true
}