> For the complete documentation index, see [llms.txt](https://docs.wrangle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wrangle.io/integrations/wrangle-api/wrangle-api-documentation.md).

# Wrangle API Documentation

## GET /inboxes

> Get Inboxes

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Response_GetInboxes":{"type":"object","required":["success","inboxes"],"properties":{"success":{"type":"string","enum":["true"]},"inboxes":{"type":"array","items":{"$ref":"#/components/schemas/Inbox"}}}},"Inbox":{"type":"object","properties":{"createdAt":{"type":"string"},"creatorId":{"type":"string"},"id":{"type":"string","format":"uuid"},"formFields":{"$ref":"#/components/schemas/FormFields"},"name":{"type":"string"},"description":{"type":"string"},"defaultUserRole":{"type":"string","enum":["REQUESTER","NO_ACCESS","OBSERVER"]},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"tags":{"type":"array","items":{"type":"string"}},"userRoles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["NO_ACCESS","REQUESTER","OBSERVER","AGENT","ADMIN"]},"userId":{"type":"string"}}}},"updatedAt":{"type":"string"}}},"FormFields":{"type":"object","required":["fieldId","fieldLabel","isRequired","fieldType"],"properties":{"fieldId":{"type":"string"},"fieldLabel":{"type":"string"},"isRequired":{"type":"boolean"},"fieldType":{"type":"string","enum":["Date Picker","File Input","List Input","Multiline","Multiple List Inputs","Multiple Slack Users","Number","Plain Text Input","Slack Channel","Slack User"]},"fieldOptions":{"type":"array","description":"For List Inputs, these are the options available to the user.","items":{"type":"string"}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/inboxes":{"get":{"summary":"Get Inboxes","operationId":"getInboxes","responses":{"200":{"description":"Get Inboxes Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_GetInboxes"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get Inbox

> Get an inbox by id.

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Response_GetInbox":{"type":"object","required":["success","inbox"],"properties":{"success":{"type":"string","enum":["true"]},"inbox":{"$ref":"#/components/schemas/Inbox"}}},"Inbox":{"type":"object","properties":{"createdAt":{"type":"string"},"creatorId":{"type":"string"},"id":{"type":"string","format":"uuid"},"formFields":{"$ref":"#/components/schemas/FormFields"},"name":{"type":"string"},"description":{"type":"string"},"defaultUserRole":{"type":"string","enum":["REQUESTER","NO_ACCESS","OBSERVER"]},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"tags":{"type":"array","items":{"type":"string"}},"userRoles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["NO_ACCESS","REQUESTER","OBSERVER","AGENT","ADMIN"]},"userId":{"type":"string"}}}},"updatedAt":{"type":"string"}}},"FormFields":{"type":"object","required":["fieldId","fieldLabel","isRequired","fieldType"],"properties":{"fieldId":{"type":"string"},"fieldLabel":{"type":"string"},"isRequired":{"type":"boolean"},"fieldType":{"type":"string","enum":["Date Picker","File Input","List Input","Multiline","Multiple List Inputs","Multiple Slack Users","Number","Plain Text Input","Slack Channel","Slack User"]},"fieldOptions":{"type":"array","description":"For List Inputs, these are the options available to the user.","items":{"type":"string"}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/inboxes/{inboxId}":{"get":{"summary":"Get Inbox","operationId":"getInbox","description":"Get an inbox by id.","responses":{"200":{"description":"Get Inbox","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_GetInbox"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Update Inbox

> Update an inbox.

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Request_UpdateInbox":{"type":"object","description":"Update an inbox.","properties":{"userRoles":{"description":"Allows updating the list of users with the No Access, Observer, and Requester roles for this inbox. Admin and Agent user roles need to be managed via the Wrangle web app.","type":"object","properties":{"NO_ACCESS":{"description":"Slack user IDs to assign the No Access role for this inbox. This will replace all users with the No Access role that exist already.","type":"array","items":{"type":"string"}},"REQUESTER":{"description":"Slack user IDs to assign the Requester role for this inbox. This will replace all users with the Requester role that exist already.","type":"array","items":{"type":"string"}},"OBSERVER":{"description":"Slack user IDs to assign the Observer role for this inbox. This will replace all users with the Observer role that exist already.","type":"array","items":{"type":"string"}}}}}},"Response_PutInbox":{"type":"object","required":["success","inbox"],"properties":{"success":{"type":"string","enum":["true"]},"inbox":{"$ref":"#/components/schemas/Inbox"}}},"Inbox":{"type":"object","properties":{"createdAt":{"type":"string"},"creatorId":{"type":"string"},"id":{"type":"string","format":"uuid"},"formFields":{"$ref":"#/components/schemas/FormFields"},"name":{"type":"string"},"description":{"type":"string"},"defaultUserRole":{"type":"string","enum":["REQUESTER","NO_ACCESS","OBSERVER"]},"status":{"type":"string","enum":["ACTIVE","ARCHIVED"]},"tags":{"type":"array","items":{"type":"string"}},"userRoles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["NO_ACCESS","REQUESTER","OBSERVER","AGENT","ADMIN"]},"userId":{"type":"string"}}}},"updatedAt":{"type":"string"}}},"FormFields":{"type":"object","required":["fieldId","fieldLabel","isRequired","fieldType"],"properties":{"fieldId":{"type":"string"},"fieldLabel":{"type":"string"},"isRequired":{"type":"boolean"},"fieldType":{"type":"string","enum":["Date Picker","File Input","List Input","Multiline","Multiple List Inputs","Multiple Slack Users","Number","Plain Text Input","Slack Channel","Slack User"]},"fieldOptions":{"type":"array","description":"For List Inputs, these are the options available to the user.","items":{"type":"string"}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/inboxes/{inboxId}":{"put":{"summary":"Update Inbox","operationId":"updateInbox","description":"Update an inbox.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request_UpdateInbox"}}},"required":true},"responses":{"200":{"description":"Update Inbox","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_PutInbox"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get Tickets

> Get tickets for an inbox. Query parameters are documented as an object in the Request\_GetTickets schema.

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Response_GetTickets":{"type":"object","required":["success","tickets","pagination"],"properties":{"success":{"type":"string","enum":["true"]},"tickets":{"type":"array","items":{"$ref":"#/components/schemas/LimitedTicket"}},"pagination":{"type":"object","required":["page","pageSize","totalCount","totalPages"],"properties":{"page":{"type":"integer","description":"Current page number"},"pageSize":{"type":"integer","description":"Number of items per page"},"totalCount":{"type":"integer","description":"Total number of items available"},"totalPages":{"type":"integer","description":"Total number of pages"}}}}},"LimitedTicket":{"type":"object","required":["id","name","status"],"properties":{"assigneeId":{"type":"string","nullable":true,"description":"The Slack user ID of the ticket assignee. They must be an agent for this ticket's inbox."},"createdAt":{"type":"string"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"requesterId":{"type":"string"},"status":{"type":"string","enum":["CLOSED","IN_PROGRESS","NEW","ON_HOLD","RESOLVED"]},"updatedAt":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/inboxes/{inboxId}/tickets":{"get":{"summary":"Get Tickets","operationId":"getTickets","description":"Get tickets for an inbox. Query parameters are documented as an object in the Request_GetTickets schema.","responses":{"200":{"description":"Get Tickets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_GetTickets"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /tickets

> Create Ticket

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Request_CreateTicket":{"type":"object","required":["name","inboxId","requesterId"],"properties":{"description":{"type":"string"},"formFieldValues":{"type":"array","items":{"$ref":"#/components/schemas/TicketFormFieldValues"}},"inboxId":{"type":"string"},"name":{"type":"string","description":"The name of the ticket."},"requesterId":{"type":"string","description":"The Slack user ID of the ticket requester. Can be different than the creatorId, for example when an agent creates a ticket on behalf of another user."},"priority":{"type":"string","enum":["CRITICAL","HIGH","NORMAL","LOW"]},"tags":{"type":"array","items":{"type":"string"}}}},"TicketFormFieldValues":{"type":"object","required":["fieldId"],"properties":{"fieldId":{"type":"string"},"value":{"oneOf":[{"type":"string","description":"For date form fields, use the YYYY-MM-DD format."},{"type":"number"},{"type":"array","items":{"type":"string"}}]}}},"Response_CreateTicket":{"type":"object","required":["success","ticket"],"properties":{"success":{"type":"string","enum":["true"]},"ticket":{"$ref":"#/components/schemas/Ticket"}}},"Ticket":{"allOf":[{"$ref":"#/components/schemas/Request_CreateTicket"},{"type":"object","required":["id","status"],"properties":{"assigneeId":{"type":"string","nullable":true,"description":"The Slack user ID of the ticket assignee. They must be an agent for this ticket's inbox."},"createdAt":{"type":"string"},"creatorId":{"type":"string"},"csatScore":{"type":"string","description":"The customer satisfaction score for the ticket if one exists.","enum":["1","2","3","4","5"]},"csatReason":{"type":"string","description":"The reason for the customer satisfaction score if one exists."},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"requesterId":{"type":"string"},"slackMessageChannel":{"type":"string"},"slackMessageTs":{"type":"string"},"slackOriginalMessage":{"type":"object","description":"If the ticket was created from a Slack message, this will contain the original message details.","nullable":true,"properties":{"channel":{"type":"string"},"ts":{"type":"string"},"parentMessageTs":{"type":"string","nullable":true},"permalinkUrl":{"type":"string","description":"Link to the original message that created the ticket in Slack."}}},"slackParentMessageTs":{"type":"string"},"slackPermalinkUrl":{"type":"string","description":"Link to the ticket in Slack."},"status":{"type":"string","enum":["CLOSED","IN_PROGRESS","NEW","ON_HOLD","RESOLVED"]},"workspaceId":{"type":"string"},"workspaceTicketNumber":{"type":"number"}}}]},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/tickets":{"post":{"summary":"Create Ticket","operationId":"createTicket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request_CreateTicket"}}},"required":true},"responses":{"200":{"description":"Create Ticket Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_CreateTicket"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /tickets/{ticketId}

> Get Ticket

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Response_GetTicket":{"allOf":[{"$ref":"#/components/schemas/Ticket"},{"type":"object","properties":{"replies":{"type":"array","description":"Present only when includeReplies=true.","items":{"$ref":"#/components/schemas/Reply"}}}}]},"Ticket":{"allOf":[{"$ref":"#/components/schemas/Request_CreateTicket"},{"type":"object","required":["id","status"],"properties":{"assigneeId":{"type":"string","nullable":true,"description":"The Slack user ID of the ticket assignee. They must be an agent for this ticket's inbox."},"createdAt":{"type":"string"},"creatorId":{"type":"string"},"csatScore":{"type":"string","description":"The customer satisfaction score for the ticket if one exists.","enum":["1","2","3","4","5"]},"csatReason":{"type":"string","description":"The reason for the customer satisfaction score if one exists."},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"requesterId":{"type":"string"},"slackMessageChannel":{"type":"string"},"slackMessageTs":{"type":"string"},"slackOriginalMessage":{"type":"object","description":"If the ticket was created from a Slack message, this will contain the original message details.","nullable":true,"properties":{"channel":{"type":"string"},"ts":{"type":"string"},"parentMessageTs":{"type":"string","nullable":true},"permalinkUrl":{"type":"string","description":"Link to the original message that created the ticket in Slack."}}},"slackParentMessageTs":{"type":"string"},"slackPermalinkUrl":{"type":"string","description":"Link to the ticket in Slack."},"status":{"type":"string","enum":["CLOSED","IN_PROGRESS","NEW","ON_HOLD","RESOLVED"]},"workspaceId":{"type":"string"},"workspaceTicketNumber":{"type":"number"}}}]},"Request_CreateTicket":{"type":"object","required":["name","inboxId","requesterId"],"properties":{"description":{"type":"string"},"formFieldValues":{"type":"array","items":{"$ref":"#/components/schemas/TicketFormFieldValues"}},"inboxId":{"type":"string"},"name":{"type":"string","description":"The name of the ticket."},"requesterId":{"type":"string","description":"The Slack user ID of the ticket requester. Can be different than the creatorId, for example when an agent creates a ticket on behalf of another user."},"priority":{"type":"string","enum":["CRITICAL","HIGH","NORMAL","LOW"]},"tags":{"type":"array","items":{"type":"string"}}}},"TicketFormFieldValues":{"type":"object","required":["fieldId"],"properties":{"fieldId":{"type":"string"},"value":{"oneOf":[{"type":"string","description":"For date form fields, use the YYYY-MM-DD format."},{"type":"number"},{"type":"array","items":{"type":"string"}}]}}},"Reply":{"type":"object","required":["authorSlackUserId","authorSlackWorkspaceId","channelId","isPrivate","markdownText","slackTs"],"properties":{"authorSlackUserId":{"type":"string","description":"The Slack user ID the reply is attributed to."},"authorSlackWorkspaceId":{"type":"string","description":"The Slack workspace ID of the reply author."},"channelId":{"type":"string","description":"The Slack channel ID the reply was posted to."},"createdAt":{"type":"string"},"isPrivate":{"type":"boolean","description":"Whether the reply is private (visible only to agents/observers)."},"markdownText":{"type":"string"},"slackParentTs":{"type":"string","nullable":true,"description":"The Slack timestamp of the thread parent, if this is a threaded reply."},"slackTs":{"type":"string","description":"The Slack message timestamp of the reply."},"updatedAt":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/tickets/{ticketId}":{"get":{"summary":"Get Ticket","operationId":"getTicket","responses":{"200":{"description":"Get Ticket Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_GetTicket"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"includeReplies","in":"query","required":false,"schema":{"type":"boolean"},"description":"When 'true', include the ticket's replies in the response."}]}}}}
```

## PUT /tickets/{ticketId}

> Update Ticket

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Request_UpdateTicket":{"type":"object","properties":{"assigneeId":{"type":"string","nullable":true,"description":"The Slack user ID of the ticket assignee. They must be an agent for this ticket's inbox. To unassign a ticket, set this to null. If a ticket is assigned, it's status will automatically be set to IN_PROGRESS. If a ticket is unassigned, it's status will automatically be set to NEW."},"csatScore":{"type":"string","description":"The customer satisfaction score for the ticket. Must be a value between 1 and 5. Satisfaction surveys must be enabled for the ticket's inbox.","enum":["1","2","3","4","5"]},"description":{"type":"string"},"followers":{"type":"array","items":{"$ref":"#/components/schemas/Followers"}},"formFieldValues":{"type":"array","items":{"$ref":"#/components/schemas/TicketFormFieldValues"}},"inboxId":{"type":"string","description":"Move this ticket to a new inbox. Will clear the assignee, status, tags, and other inbox-specific settings."},"name":{"type":"string"},"priority":{"type":"string","enum":["CRITICAL","HIGH","NORMAL","LOW"]},"status":{"type":"string","enum":["CLOSED","IN_PROGRESS","NEW","ON_HOLD","RESOLVED"]},"tags":{"type":"array","items":{"type":"string"}}}},"Followers":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"}}},"TicketFormFieldValues":{"type":"object","required":["fieldId"],"properties":{"fieldId":{"type":"string"},"value":{"oneOf":[{"type":"string","description":"For date form fields, use the YYYY-MM-DD format."},{"type":"number"},{"type":"array","items":{"type":"string"}}]}}},"Response_UpdateTicket":{"type":"object","required":["success","ticket"],"properties":{"success":{"type":"string","enum":["true"]},"ticket":{"$ref":"#/components/schemas/Ticket"}}},"Ticket":{"allOf":[{"$ref":"#/components/schemas/Request_CreateTicket"},{"type":"object","required":["id","status"],"properties":{"assigneeId":{"type":"string","nullable":true,"description":"The Slack user ID of the ticket assignee. They must be an agent for this ticket's inbox."},"createdAt":{"type":"string"},"creatorId":{"type":"string"},"csatScore":{"type":"string","description":"The customer satisfaction score for the ticket if one exists.","enum":["1","2","3","4","5"]},"csatReason":{"type":"string","description":"The reason for the customer satisfaction score if one exists."},"description":{"type":"string"},"id":{"type":"string","format":"uuid"},"requesterId":{"type":"string"},"slackMessageChannel":{"type":"string"},"slackMessageTs":{"type":"string"},"slackOriginalMessage":{"type":"object","description":"If the ticket was created from a Slack message, this will contain the original message details.","nullable":true,"properties":{"channel":{"type":"string"},"ts":{"type":"string"},"parentMessageTs":{"type":"string","nullable":true},"permalinkUrl":{"type":"string","description":"Link to the original message that created the ticket in Slack."}}},"slackParentMessageTs":{"type":"string"},"slackPermalinkUrl":{"type":"string","description":"Link to the ticket in Slack."},"status":{"type":"string","enum":["CLOSED","IN_PROGRESS","NEW","ON_HOLD","RESOLVED"]},"workspaceId":{"type":"string"},"workspaceTicketNumber":{"type":"number"}}}]},"Request_CreateTicket":{"type":"object","required":["name","inboxId","requesterId"],"properties":{"description":{"type":"string"},"formFieldValues":{"type":"array","items":{"$ref":"#/components/schemas/TicketFormFieldValues"}},"inboxId":{"type":"string"},"name":{"type":"string","description":"The name of the ticket."},"requesterId":{"type":"string","description":"The Slack user ID of the ticket requester. Can be different than the creatorId, for example when an agent creates a ticket on behalf of another user."},"priority":{"type":"string","enum":["CRITICAL","HIGH","NORMAL","LOW"]},"tags":{"type":"array","items":{"type":"string"}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/tickets/{ticketId}":{"put":{"summary":"Update Ticket","operationId":"updateTicket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request_UpdateTicket"}}},"required":true},"responses":{"200":{"description":"Update Ticket Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_UpdateTicket"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## DELETE /tickets/{ticketId}

> Delete Ticket

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/tickets/{ticketId}":{"delete":{"summary":"Delete Ticket","operationId":"deleteTicket","responses":{"200":{"description":"Delete Ticket Response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"string","enum":["true"]}}}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get Workflows

> Get active workflows for a workspace.

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Response_GetWorkflows":{"type":"object","required":["success","workflows"],"properties":{"success":{"type":"string","enum":["true"]},"workflows":{"type":"array","items":{"$ref":"#/components/schemas/LimitedWorkflow"}}}},"LimitedWorkflow":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/workflows":{"get":{"summary":"Get Workflows","operationId":"getWorkflows","description":"Get active workflows for a workspace.","responses":{"200":{"description":"Get Workflows Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_GetWorkflows"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /workflows/{workflowId}

> Get Workflow

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Response_GetWorkflow":{"type":"object","required":["success","ticket"],"properties":{"success":{"type":"string","enum":["true"]},"workflow":{"$ref":"#/components/schemas/Workflow"}}},"Workflow":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"intakeFormFields":{"$ref":"#/components/schemas/FormFields"}}},"FormFields":{"type":"object","required":["fieldId","fieldLabel","isRequired","fieldType"],"properties":{"fieldId":{"type":"string"},"fieldLabel":{"type":"string"},"isRequired":{"type":"boolean"},"fieldType":{"type":"string","enum":["Date Picker","File Input","List Input","Multiline","Multiple List Inputs","Multiple Slack Users","Number","Plain Text Input","Slack Channel","Slack User"]},"fieldOptions":{"type":"array","description":"For List Inputs, these are the options available to the user.","items":{"type":"string"}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/workflows/{workflowId}":{"get":{"summary":"Get Workflow","operationId":"getWorkflow","responses":{"200":{"description":"Get Workflow Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_GetWorkflow"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /workflows/{workflowId}/instances

> Start Workflow

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Request_StartWorkflow":{"type":"object","required":["requesterId","formFieldValues"],"properties":{"requesterId":{"type":"string","description":"The Slack user ID of the user starting this workflow instance."},"formFieldValues":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowFormFieldValues"}}}},"WorkflowFormFieldValues":{"type":"object","required":["fieldId"],"properties":{"fieldId":{"type":"string"},"value":{"oneOf":[{"type":"string","description":"For date form fields, use the YYYY-MM-DD format."},{"type":"number"},{"type":"array","description":"For multiple list or user inputs, use an array of strings.","items":{"type":"string"}}]}}},"Response_StartWorkflow":{"type":"object","required":["success","workflowInstanceId"],"properties":{"success":{"type":"string","enum":["true"]},"workflowInstanceId":{"type":"string","format":"uuid"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/workflows/{workflowId}/instances":{"post":{"summary":"Start Workflow","operationId":"startWorkflow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request_StartWorkflow"}}},"required":true},"responses":{"200":{"description":"Start a Workflow","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_StartWorkflow"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create Reply

> Create a reply on a ticket. Anyone who can view the ticket may reply as themselves; attributing the reply to another user (via slackUserId or email) requires admin access, and posting a private reply requires agent or admin access.

```json
{"openapi":"3.0.3","info":{"title":"Wrangle API Documentation","version":"0.1.5"},"servers":[{"url":"https://slack.wrangle.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Request_CreateReply":{"type":"object","required":["markdownText"],"properties":{"markdownText":{"type":"string","description":"The reply body in Slack formatted markdown. Required."},"authorSlackUserId":{"type":"string","description":"The Slack user ID to attribute the reply to. You must provide either an authorSlackUserId or an authorEmail, not both."},"authorEmail":{"type":"string","format":"email","description":"The email address of the user to attribute the reply to. This user must exist in your Slack workspace. You must provide either an authorSlackUserId or an authorEmail, not both."},"isPrivate":{"type":"boolean","description":"Post the reply as private (visible only to agents/observers). Requires agent or admin access."}}},"Response_CreateReply":{"type":"object","required":["success","reply"],"properties":{"success":{"type":"boolean"},"reply":{"$ref":"#/components/schemas/Reply"}}},"Reply":{"type":"object","required":["authorSlackUserId","authorSlackWorkspaceId","channelId","isPrivate","markdownText","slackTs"],"properties":{"authorSlackUserId":{"type":"string","description":"The Slack user ID the reply is attributed to."},"authorSlackWorkspaceId":{"type":"string","description":"The Slack workspace ID of the reply author."},"channelId":{"type":"string","description":"The Slack channel ID the reply was posted to."},"createdAt":{"type":"string"},"isPrivate":{"type":"boolean","description":"Whether the reply is private (visible only to agents/observers)."},"markdownText":{"type":"string"},"slackParentTs":{"type":"string","nullable":true,"description":"The Slack timestamp of the thread parent, if this is a threaded reply."},"slackTs":{"type":"string","description":"The Slack message timestamp of the reply."},"updatedAt":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"formFieldErrors":{"type":"array","items":{"$ref":"#/components/schemas/FormFieldError"}}}},"FormFieldError":{"type":"object","required":["fieldId","error"],"properties":{"fieldId":{"type":"string"},"message":{"type":"string"},"fieldName":{"type":"string"},"type":{"type":"string"}}}}},"paths":{"/tickets/{ticketId}/reply":{"post":{"summary":"Create Reply","operationId":"createReply","description":"Create a reply on a ticket. Anyone who can view the ticket may reply as themselves; attributing the reply to another user (via slackUserId or email) requires admin access, and posting a private reply requires agent or admin access.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request_CreateReply"}}},"required":true},"responses":{"200":{"description":"Create Reply Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_CreateReply"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
