Create ticket replies with 200 Ok instead of 201 Created | Community
Skip to main content

Create ticket replies with 200 Ok instead of 201 Created

  • January 25, 2022
  • 7 replies
  • 0 views

Tomas14

Per documentation POST request reply with 201 Created and specifically for `POST /api/v2/tickets` it returns the newly created ticket, for example:

Status: 201 CreatedLocation: https://{subdomain}.zendesk.com/api/v2/items/123.json
{  "item": {    "id": 123,    "url": "https://{subdomain}.zendesk.com/api/v2/items/123.json",    "name": "Wibble",    ...    "created_at": "2012-04-04T09:14:57Z"  }}

What is the possible meaning of a 200 Ok reply with body `{"success":true}`?

Reference:

7 replies

Tipene
  • January 28, 2022

Hi @tomas14,

Thanks for reaching out!

Can you provide the payload you're sending that's responding with a 200 Ok? Also, is this happening consistently or just intermittently? 

Look forward to hearing from you!

Tipene


Supernahelp

I have this same issue

 

and it happens now 100% of all requests from google appscript

 

 


Tipene
  • February 21, 2023

Hey @supernahelp,

Can you provide the same details mentioned above? Just be sure to redact any sensitive information.

Thanks!

Tipene


Benjamin33

Hello @tipene,

 

I'm sorry for waking up this topic after 1 year. We're having the issue while trying to create ticket.

When trying to send a POST request to /api/v2/tickets. I'm getting a 200 status code with return success.

 

We're using basic authentication and I'm adding a body example, I'm replacing value with placeholders:

{
  "ticket": {
      "subject": "new ticket title",
      "type": "task",
      "assignee_id": {user_id},
      "requester_id": {requester_id},
      "comment": {
          "body": "comment",
          "public": false
      },
      "custom_fields": [
          {
              "id": {custom_field_id},
              "value": "value"
          }
      ]
  }
}

Regards,

Benjamin


  • October 29, 2024
Hi Benjamin, are you still having this issue? If so, let me know and I can pull you into a ticket to get a better look.
 
 

Benjamin32
  • October 30, 2024

Hello Erica,

 

We fixed the issue on our side, we had an issue with the seller's email domain was blacklisted so Zendesk API returns a 200. Is it possible to add it as an error and not return a 200 status code?


  • November 1, 2024
Hi Benjamin, I'm glad to hear that you were able to resolve this. Unfortunately, you wouldn't be able to exactly change the error code. We provide the 201 in these instances as a passive security measure. I would suggest adding some middleware if you're looking for an alert to track this on your end.