Lists

Lists endpoints for the CRM API Unified API

10.25.0
Run In Postman
|Full reference

The List resource represents a user-defined static or dynamic collection or segment of CRM records, such as contacts, companies, or opportunities.

The Lists model

idstring
required

The unique identifier of the List.

namestring
required

The name of the List.

descriptionstring or null

The description of the List.

typestring or null
Enum:staticdynamic

Whether the List is static (a fixed set of records) or dynamic (a saved segment that is automatically kept up to date based on filter criteria).

visibilitystring or null
Enum:privatesharedpublic

The visibility of the List. Which of these values a given connector can return depends on its native sharing model — see the connector-specific gotchas below for details.

owner_idstring or null

The unique identifier of the user who owns the List.

Lists example
{}

List lists

get
https://unify.apideck.com/crm/lists

List lists

Authorizations:

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

cursorstring or null

Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.

limitinteger[ 1 .. 200 ]
Default:20

Number of results to return. Minimum 1, Maximum 200, Default 20

pass_throughobjectpass_through[example_downstream_property]=example_downstream_property

Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads

fieldsstring or null

The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.

Responses

200Lists
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

ActiveCampaign
ActiveCampaign
Attio
Attio
Close
Close
HubSpot
HubSpot
Salesforce
Salesforce
Act
Act
Request
Blackbaud
Blackbaud
Request
Copper
Copper
Request
Flexmail
Flexmail
Request
Folk
Folk
Request
Freshworks CRM
Freshworks CRM
Request
Google Contacts
Google Contacts
Request
Holded
Holded
Request
Microsoft Dynamics CRM
Microsoft Dynamics CRM
Request
Microsoft Outlook
Microsoft Outlook
Request
Odoo
Odoo
Request
Pipedrive
Pipedrive
Request
Planhat
Planhat
Request
Salesflare
Salesflare
Request
Teamleader
Teamleader
Request
Zendesk Sell
Zendesk Sell
Request
Zoho CRM
Zoho CRM
Request

Request example

package main

import(
	"context"
	"os"
	sdkgo "github.com/apideck-libraries/sdk-go"
	"github.com/apideck-libraries/sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := sdkgo.New(
        sdkgo.WithConsumerID("test-consumer"),
        sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
        sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
    )

    res, err := s.Crm.Lists.List(ctx, operations.CrmListsAllRequest{
        ServiceID: sdkgo.Pointer("salesforce"),
        PassThrough: map[string]any{
            "search": "San Francisco",
        },
        Fields: sdkgo.Pointer("id,updated_at"),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.GetListsResponse != nil {
        for {
            // handle items

            res, err = res.Next()

            if err != nil {
                // handle error
            }

            if res == nil {
                break
            }
        }
    }
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "hubspot",
  "resource": "lists",
  "operation": "all",
  "data": [
    {
      "id": "12345",
      "name": "Newsletter Subscribers",
      "description": "Contacts who opted in to the monthly newsletter.",
      "type": "dynamic",
      "visibility": "shared",
      "owner_id": "12345",
      "filter_criteria": {
        "type": "and",
        "queries": [
          {
            "type": "object_type",
            "object_type": "contact"
          }
        ]
      },
      "record_count": 42,
      "folder_id": "12345",
      "object_type": "contacts",
      "is_dynamic": true,
      "is_favorite": false,
      "is_default": false,
      "is_system": false,
      "custom_fields": [
        {
          "id": "2389328923893298",
          "name": "employee_level",
          "description": "Employee Level",
          "value": "Uses Salesforce and Marketo"
        }
      ],
      "tags": [
        "New"
      ],
      "updated_by": "12345",
      "created_by": "12345",
      "updated_at": "2020-09-30T07:43:32.000Z",
      "created_at": "2020-09-30T07:43:32.000Z"
    }
  ],
  "_raw": {},
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    },
    "total_count": 1,
    "warnings": [
      {
        "type": "downstream_request_failed",
        "status_code": 429,
        "error": "string",
        "operation": "getManager",
        "message": "string"
      }
    ]
  },
  "links": {
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"
  }
}

Get list

get
https://unify.apideck.com/crm/lists/{id}

Get list

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

fieldsstring or null

The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.

Responses

200List
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

ActiveCampaign
ActiveCampaign
Attio
Attio
Close
Close
HubSpot
HubSpot
Salesforce
Salesforce
Act
Act
Request
Blackbaud
Blackbaud
Request
Copper
Copper
Request
Flexmail
Flexmail
Request
Folk
Folk
Request
Freshworks CRM
Freshworks CRM
Request
Google Contacts
Google Contacts
Request
Holded
Holded
Request
Microsoft Dynamics CRM
Microsoft Dynamics CRM
Request
Microsoft Outlook
Microsoft Outlook
Request
Odoo
Odoo
Request
Pipedrive
Pipedrive
Request
Planhat
Planhat
Request
Salesflare
Salesflare
Request
Teamleader
Teamleader
Request
Zendesk Sell
Zendesk Sell
Request
Zoho CRM
Zoho CRM
Request

Request example

package main

import(
	"context"
	"os"
	sdkgo "github.com/apideck-libraries/sdk-go"
	"github.com/apideck-libraries/sdk-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := sdkgo.New(
        sdkgo.WithConsumerID("test-consumer"),
        sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
        sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
    )

    res, err := s.Crm.Lists.Get(ctx, operations.CrmListsOneRequest{
        ID: "<id>",
        ServiceID: sdkgo.Pointer("salesforce"),
        Fields: sdkgo.Pointer("id,updated_at"),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.GetListResponse != nil {
        // handle response
    }
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "hubspot",
  "resource": "lists",
  "operation": "one",
  "data": {
    "id": "12345",
    "name": "Newsletter Subscribers",
    "description": "Contacts who opted in to the monthly newsletter.",
    "type": "dynamic",
    "visibility": "shared",
    "owner_id": "12345",
    "filter_criteria": {
      "type": "and",
      "queries": [
        {
          "type": "object_type",
          "object_type": "contact"
        }
      ]
    },
    "record_count": 42,
    "folder_id": "12345",
    "object_type": "contacts",
    "is_dynamic": true,
    "is_favorite": false,
    "is_default": false,
    "is_system": false,
    "custom_fields": [
      {
        "id": "2389328923893298",
        "name": "employee_level",
        "description": "Employee Level",
        "value": "Uses Salesforce and Marketo"
      }
    ],
    "tags": [
      "New"
    ],
    "updated_by": "12345",
    "created_by": "12345",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z"
  },
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    },
    "total_count": 1,
    "warnings": [
      {
        "type": "downstream_request_failed",
        "status_code": 429,
        "error": "string",
        "operation": "getManager",
        "message": "string"
      }
    ]
  },
  "_raw": {}
}