APIs & Integrations

dmydlarz
Participant

Add new record + Search API - why delay?

SOLVE

Hello!

I've been playing with Hubspot via REST API.

 

What I discovered is that between adding a record (let's say a contact) to my account via POST request, it's not immediately returned by the Search API.

 

Most of the time it takes up to 5-10 seconds, for the record to be returned from the Search request.

Is that expected behavior?

Or is it something we can improve?

Here are the requests I'm making

Create Record:

 

curl 'https://api.hubapi.com/crm/v3/objects/contacts' \
--data-raw '{
  "properties": {
    "email": "john@example.com",
    "firstname": "John",
    "lastname": "Doe"
  }
}'

 


Search records:

 

curl 'https://api.hubapi.com/crm/v3/objects/contacts/search' \
--data '{
    "limit": 100
}'

 


PS. It's not a problem of paging, as I'm literally having only few objects in my account.

Anynone can relate to this problem?

0 Upvotes
1 Accepted solution
Jaycee_Lewis
Solution
Community Manager
Community Manager

Add new record + Search API - why delay?

SOLVE

Hey, @dmydlarz 👋 Thanks for your question. To confirm, this is the expected behaviour when using the Search API and newly created records. The documentation doesn't provide details of the underlying “why”. It states — “It may take a few moments for newly created or updated CRM objects to appear in search results.” — Search API Limitations 

 

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

View solution in original post

1 Reply 1
Jaycee_Lewis
Solution
Community Manager
Community Manager

Add new record + Search API - why delay?

SOLVE

Hey, @dmydlarz 👋 Thanks for your question. To confirm, this is the expected behaviour when using the Search API and newly created records. The documentation doesn't provide details of the underlying “why”. It states — “It may take a few moments for newly created or updated CRM objects to appear in search results.” — Search API Limitations 

 

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot