Can I create and edit contacts using the rest api?

It seems like from the documentation that I’m not able to create or edit contacts using the rest api. Is that still true?

If not, does someone have an example of how I can interact with contacts using the rest api.

The REST implementation is the most recent offering and is in development. Infusionsoft released the functions you see in documentation and are working on additions to it at this time (which would include contacts)

1 Like

Wait, wasn’t the REST API announced a long time ago? Say Hello to our new REST API - Keap Developer Portal
When I hit v1/contacts/ I get a list of contacts which is great but when should we expect to have other capabilities? I’m struggling to tie in my SaaS platform which is based on RoR (yes, you can all laugh) where everything is REST. Moving back to XML seems like a learning curve I’d rather not climb again. Using a REST client, I’ve been able to query based on known bits like emails, names, companies, etc. When I try to POST to create a contact, I am mocked.

So then I try to use the posted documentation on creating a Task. That should work, right? According to the documentation I just have to send over a json and, viola, a new task should appear, yes?

Well, this the response I get…

HTTP/1.1 401 Unauthorized

Server: Mashery Proxy
Content-Type: text/xml
X-Mashery-Message-ID: f505a80b-536b-4804-b8b2-a4d4d4c95c2e
X-Mashery-Responder: prod-j-worker-us-west-1b-64.mashery.com
Date: Sat, 08 Apr 2017 05:23:21 GMT
X-Mashery-Error-Code: ERR_403_DEVELOPER_INACTIVE
Www-Authenticate: Bearer realm=“api.infusionsoft.com
Content-Length: 27
X-Error-Detail-Header: Account Inactive
Connection: keep-alive

And the response body includes this payload.

Developer Inactive

I’ve check Mashery, it all looks fine there.

So what is the right way to post a new object to the rest API?

1 Like

@John_Feland,

What I’ve said so far regarding REST still stands. Yes, they announced it at the end of 2015 but REST is still their newest offering and they have not added more since that time.

You’re approaching this from the “there has to be a way” frame of mind and we are programmers so I can very much understand the thinking.

It still remains, however, that they have not added a RESTful way to add contacts yet. The message, “developer inactive”, while cryptic, is a result of the service to create contacts with REST not being available yet.

I would think that for your SaaS you could use the current API for the parts that are not offered by REST to “simulate” it’s presence until Infusionsoft adds this to the REST implementation.

John,

Thanks for your note. Doing both isn’t really an option given competition for resources. Either I wait for REST, implement XML RPC or move to another vendor. The infusionsoft ruby gem hasn’t been touched in a while. In contrast, Hubspot’s gem is very active. Both are community supported but the lack of engagement says something about whether Infusionsoft, long term, is going to be Ruby friendly.

Back to beating my head against authorizations…

Cheers,

John

John,

Also, I couldn’t get Tasks to create, a function the documentation says works. Does any of the Create part of CRUD work on the REST API?

Cheers,

John

@John_Borelli I am also getting the same error when attempting to update a contact using the PHP SDK. I know that contrary to the SDK documentation (which claims that there is a REST class for Contacts service, which of course there is not), the Contacts service is accessed through the older XML-RPC endpoint, yet I’m getting the exact same error as when OP tries with the rest endpoint. Any thoughts?

Contacts are now available to be used through REST to update, add, delete and query. You are now also able to apply up to 100 tags in one API call through REST as documented here: Keap REST API

RESThooks are also available to get notified when a contact is added, removed or modified.

1 Like

In addition to pointing out that REST hooks will also notify you of tags being applied and removed, it sounds like from the wording of some questions/comments that there might (or might not) be some things unclear.

When using the PHP SDK, you do not address any endpoint. The api wrapper of the language you are using handles any XML-RPC communications. If this isn’t clear then the authentication probably is not as well. The SDK uses a single encrypted key (found within your Infusionsoft app) to authenticate. The current api and REST services use OAuth2 authentication. This is a three legged process as apposed to the SSO process with the encrypted key and the process begins with setting up a Mashery api account to get a client secret/id pair to begin the first of three steps in authentication. If you use the encrypted key on the other two it will fail as will doing the opposite. Given how things are worded here (like referring to hitting an end point using the SDK, it has the appearance of mis-understanding some of these things)

Can I call REST API’s from a service/daemon application?

The service has no user interaction

See our replies on you other thread. Accessing Contacts via REST from a service/daemon - #2 by bradb