CF7 API Endpoint
-
I am trying to setup a contact form to capture certain parameters (name, email, survey_type) and post to an external url format JSON using an api token, to our supplier https://www.domain.com/api/{PATH}/participants.
But I have no idea how and if this can be done as the API document is very limited.
Example JSON payload { "participant": { "name": "Joe Bloggs", "email": "[email protected]", "survey_type": "V1::SamSurvey", "optional_keys": ["financial_reporting"] } } Example successful response HTTP/1.1 201 Created { "id": 5000, "name": "Joe Bloggs", "email": "[email protected]", "created_at": "2015-10-22T12:51:50.149Z", "updated_at": "2015-10-22T12:51:50.149Z" } Example unsuccessful response HTTP/1.1 422 Unprocessable Entity { "errors": { "name": ["can't be blank"], "email": ["can't be blank"], "survey_type": ["can't be blank"] } }
- The topic ‘CF7 API Endpoint’ is closed to new replies.