---
updatedAt: 2024-12-02T06:10:52.000Z
agentTools:
  projectIndex: https://help.thena.ai/llms.txt
---

# Create a new request

Creates a new request with the provided details

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://bolt.thena.ai",
      "description": "Thena Base Endpoint"
    }
  ],
  "info": {
    "title": "Thena API Documentation",
    "version": "1.0.0",
    "description": "\n## API Documentation for Thena Public APIs\n\nThis documentation provides the details of all the public APIs that are available in Thena. You can try these API calls on the [Thena API Playground](https://bolt.thena.ai/api-docs), or you can use any tool of your choice.\n\n### Overview\n\nThena is a platform that provides a comprehensive suite of tools to help businesses manage their customer support operations. Our APIs enable developers to integrate Thena's features into their existing workflows, automate tasks, and enhance the functionality of their applications.\n\n### Authentication\n\nAll API calls require authentication. You can use the API key that you can find in your Thena account. This API Key should be passed in the header under \"Authorization\" as a bearer token. For example:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\nTo start in this playground, click the \"Authorize\" button and paste the API key with Bearer prefix in the field that appears. Once you have done this, the API key will be saved in the playground and you will be able to make API calls.\n\n\t\t\t"
  },
  "tags": [
    {
      "name": "Requests",
      "description": "API endpoints for managing requests"
    }
  ],
  "paths": {
    "/rest/v2/requests": {
      "post": {
        "summary": "Create a new request",
        "description": "Creates a new request with the provided details",
        "tags": [
          "Requests"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request": {
                    "type": "object",
                    "required": [
                      "status",
                      "properties",
                      "created_by",
                      "assignment",
                      "created_for",
                      "private"
                    ],
                    "properties": {
                      "status": {
                        "type": "string",
                        "description": "The status of the request",
                        "example": "OPEN"
                      },
                      "sub_status": {
                        "type": "string",
                        "description": "The sub-status id for the request"
                      },
                      "properties": {
                        "type": "object",
                        "properties": {
                          "system": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "The title of the request"
                              },
                              "description": {
                                "type": "string",
                                "description": "The description of the request"
                              },
                              "sentiment": {
                                "type": "string",
                                "description": "AI-detected sentiment of the request"
                              },
                              "urgency": {
                                "type": "string",
                                "description": "AI-determined urgency of the request"
                              }
                            }
                          },
                          "external": {
                            "type": "object",
                            "properties": {
                              "ticket_id": {
                                "type": "string",
                                "description": "External ticket ID"
                              }
                            }
                          }
                        }
                      },
                      "assignment": {
                        "type": "object",
                        "properties": {
                          "to_user_id": {
                            "type": "string",
                            "description": "ID of the user the request is assigned to"
                          }
                        }
                      },
                      "created_for": {
                        "type": "object",
                        "properties": {
                          "user_email": {
                            "type": "string",
                            "format": "email",
                            "description": "Email of the user the request is created for"
                          }
                        }
                      },
                      "private": {
                        "type": "boolean",
                        "description": "Indicates if the request is private"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successfully created request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "success"
                      ],
                      "description": "The status of the API response"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The unique identifier of the request"
                        },
                        "title": {
                          "type": "string",
                          "description": "The title of the request"
                        },
                        "description": {
                          "type": "string",
                          "description": "The description of the request"
                        },
                        "is_private": {
                          "type": "boolean",
                          "description": "Indicates if the request is private"
                        },
                        "submitter": {
                          "type": "string",
                          "description": "Unique id of the user who submitted the request"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The creation timestamp of the request"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The last update timestamp of the request"
                        },
                        "original_message_ts": {
                          "type": "string",
                          "description": "Timestamp of the request message"
                        },
                        "original_message_text": {
                          "type": "string",
                          "description": "Text of the request message"
                        },
                        "original_message_source": {
                          "type": "string",
                          "description": "Source of the original message, could be 'SLACK', 'EMAIL', 'WEB', 'API'"
                        },
                        "original_message_user_id": {
                          "type": "string",
                          "description": "ID of the user who sent the request message"
                        },
                        "original_message_thread_ts": {
                          "type": "string",
                          "description": "Thread timestamp of the message, can be null if not a thread"
                        },
                        "original_message_permalink": {
                          "type": "string",
                          "description": "Permalink to the original message"
                        },
                        "original_message_user_name": {
                          "type": "string",
                          "description": "Name of the user who sent the request message"
                        },
                        "original_message_user_slack_name": {
                          "type": "string",
                          "description": "Slack name of the user who sent the request message"
                        },
                        "original_message_user_slack_profile_real_name": {
                          "type": "string",
                          "description": "Real name from Slack profile of the user who sent the request message"
                        },
                        "original_message_user_slack_profile_image_48": {
                          "type": "string",
                          "description": "48x48 profile image URL from Slack"
                        },
                        "original_message_user_slack_profile_image_72": {
                          "type": "string",
                          "description": "72x72 profile image URL from Slack"
                        },
                        "original_message_user_slack_profile_image_512": {
                          "type": "string",
                          "description": "512x512 profile image URL from Slack"
                        },
                        "sla_metrics": {
                          "type": "object",
                          "description": "SLA metrics for the request"
                        },
                        "first_response_time": {
                          "type": "object",
                          "description": "Details of the first response"
                        },
                        "check_first_sla_breach_on_ts": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp to check for first SLA breach"
                        },
                        "check_req_closure_breach_on_ts": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp to check for request closure breach"
                        },
                        "custom_fields": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": "Custom fields (categories) for the request"
                        },
                        "custom_fields_v2": {
                          "type": "object",
                          "description": "Version 2 of custom fields for the request"
                        },
                        "status": {
                          "type": "string",
                          "description": "Current status of the request"
                        },
                        "source": {
                          "type": "string",
                          "description": "Source of the request"
                        },
                        "sub_status": {
                          "type": "string",
                          "description": "Sub-status id of the request"
                        },
                        "request_id": {
                          "type": "number",
                          "description": "Unique identifier for the request"
                        },
                        "channel_id": {
                          "type": "string",
                          "description": "ID of the channel where the request was created"
                        },
                        "channel_name": {
                          "type": "string",
                          "description": "Name of the channel where the request was created"
                        },
                        "merged_requests": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of merged request IDs"
                        },
                        "last_reply_by_vendor_ts": {
                          "type": "string",
                          "description": "Timestamp of the last reply by vendor"
                        },
                        "last_reply_by_customer_ts": {
                          "type": "string",
                          "description": "Timestamp of the last reply by customer"
                        },
                        "ai_metadata": {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "titleSource": {
                              "type": "string"
                            },
                            "summary": {
                              "type": "string"
                            },
                            "summarySource": {
                              "type": "string"
                            },
                            "internal_summary": {
                              "type": "string"
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "category": {
                              "type": "string"
                            },
                            "userDefinedTags": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "urgency": {
                              "type": "string"
                            },
                            "urgencySource": {
                              "type": "string"
                            },
                            "actionable": {
                              "type": "boolean"
                            },
                            "sentiment": {
                              "type": "string"
                            },
                            "sentimentSource": {
                              "type": "string"
                            },
                            "updatedOn": {
                              "type": "string",
                              "format": "date-time"
                            }
                          },
                          "description": "AI-generated metadata for the request"
                        },
                        "feedback": {
                          "type": "object",
                          "description": "Feedback for the request"
                        },
                        "closed_on": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp when the request was closed"
                        },
                        "closed_by_user_id": {
                          "type": "string",
                          "description": "ID of the user who closed the request"
                        },
                        "assigned_by_user_id": {
                          "type": "string",
                          "description": "ID of the user who assigned the request"
                        },
                        "assigned_to_user_id": {
                          "type": "string",
                          "description": "ID of the user to whom the request is assigned"
                        },
                        "merged_by_user_id": {
                          "type": "string",
                          "description": "ID of the user who merged the request"
                        },
                        "merged_into": {
                          "type": "string",
                          "description": "ID of the request this was merged into"
                        },
                        "merged_on": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Timestamp when the request was merged"
                        },
                        "escalation_type": {
                          "type": "string",
                          "description": "Type of escalation for the request"
                        },
                        "escalation_details": {
                          "type": "object",
                          "description": "Details of the escalation"
                        },
                        "external_links": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": "External links related to the request"
                        },
                        "slack_triage_notification_message": {
                          "type": "object",
                          "properties": {
                            "ts": {
                              "type": "string"
                            },
                            "channel": {
                              "type": "string"
                            },
                            "permalink": {
                              "type": "string"
                            }
                          },
                          "description": "Slack triage notification message details"
                        },
                        "subscribers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of subscriber IDs"
                        },
                        "attached_form_response": {
                          "type": "object",
                          "description": "Attached form response data"
                        }
                      },
                      "x-readme-ref-name": "Request"
                    },
                    "message": {
                      "type": "string",
                      "description": "A message describing the result of the operation"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "Whether the response is successful"
                    },
                    "error_code": {
                      "type": "string",
                      "description": "The error code"
                    },
                    "message": {
                      "type": "string",
                      "description": "A brief description of the error"
                    },
                    "error": {
                      "type": "boolean",
                      "description": "Whether the response is an error"
                    }
                  },
                  "example": {
                    "error_code": "THK-COL-001",
                    "message": "Invalid input",
                    "error": true
                  },
                  "x-readme-ref-name": "ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "message"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "Whether the response is successful"
                    },
                    "error_code": {
                      "type": "string",
                      "description": "The error code"
                    },
                    "message": {
                      "type": "string",
                      "description": "A brief description of the error"
                    },
                    "error": {
                      "type": "boolean",
                      "description": "Whether the response is an error"
                    }
                  },
                  "example": {
                    "error_code": "THK-COL-001",
                    "message": "Invalid input",
                    "error": true
                  },
                  "x-readme-ref-name": "ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Use a Bearer token for authentication. Prefix your API key with \"Bearer \". For example: \"Bearer YOUR_API_KEY\""
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
````