Can't create ticket in RT

.I’m currently using RT 4.4.4 in a project and i’m trying to create a new ticket from postman by creating a variable named “content” which is including the ticket details and post it on “” this api. But the ticket is not created. It returns a “200 Ok” and # Objects of type ticket must be specified by numeric id.

Can you please help me to fix this problem

According to REST1 doc, the endpoint should be /REST/1.0/ticket/new, not /REST/1.0/ticket/create

Thank you for your response. I used create instead of new but still the same issue is occuring. Actually i am passing my ticket details inside a variable named content in the following format
id 775
Queue 1
Subject testupdate
Owner 6
Status new
using this api{{content}}
still the ticket is not creating .

To create a ticket you should use ticket/new endpoint. Maybe this curl example will help:
curl --location --request GET 'https://MY-RT-HOST/REST/1.0/ticket/new?content=id:%20ticket/new%0AQueue:%20support%0ASubject:%20Hello%20from%20REST1!%0AText:%20This%20is%20first%20message%20in%20the%20ticket'
Notice the endpoint (ticket/new) and id: ticket/new in content. In case of the query above I got the following response:

RT/4.4.4 200 Ok

# Ticket 359956 created.

The request may be either GET or POST, I think it depends on whether you want to attach any files to ticket.

Your content has a ticket ID. Are you trying to create a new ticket or update an existing one?

Actually i am trying to create a new one

then your ID should be ticket/new as Malorin has pointed out

But when i gave id = ticket/new the response which comes in postman is like the following

RT/4.4.4 200 Ok

Ticket create=ticket does not exist.

That is because you also need to use the endpoint REST/1.0/ticket/new, as I’ve written in the first response. So, basically, the url should be something like YOUR-RT/REST/1.0/ticket/new and there should be id: ticket/new in content GET param.

Are you using the /REST/1.0/ticket/new endpoint (again as Malorin pointed out)? If so what happens if you attempt a curl similar to the example above?


i used this endpoint with id : ticket/new in content GET param

and the response still is

Ticket new=ticket does not exist.

Try this:

I didn’t try with curl till now. i have to try it.

I used the endpoint as you mentioned but still it’s not working .it showing like the following

Can’t use an undefined value as an ARRAY reference at /opt/rt4/share/html/REST/1.0/dhandler line 189.

I am guessing if you’re using a tool like Postman you need to set the body type to x-www-form-urlencoded.

There is a extension for REST2 that was cored in RT5, it has some documentation provided by BPS:

Using REST1 in Postman this works for me ( See attached )

it’s working correctly and the ticket created . Thank you So much.