{"openapi":"3.1.0","info":{"title":"Ticketing API","version":"1","description":"Create and read tickets for your Contacts with an API key.\n\nThe Admin gives each permission a scope (the Application settings `ticket_scopes` and `include_restricted`). `own`, the default: only the tickets the Application created. `all`: every ticket that is not deleted, also tickets of Users and of other Applications. `tickets:create` always makes your own tickets.\n\n`tickets:read` with `all` reads every ticket. `tickets:update` with `own` cancels and reopens your own tickets; with `all` it also changes the Status, Priority and Fields of every ticket you read, and adds files to them. `comments:create` with `all` adds Public Comments to every ticket you read. On a ticket you did not create, you act as the Application itself (`author.kind: application`); on your own ticket, you act for its Contact.\n\nRestricted tickets (Participants only) stay hidden from every `all` scope unless `include_restricted` is on.\n\nAn Application never sees staff data in any scope: no assignee (only `assigned`), no Team, no Internal Comments, no Ticket App names. People in the organization are `{ kind: \"support\" }`, as actors and as Requesters. Your webhook gets the Events of every ticket you can read, in the same view."},"servers":[{"url":"/"}],"security":[{"apiKey":[]}],"tags":[{"name":"Tickets","description":"The tickets of this Application's read scope: its own Contacts' tickets, or all tickets."},{"name":"Ticket Types","description":"The types this Application may use, and their Fields."},{"name":"Contacts","description":"The people an Application creates tickets for."}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key of an Application: `Authorization: Bearer gt_live_...`."}},"schemas":{"TicketCreate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"default":"","type":"string","maxLength":20000},"priority":{"default":"normal","type":"string","enum":["low","normal","high","urgent"]},"ticket_type_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"fields":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"contact":{"type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200,"description":"Your ID for this person. The same ID always gives the same Contact."},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["external_id","name","email"]}},"required":["title","ticket_type_id","contact"]},"Ticket":{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The Ticket Number. It never changes; store this one (4.9c)."},"ref":{"type":"string","description":"The Ticket Reference for display, for example PAY-1048. It changes with the Ticket Type."},"title":{"type":"string"},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["open","active","waiting","done"]}},"required":["key","name","category"],"additionalProperties":false},"ticket_type":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"prefix":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}},"required":["id","name","prefix","icon","color"],"additionalProperties":false},"requester":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"kind":{"type":"string","const":"user"}},"required":["id","name","email","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"external_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["kind","id","external_id","name","email"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"support"}},"required":["kind"],"additionalProperties":false,"description":"A person in the organization. An Application never gets their name or email."}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},{"type":"null"}],"description":"Always null for an Application. Use `assigned`."},"assigned":{"type":"boolean","description":"Whether a staff member is assigned. Their name is not shared."},"team":{"description":"The ticket's Team. Left out for an Application: staff structure is private.","type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"channel":{"type":"string","enum":["web","ai","api","app"]},"application":{"anyOf":[{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"description":{"type":"string"},"schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Field values keyed by Field Key."},"schema_fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["short_text","long_text","number","date","single_select","multi_select","checkbox","user","url","file"]},"required":{"type":"boolean"},"help":{"type":"string"},"options":{"description":"The active options of a select Field.","type":"array","items":{"type":"string"}}},"required":["key","label","type","required","help"],"additionalProperties":false}},"comment_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The comments the caller can see. An Application never sees Internal Comments."},"reopened_from":{"anyOf":[{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ref":{"type":"string"}},"required":["number","ref"],"additionalProperties":false},{"type":"null"}]},"allowed_actions":{"type":"array","items":{"type":"string","enum":["read","change_status","change_priority","assign","edit_fields","edit_description","change_type","move_team","comment","comment_internal","cancel","reopen","delete","manage_participants"]}},"restricted":{"type":"boolean","description":"A Restricted ticket (Participants only). An Application sees one only with `read: all` and `include_restricted`."}},"required":["number","ref","title","priority","status","ticket_type","requester","assignee","assigned","channel","application","created_at","updated_at","description","schema_version","fields","schema_fields","comment_count","reopened_from","allowed_actions","restricted"],"additionalProperties":false},"TicketSummary":{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The Ticket Number. It never changes; store this one (4.9c)."},"ref":{"type":"string","description":"The Ticket Reference for display, for example PAY-1048. It changes with the Ticket Type."},"title":{"type":"string"},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"status":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","enum":["open","active","waiting","done"]}},"required":["key","name","category"],"additionalProperties":false},"ticket_type":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"prefix":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}},"required":["id","name","prefix","icon","color"],"additionalProperties":false},"requester":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"kind":{"type":"string","const":"user"}},"required":["id","name","email","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contact"},"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"external_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["kind","id","external_id","name","email"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"support"}},"required":["kind"],"additionalProperties":false,"description":"A person in the organization. An Application never gets their name or email."}]},"assignee":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},{"type":"null"}],"description":"Always null for an Application. Use `assigned`."},"assigned":{"type":"boolean","description":"Whether a staff member is assigned. Their name is not shared."},"team":{"description":"The ticket's Team. Left out for an Application: staff structure is private.","type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"channel":{"type":"string","enum":["web","ai","api","app"]},"application":{"anyOf":[{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["number","ref","title","priority","status","ticket_type","requester","assignee","assigned","channel","application","created_at","updated_at"],"additionalProperties":false},"TicketType":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send this as `ticket_type_id`."},"name":{"type":"string"},"description":{"type":"string","description":"When to use this type."},"icon":{"type":"string"},"color":{"type":"string"},"prefix":{"type":"string"},"team":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"visibility":{"type":"string","enum":["requester","internal","participants"],"description":"Who sees its tickets. An Application never gets a `participants` type."}},"required":["id","name","description","icon","color","prefix","team","visibility"],"additionalProperties":false},"TicketTypeWithFields":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Send this as `ticket_type_id`."},"name":{"type":"string"},"description":{"type":"string","description":"When to use this type."},"icon":{"type":"string"},"color":{"type":"string"},"prefix":{"type":"string"},"team":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"visibility":{"type":"string","enum":["requester","internal","participants"],"description":"Who sees its tickets. An Application never gets a `participants` type."},"schema_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The Field Key. Use it in `fields` of a new ticket."},"label":{"type":"string"},"type":{"type":"string","enum":["short_text","long_text","number","date","single_select","multi_select","checkbox","user","url","file"]},"required":{"type":"boolean"},"help":{"type":"string"},"options":{"type":"array","items":{"type":"string"}}},"required":["key","label","type","required","help"],"additionalProperties":false}}},"required":["id","name","description","icon","color","prefix","team","visibility","schema_version","fields"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable, for code: for example NOT_FOUND, FORBIDDEN, VALIDATION_FAILED, IDEMPOTENCY_KEY_REUSED."},"message":{"type":"string","description":"For people."},"details":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"reason":{"type":"string"},"options":{"type":"array","items":{"type":"string"}}},"required":["key","label","reason"],"additionalProperties":false}},{"type":"null"}],"description":"For VALIDATION_FAILED: one entry for each problem."}},"required":["code","message","details"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"paths":{"/api/v1/tickets":{"post":{"operationId":"createTicket","tags":["Tickets"],"summary":"Create a ticket for a Contact","description":"Needs `tickets:create`, and the Ticket Type must be in the allowed list. `fields` are checked against the Fields of the type (GET /api/v1/ticket-types/{id}). The Contact is found by `external_id` and gets the name and email sent.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"example":"order-5521","description":"A repeat with the same key in 24 hours returns the first ticket, with the header `Idempotent-Replayed: true`, and creates nothing. The same key with another body answers 409."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"},"example":{"ticket_type_id":3,"title":"Charged twice for order 5521","description":"I see two charges of 49.00 on my card.","priority":"high","fields":{"order_id":"5521","amount":"49.00"},"contact":{"external_id":"cus_19ab","name":"Jo Park","email":"jo@example.org"}}}}},"responses":{"201":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"},"example":{"number":1048,"ref":"PAY-1048","title":"Charged twice for order 5521","priority":"high","status":{"key":"open","name":"Open","category":"open"},"ticket_type":{"id":3,"name":"Payment issue","prefix":"PAY","icon":"i-lucide-credit-card","color":"#A14B00"},"requester":{"kind":"contact","id":77,"external_id":"cus_19ab","name":"Jo Park","email":"jo@example.org"},"assignee":null,"assigned":false,"channel":"api","application":{"id":1,"name":"Checkout site"},"created_at":"2026-10-18T09:12:44.000Z","updated_at":"2026-10-18T09:12:44.000Z","description":"I see two charges of 49.00 on my card.","schema_version":2,"fields":{"order_id":"5521","amount":"49.00"},"schema_fields":[{"key":"order_id","label":"Order ID","type":"short_text","required":true,"help":"The number on the receipt."},{"key":"amount","label":"Amount","type":"short_text","required":false,"help":""}],"comment_count":0,"reopened_from":null,"allowed_actions":["comment"],"restricted":false}}}},"400":{"description":"The body is not JSON, or the Idempotency-Key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is missing, unknown, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"The API key is not valid. It may be revoked. Send it as \"Authorization: Bearer gt_live_...\".","details":null}}}}},"403":{"description":"The Application is disabled, has no `tickets:create`, or may not use this Ticket Type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency-Key was used with another body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"IDEMPOTENCY_KEY_REUSED","message":"This Idempotency-Key was used with another request body in the last 24 hours. Use a new key for a new ticket.","details":null}}}}},"422":{"description":"The body has invalid values. `details` lists each problem.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"VALIDATION_FAILED","message":"The request has invalid values.","details":[{"key":"order_id","label":"Order ID","reason":"Required."}]}}}}},"429":{"description":"Too many requests in this minute. Wait the seconds in `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"Too many requests. Try again in 12 seconds.","details":null}}}}}}},"get":{"operationId":"listTickets","tags":["Tickets"],"summary":"List the tickets this Application can read","description":"Needs `tickets:read`. The tickets of its read scope: its own, or all. One page of tickets, in Status order: 50 by default, at most 200 with `limit`. To get all tickets, call again with `cursor` set to `next_cursor` until it is null.","parameters":[{"name":"requester","in":"query","required":false,"schema":{"type":"string","enum":["me"]},"description":"`me`: only the tickets this Application created."},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Words that must all be in the title or description, or a Ticket Reference."},{"name":"type","in":"query","required":false,"schema":{"type":"integer"},"description":"Only this Ticket Type ID."},{"name":"priority","in":"query","required":false,"schema":{"type":"string","enum":["low","normal","high","urgent"]}},{"name":"field","in":"query","required":false,"schema":{"type":"string"},"description":"A Field value, as `key:value`, for example `order_id:5521`. Repeat for more Fields."},{"name":"open","in":"query","required":false,"schema":{"type":"string","enum":["true"]},"description":"Only tickets that are not done."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `next_cursor` of the page before."}],"responses":{"200":{"description":"The tickets, and the number for each Status.","content":{"application/json":{"schema":{"type":"object","required":["data","counts","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TicketSummary"}},"counts":{"type":"object","additionalProperties":{"type":"integer"},"description":"The number of tickets for each Status key, for all pages."},"next_cursor":{"type":["string","null"],"description":"Send it as `cursor` for the next page. Null on the last page."}}},"example":{"data":[{"number":1048,"ref":"PAY-1048","title":"Charged twice for order 5521","priority":"high","status":{"key":"open","name":"Open","category":"open"},"ticket_type":{"id":3,"name":"Payment issue","prefix":"PAY","icon":"i-lucide-credit-card","color":"#A14B00"},"requester":{"kind":"contact","id":77,"external_id":"cus_19ab","name":"Jo Park","email":"jo@example.org"},"assignee":null,"assigned":false,"channel":"api","application":{"id":1,"name":"Checkout site"},"created_at":"2026-10-18T09:12:44.000Z","updated_at":"2026-10-18T09:12:44.000Z"}],"counts":{"open":1},"next_cursor":null}}}},"401":{"description":"The API key is missing, unknown, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"The API key is not valid. It may be revoked. Send it as \"Authorization: Bearer gt_live_...\".","details":null}}}}},"403":{"description":"The Application is disabled or has no `tickets:read`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests in this minute. Wait the seconds in `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"Too many requests. Try again in 12 seconds.","details":null}}}}}}}},"/api/v1/tickets/{ref}":{"get":{"operationId":"getTicket","tags":["Tickets"],"summary":"Get one ticket","description":"Needs `tickets:read`. A ticket outside the read scope answers 404, the same as one that does not exist.","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string"},"example":"PAY-1048","description":"The Ticket Number, or a Ticket Reference such as PAY-1048."}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"},"example":{"number":1048,"ref":"PAY-1048","title":"Charged twice for order 5521","priority":"high","status":{"key":"open","name":"Open","category":"open"},"ticket_type":{"id":3,"name":"Payment issue","prefix":"PAY","icon":"i-lucide-credit-card","color":"#A14B00"},"requester":{"kind":"contact","id":77,"external_id":"cus_19ab","name":"Jo Park","email":"jo@example.org"},"assignee":null,"assigned":false,"channel":"api","application":{"id":1,"name":"Checkout site"},"created_at":"2026-10-18T09:12:44.000Z","updated_at":"2026-10-18T09:12:44.000Z","description":"I see two charges of 49.00 on my card.","schema_version":2,"fields":{"order_id":"5521","amount":"49.00"},"schema_fields":[{"key":"order_id","label":"Order ID","type":"short_text","required":true,"help":"The number on the receipt."},{"key":"amount","label":"Amount","type":"short_text","required":false,"help":""}],"comment_count":0,"reopened_from":null,"allowed_actions":["comment"],"restricted":false}}}},"401":{"description":"The API key is missing, unknown, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"The API key is not valid. It may be revoked. Send it as \"Authorization: Bearer gt_live_...\".","details":null}}}}},"403":{"description":"The Application is disabled or has no `tickets:read`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No ticket that this Application can read has this reference.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"NOT_FOUND","message":"No ticket with this reference.","details":null}}}}},"429":{"description":"Too many requests in this minute. Wait the seconds in `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"Too many requests. Try again in 12 seconds.","details":null}}}}}}}},"/api/v1/ticket-types":{"get":{"operationId":"listTicketTypes","tags":["Ticket Types"],"summary":"List the Ticket Types this Application may use","responses":{"200":{"description":"The allowed types.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TicketType"}}}},"example":{"data":[{"id":3,"name":"Payment issue","description":"A charge, refund or invoice is wrong.","icon":"i-lucide-credit-card","color":"#A14B00","prefix":"PAY","team":{"id":2,"name":"Billing"},"visibility":"requester"}]}}}},"401":{"description":"The API key is missing, unknown, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"The API key is not valid. It may be revoked. Send it as \"Authorization: Bearer gt_live_...\".","details":null}}}}},"403":{"description":"The Application is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"APPLICATION_DISABLED","message":"This Application is disabled. An Admin can enable it again.","details":null}}}}},"429":{"description":"Too many requests in this minute. Wait the seconds in `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"Too many requests. Try again in 12 seconds.","details":null}}}}}}}},"/api/v1/ticket-types/{id}":{"get":{"operationId":"getTicketType","tags":["Ticket Types"],"summary":"Get a Ticket Type and its Fields","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"example":3}],"responses":{"200":{"description":"The type and the Fields of its newest Schema Version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketTypeWithFields"},"example":{"id":3,"name":"Payment issue","description":"A charge, refund or invoice is wrong.","icon":"i-lucide-credit-card","color":"#A14B00","prefix":"PAY","team":{"id":2,"name":"Billing"},"visibility":"requester","schema_version":2,"fields":[{"key":"order_id","label":"Order ID","type":"short_text","required":true,"help":"The number on the receipt."},{"key":"amount","label":"Amount","type":"short_text","required":false,"help":""}]}}}},"401":{"description":"The API key is missing, unknown, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"The API key is not valid. It may be revoked. Send it as \"Authorization: Bearer gt_live_...\".","details":null}}}}},"403":{"description":"The Application is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"APPLICATION_DISABLED","message":"This Application is disabled. An Admin can enable it again.","details":null}}}}},"404":{"description":"No allowed Ticket Type has this ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests in this minute. Wait the seconds in `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"Too many requests. Try again in 12 seconds.","details":null}}}}}}}},"/api/v1/contacts/{id}":{"delete":{"operationId":"eraseContact","tags":["Contacts"],"summary":"Erase a Contact","description":"Erasure: the name, email and external ID become `[erased]`; the title, description, Field values, comments and files of the Contact's tickets are removed. The tickets stay with their numbers and Statuses. Only for Contacts of this Application. A repeat answers 204 too and finishes an Erasure that failed half way. The Contact id is `requester.id` of its tickets.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"example":77}],"responses":{"204":{"description":"The Contact is erased."},"401":{"description":"The API key is missing, unknown, or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"UNAUTHENTICATED","message":"The API key is not valid. It may be revoked. Send it as \"Authorization: Bearer gt_live_...\".","details":null}}}}},"403":{"description":"The Application is disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No Contact of this Application has this ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests in this minute. Wait the seconds in `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"RATE_LIMITED","message":"Too many requests. Try again in 12 seconds.","details":null}}}}}}}}}}