Create Task and assign to Contact

I am developing a Wordpress plugin for Handling support requests.
To handle the requests i want to create a task to the contact which i will have Firstname Lastname and Email and optional the Phone number as well.
After trying to develop my own OAuth algorithm which always failed with a “wrong redirect uri” error which i could not get rid of what ever i did, i decided to use the official sdk from github which did not have the same problem.
Now i want to create a Task and assign it to a certain contact but jet i only managed to create a task without a contact.
The Api doc isn’t much help because it only says as far as i understand there shuld be a array in the parameters called contact which shuld contain Firstname/Lastname and/or Email or ID but if i create a nested array and insert it to the $infusionsoft->tasks()->create() i get a internal server errror 500 …
Without the contact the task is created, so my question is:
How to use this endpoint (with or without sdk, curl isnt the problem) or isnt that functionality available yet.

Good morning!

The REST API has a method for creating Task objects, wherein you can supply a Contact ID to apply it to that contact. The interactive docs should show what to expect when calling it.

1 Like