How can we create a reporter with api.

I found out how wa can post a request or to create a ticket but somehow I can't figure out how to create a new reporter.

-1
5 comments

Hi! You don't actually need to create new reporters via REST API, as they will be created automatically when the form is submitted. So if you have already found a way to submit a ticket and define an email via API, that will do—the new reporter account with that email will be generated for that ticket automatically.

0

I understand but I'm not using the form, I created my own form. have everything working only need to create a reporter or add a reporter later on in project but I have not seen any input that we can change te reporter.

0

If we are talking about a helpdesk project, the ticket is shared only between the reporter and the team. So you won't be able to change ownership of that ticket later to the user that you create independently. You'll be able to add them to the CC list in the ticket, though. With that said, you can refer to Create New User for more details on user creation via REST API.

0

Thank you for clarifying Stanislav Dubin,

Yes I have tried to use https://www.jetbrains.com/help/youtrack/devportal/HUB-REST-API_Users_Create-New-User.html#RequestBody but some how I could not get this working can you push me in the right direction.

I only need the base lines in JSON to send it to youtrack.

The explaining of is perfect but somehow I get create a user working.
https://www.jetbrains.com/help/youtrack/devportal/api-howto-create-issue.html
 

0

Nick - secforhire here is a sample request body sent to the /hub/api/rest/users endpoint that should create a reporter-type account in YouTrack:

{
    "login": "reporter-created-via-API",
    "userType": {
                "id": "REPORTER"
            }
}
0

Please sign in to leave a comment.