We're revising how the form data will need to be submitted to the CRM from this original ticket: https://phabricator.wikimedia.org/T292133
Currently we're sending a POST to /developer_api/v1/people but that's changing to Leads. Due to that we need to format the request object a little bit and change the method.
PUT URL: (note: method is not POST anymore)
@see: https://developer.copper.com/leads/upsert-a-lead.html
PUT https://api.copper.com/developer_api/v1/leads/upsert
POST HEADERS: (note: nothing changes here from OP)
POST BODY:
For reference here I used double-brackets to represent variable data and left the static info as is.
{{form_input_*** and {{form_textarea_*** are content submitted via the form.
{{siteurl_path_form_is_on}} is the URL path where the form was filled out on. Everything else is static and just copy/pasta.
{ "properties": { "name": "{{form_input_name}}", "assignee_id": 912228, "company_name": "{{form_input_company_name}}", "email": { "email": "{{form_input_email}}", "category": "work" }, "custom_fields": [ { "custom_field_definition_id": 505797, "value": "{{form_textarea_usecase}}" }, { "custom_field_definition_id": 505798, "value": "{{siteurl_path_form_is_on}}" } ] }, "match": { "field_name": "email", "field_value": "{{form_input_email}}" } }