APIs & Integrations

SLotti
Member

Api access to a sandbox account

SOLVE

Hi,

 

I created a sandbox account to create an integration from my companies system to send data to our hubspot account.  I also created a private app to get a token.

However I have not been able to send a request to the sandbox, as it talks to the production endpoint.

 

Is there a sandbox api endpoint?  I know of: 

api.hubapi.com



What is the proper way for me to test integrating with our companies hutspot account?

 

Thank you.

 

0 Upvotes
1 Accepted solution
SLotti
Solution
Member

Api access to a sandbox account

SOLVE

Hi Jaycee,

 

Thank you, I did get the integration API to work.  I wasn't switching into the sandbox mode so the private app was going to prod.   These calls are working now, thank you for the response.

 

-Sam

 

 

 

View solution in original post

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

Api access to a sandbox account

SOLVE

Hey, @SLotti 👋 Can you clarify if you are using a Standard Sandbox (requires an Enterprise subscription) or a Developer Test Account? “Sandbox” is sometimes used differently by customers. I'll assume you meant Standard Sandbox and make a quick example:

  • In my production portal I have a Sandbox already set up (I didn't sync any data so it's essentially empty)
    CleanShot 2025-02-04 at 09.06.54@2x.png
  • I'll go to Sandbox and create a new Private app (you can give it a unique name and verify it is not populated in your production portal)
    CleanShot 2025-02-04 at 09.09.30@2x.png
  • Used the Contacts API to create a test contact
    POST https://api.hubapi.com/crm/v3/objects/contacts​
    {
      "properties": {
        "email": "bobbby@bobsburgers.com",
        "firstname": "Bob",
        "lastname": "Belcher"
        
      }
    }

    Response

    {
        "id": "96862778549",
        "properties": {
            "createdate": "2025-02-04T15:59:03.624Z",
            "email": "bobbby@bobsburgers.com",
            "firstname": "Bob",
            "hs_all_contact_vids": "96862778549",
            "hs_associated_target_accounts": "0",
            "hs_currently_enrolled_in_prospecting_agent": "false",
            "hs_email_domain": "bobsburgers.com",
            "hs_is_contact": "true",
            "hs_is_unworked": "true",
            "hs_lifecyclestage_lead_date": "2025-02-04T15:59:03.624Z",
            "hs_marketable_status": "false",
            "hs_marketable_until_renewal": "false",
            "hs_membership_has_accessed_private_content": "0",
            "hs_object_id": "96862778549",
            "hs_object_source": "INTEGRATION",
            "hs_object_source_id": "7765118",
            "hs_object_source_label": "INTEGRATION",
            "hs_pipeline": "contacts-lifecycle-pipeline",
            "hs_prospecting_agent_actively_enrolled_count": "0",
            "hs_registered_member": "0",
            "hs_sequences_actively_enrolled_count": "0",
            "lastmodifieddate": "2025-02-04T15:59:03.624Z",
            "lastname": "Belcher",
            "lifecyclestage": "lead"
        },
        "createdAt": "2025-02-04T15:59:03.624Z",
        "updatedAt": "2025-02-04T15:59:03.624Z",
        "archived": false
    }
  • Verified it only populated the new contact in my Standard Sandbox
    SB
    CleanShot 2025-02-04 at 09.02.01@2x.png
    Production 
    CleanShot 2025-02-04 at 09.00.23@2x.png

If you are developing an app or integration, I'd recommend using an App Developer Account and testing with a Developer Test Account versus using a Standard Sandbox. You can create a Private App and test using dummy data. And then once you are set up, you can try swapping out the Private App key for your sandbox or production accounts to see how it works there. 

 

Best,

Jaycee


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes
SLotti
Solution
Member

Api access to a sandbox account

SOLVE

Hi Jaycee,

 

Thank you, I did get the integration API to work.  I wasn't switching into the sandbox mode so the private app was going to prod.   These calls are working now, thank you for the response.

 

-Sam

 

 

 

0 Upvotes