How to set "source":{"from":{"address":"","name":""},"to":{"name":"","address":""} using a HTML form

Answered

1 Comments

  • Official comment
    Amy Dee
    Comment actions Permalink

    Hi Enrique! You can set the requester's name and email with the "Requester" parameter. We have an example in the "Creating a ticket with a new requester" section of our Creating and updating tickets guide. That guide also has a section for setting custom ticket fields.

    The payload in your screenshot should look something like this:

    {
      "ticket": {
        "priority": "high",
        "subject":   "test",
        "group_id": 360001776011,
        "tags": ["mexico"],
        "comment":   { "body": "test" },
        "requester": { "name": "test", "email": "atenciononline.mx@example.com" },
        "custom_fields": [{"id": 1234, "value": "Mexico"}]
      }
    }
    

    There are a few other changes here, besides using "requester" instead of "source": the group_id is a number without quotes around it, tags are listed in square brackets, the description is a comment body, and the "Market" field is in a custom_fields array. This should get you closer to the results you describe.

    I hope this helps!

Please sign in to leave a comment.

Powered by Zendesk