Back

Close API Essential Guide

Aug 11, 20246 minute read

What type of API does Close provide?

Based on the search results provided, Close does not appear to have a specific API type mentioned. The search results discuss different API types in general, but do not contain information about Close's API specifically.

To accurately answer what type of API Close has, we would need to look at Close's official API documentation or other authoritative sources about their API. Without that information, I cannot definitively state what type of API Close uses.

The most common API types discussed in the search results are:

REST API

  • Uses HTTP methods and follows REST architectural principles
  • Resource-based with unique URIs for each resource
  • Stateless and cacheable
  • Widely used for web and mobile applications

SOAP API

  • Uses XML for message format
  • Can work over multiple protocols like HTTP, SMTP, etc.
  • More rigid and complex than REST
  • Good for enterprise applications requiring high security

GraphQL API

  • Query language for APIs
  • Single endpoint with flexible queries
  • Allows clients to request exactly the data they need
  • Gaining popularity for modern web/mobile apps

gRPC API

  • Uses Protocol Buffers for serialization
  • Designed for high-performance microservices
  • Supports streaming

Without specific information about Close's API, I cannot determine which of these or other API types they use. To get an accurate answer, you would need to check Close's official API documentation or contact them directly.

Does the Close API have webhooks?

Webhooks in the Close API

Yes, the official Close API does have webhooks. Close provides a webhook system that allows you to subscribe to various events and receive real-time notifications when those events occur.

Types of Events You Can Subscribe To

The Close API allows you to subscribe to a variety of events. You can subscribe to events based on object types and actions.

Key Points to Consider

  1. Event Types: The subscription event object_type and action values are the same as in the event log, suggesting that you can subscribe to various object types (like leads, opportunities, contacts) and actions (like created, updated, deleted).

  2. Webhook Filters: You can use Webhook Filters while creating your subscription to ensure that an event only fires to a webhook when certain conditions are met.

  3. Webhook Delivery: For 'updated' or 'deleted' actions, the webhook will be called after a consolidation delay, meaning there might be a short delay between when an event occurs and when the webhook is triggered.

  4. Retry Mechanism: Failed deliveries are retried with an exponentially increasing interval up to every 20 minutes, for up to 72 hours before being dropped.

  5. Subscription Management: The API provides endpoints to create new webhook subscriptions, list existing subscriptions, and manage them.

  6. Webhook Signatures: Close provides a signature mechanism to verify the authenticity of webhook payloads.

Best Practices

  1. Process webhook events asynchronously by queuing them locally before processing the payload. This ensures that Close can always deliver the event and prevents subscriptions from being paused due to reaching the max queue length.

  2. Be aware that event ordering is not guaranteed due to factors like event consolidation and delivery parallelism/retries.

  3. Monitor your webhook subscriptions, as they can be automatically paused if the event queue reaches 100,000 backlogged events or if all event deliveries fail for 3 days.

Rate Limits and other limitations

Here are the key points about the API rate limits for the Close API:

General Rate Limiting Approach

  • Close enforces API call rate limits to protect their infrastructure and keep the service stable for all users [1].

  • Rate limits are enforced per endpoint group, allowing more granular control over different types of requests [1].

  • API requests are limited at both the organization level and individual API key level [1].

Specific Rate Limits

  • The per-organization limit is currently 3 times higher than individual API key rate limits [1].

  • For example, if the API key rate limit is 20 requests per second (RPS), the organization-wide limit would be 60 RPS for that same endpoint group [1].

Rate Limit Headers

  • Most API responses include a RateLimit header with limit, remaining, and reset values [1].

  • The header format is: RateLimit: limit=100, remaining=50, reset=5 [1].

Handling Rate Limits

  • If you receive a 429 (Too Many Requests) response, pause for the number of seconds specified by the rate_reset value before making additional requests [1].

  • Each 429 response includes the RateLimit header and a retry-after header [1].

Best Practices

  • Code your integration to handle 429 responses and respect the rate limits [1].

  • Use the rate_reset value for a more accurate wait time rather than the retry-after header [1].

  • Monitor your usage and adjust your request patterns if needed to stay within the limits.

Additional Notes

  • Some endpoints may have stricter, unpredictable rate limits that can trigger a 429 even within the normal enforcement window [1].

  • Close recommends using the token bucket algorithm for rate limiting, which allows for bursting and varying time windows [2].

It's important to note that the specific numerical limits (e.g., requests per second) are not provided in the given search results. For the most up-to-date and precise rate limit values, you should refer to the official Close API documentation or contact their support team.

Latest API Version

Based on the search results provided, here are the key points regarding the most recent version of the Close API:

Current API Version

The most recent version of the Close API is v1. This can be seen from the base URL mentioned in the changelog:

https://api.close.com/api/v1/

Key Points to Consider

  1. The base URL was updated on February 22, 2019, from https://app.close.io/api/v1/ to https://api.close.com/api/v1/.

  2. While the API version remains v1, Close regularly updates and adds new features to the API. Some recent updates include:

    • Commenting API (March 28th, 2024)
    • Files API for email attachments (February 26th, 2024)
    • Custom Objects API (BETA) (February 21st, 2024)
    • Changes to the rate limit documentation (April 24, 2024)
  3. Close uses industry-standard REST conventions for their API, providing predictable URL structures and standardized response codes.

  4. The API allows for various integrations and custom workflows, including creating custom dashboards, triggering real-time workflows, and building custom admin panels.

Best Practices

  1. Always refer to the official API documentation at developer.close.com for the most up-to-date information on endpoints and features.

  2. Use the API changelog to stay informed about recent changes and additions to the API.

  3. When working with the API, consider using one of the available API clients for various programming languages to simplify integration.

  4. Be aware of rate limits and follow best practices for efficient API usage.

  5. Utilize webhooks for real-time event tracking and to power custom workflows.

In conclusion, while the Close API version remains at v1, it is continuously updated with new features and improvements. Developers should regularly check the API changelog and documentation to stay informed about the latest changes and capabilities.

How to get a Close developer account and API Keys?

Here's how to get a developer account for Close to create an API integration:

Key Steps

  1. Sign up for a Close account if you don't already have one.

  2. Go to Settings > Developer > API Keys in your Close account.

  3. Click "+ New API Key" to generate a new API key.

  4. Give your API key an informative name so you can identify what it's used for.

  5. Copy and securely store the newly generated API key. It will only be displayed once.

Important Considerations

  • API keys provide full access to your Close account, so keep them secure.

  • Don't confuse the API key with the API key ID. The full API key is secret, while the ID is safe to share.

  • Close offers two main ways to authorize integrations:

    1. API keys
    2. OAuth
  • OAuth allows third-party apps to request access to your Close data without handling API keys directly.

  • For your own internal integrations, using API keys is typically simpler.

Best Practices

  • Use descriptive names for your API keys to track what each is used for.

  • Store API keys securely and never share the full key publicly.

  • Consider using OAuth for third-party integrations for better security.

  • Review the Close API documentation for details on available endpoints and authentication methods.

By following these steps, you can create a developer account and obtain API credentials to start building integrations with Close. Remember to keep your API keys secure and use OAuth when appropriate for third-party integrations.

What can you do with the Close API?

Based on the search results provided, here is a list of data models that can be interacted with using the Close API, along with key points about what is possible for each:

Leads

  • Create, retrieve, update, and delete lead records
  • Associate contacts, opportunities, and activities with leads
  • Apply custom fields to leads
  • Change lead statuses

Contacts

  • Create, retrieve, update, and delete contact records
  • Associate contacts with leads
  • Apply custom fields to contacts

Activities

  • Create and retrieve various activity types:
    • Calls
    • Emails
    • Meetings
    • Notes
    • SMS
    • Tasks
  • Associate activities with leads and contacts
  • Apply custom fields to activities

Opportunities

  • Create, retrieve, update, and delete opportunity records
  • Associate opportunities with leads
  • Change opportunity statuses
  • Apply custom fields to opportunities

Tasks

  • Create, retrieve, update, and delete tasks
  • Associate tasks with leads, contacts, and opportunities
  • Mark tasks as completed

Users

  • Retrieve user information
  • Manage user roles and permissions

Organizations

  • Retrieve organization information

Lead Statuses

  • Create, retrieve, update, and delete lead status options

Opportunity Statuses

  • Create, retrieve, update, and delete opportunity status options

Pipelines

  • Manage sales pipelines

Custom Fields

  • Create, retrieve, update, and delete custom fields for leads, contacts, opportunities, and activities

Custom Activities

  • Create custom activity types
  • Create instances of custom activities

Custom Objects (BETA)

  • Create custom object types
  • Create instances of custom objects

Webhooks

  • Set up webhook subscriptions to receive notifications about data changes

Reporting

  • Access reporting data

This list covers the main data models that can be interacted with using the Close API. Each model allows for various operations and associations, enabling developers to build robust integrations with the Close platform.