> This is a page from the ElevenLabs documentation. For an index of the documentation, fetch https://elevenlabs.io/docs/llms.txt.

# チケットを取得

GET https://api.elevenlabs.io/v1/support/tickets/{ticket_id}

チケットを取得

Reference: https://elevenlabs.io/docs/eleven-agents/api-reference/tickets/tickets/get

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `ticket_id` (string, required)

## Response

### 200

成功レスポンス。

- `id` (string, required)
- `subject` (string, required)
- `status` (enum, required)
  - Allowed values: `open`, `pending`, `waiting`, `resolved`
- `requester` (TicketRequesterResponse, required)
- `tag_ids` (list of string, required)
- `subscribers` (list of TicketSubscriberResponse, required)
- `created_at_unix_secs` (integer, required)
- `updated_at_unix_secs` (integer, required)
- `events` (list of GetTicketResponseEventsItem, required)
- `description` (string, optional)
- `priority` (enum, optional)
  - Allowed values: `low`, `medium`, `high`, `urgent`
- `assignee` (GetTicketResponseAssignee, optional)
- `secondary_assignee` (GetTicketResponseSecondaryAssignee, optional)
- `sla` (TicketSlaSummaryResponse, optional)
- `deadline_at_unix_secs` (integer, optional)

## Errors

### 422 Tickets Get Request Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### TicketRequesterResponse

- `id` (string, required)
- `first_name` (string, optional)
- `last_name` (string, optional)
- `full_name` (string, optional)
- `email` (string, optional)

### TicketSubscriberResponse

- `type` ("human_agent", required)
- `id` (string, required)
- `name` (string, optional)
- `email` (string, optional)

### GetTicketResponseEventsItem

- `type`: `assignee_changed`
  - `author` (TicketAssigneeChangedEventResponseAuthor, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
  - `after` (TicketAssigneeChangedEventResponseAfter, optional)
  - `before` (TicketAssigneeChangedEventResponseBefore, optional)
- `type`: `deadline_changed`
  - `author` (TicketDeadlineChangedEventResponseAuthor, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
  - `after` (integer, optional)
  - `before` (integer, optional)
- `type`: `message`
  - `author` (TicketMessageEventResponseAuthor, required)
  - `body` (string, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
- `type`: `priority_changed`
  - `author` (TicketPriorityChangedEventResponseAuthor, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
  - `after` (enum, optional)
    - Allowed values: `low`, `medium`, `high`, `urgent`
  - `before` (enum, optional)
    - Allowed values: `low`, `medium`, `high`, `urgent`
- `type`: `secondary_assignee_changed`
  - `author` (TicketSecondaryAssigneeChangedEventResponseAuthor, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
  - `after` (TicketSecondaryAssigneeChangedEventResponseAfter, optional)
  - `before` (TicketSecondaryAssigneeChangedEventResponseBefore, optional)
- `type`: `status_changed`
  - `after` (enum, required)
    - Allowed values: `open`, `pending`, `waiting`, `resolved`
  - `author` (TicketStatusChangedEventResponseAuthor, required)
  - `before` (enum, required)
    - Allowed values: `open`, `pending`, `waiting`, `resolved`
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
- `type`: `subject_changed`
  - `after` (string, required)
  - `author` (TicketSubjectChangedEventResponseAuthor, required)
  - `before` (string, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
- `type`: `subscribers_changed`
  - `after` (list of TicketSubscriberResponse, required)
  - `author` (TicketSubscribersChangedEventResponseAuthor, required)
  - `before` (list of TicketSubscriberResponse, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
- `type`: `tag_ids_changed`
  - `after` (list of string, required)
  - `author` (TicketTagIdsChangedEventResponseAuthor, required)
  - `before` (list of string, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
- `type`: `ticket_created`
  - `author` (TicketCreatedEventResponseAuthor, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`
  - `priority` (enum, optional)
    - Allowed values: `low`, `medium`, `high`, `urgent`
- `type`: `ticket_deleted`
  - `author` (TicketDeletedEventResponseAuthor, required)
  - `created_at_unix_secs` (integer, required)
  - `id` (string, required)
  - `visibility` (enum, required)
    - Allowed values: `public`, `internal`

### GetTicketResponseAssignee

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)

### GetTicketResponseSecondaryAssignee

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)

### TicketSlaSummaryResponse

- `metric` (enum, required)
  - Allowed values: `first_response`, `resolution`, `next_response`
- `duration_secs` (integer, required)
- `started_at_unix_secs` (integer, required)
- `due_at_unix_secs` (integer, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### TicketAssigneeChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketAssigneeChangedEventResponseAfter

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)

### TicketAssigneeChangedEventResponseBefore

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)

### TicketDeadlineChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketMessageEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketPriorityChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketSecondaryAssigneeChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketSecondaryAssigneeChangedEventResponseAfter

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)

### TicketSecondaryAssigneeChangedEventResponseBefore

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)

### TicketStatusChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketSubjectChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketSubscribersChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketTagIdsChangedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketCreatedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### TicketDeletedEventResponseAuthor

- `type`: `ai_agent`
  - `id` (string, required)
  - `name` (string, optional)
- `type`: `human_agent`
  - `id` (string, required)
  - `email` (string, optional)
  - `name` (string, optional)
- `type`: `requester`
  - `id` (string, required)
  - `email` (string, optional)
  - `first_name` (string, optional)
  - `full_name` (string, optional)
  - `last_name` (string, optional)

### ValidationErrorLocItem

- string
- integer

## Examples

**Response**

```json
{
  "id": "id",
  "subject": "subject",
  "status": "open",
  "requester": {
    "id": "id",
    "first_name": "first_name",
    "last_name": "last_name",
    "full_name": "full_name",
    "email": "email"
  },
  "tag_ids": [
    "tag_ids"
  ],
  "subscribers": [
    {
      "type": "human_agent",
      "id": "id",
      "name": "name",
      "email": "email"
    }
  ],
  "created_at_unix_secs": 1,
  "updated_at_unix_secs": 1,
  "events": [
    {
      "type": "assignee_changed",
      "author": {
        "type": "ai_agent",
        "id": "id",
        "name": null
      },
      "created_at_unix_secs": 1,
      "id": "id",
      "visibility": "public",
      "after": {
        "type": "ai_agent",
        "id": "id",
        "name": null
      },
      "before": {
        "type": "ai_agent",
        "id": "id",
        "name": null
      }
    }
  ],
  "description": "description",
  "priority": "low",
  "assignee": {
    "type": "ai_agent",
    "id": "id",
    "name": "name"
  },
  "secondary_assignee": {
    "type": "ai_agent",
    "id": "id",
    "name": "name"
  },
  "sla": {
    "metric": "first_response",
    "duration_secs": 1,
    "started_at_unix_secs": 1,
    "due_at_unix_secs": 1
  },
  "deadline_at_unix_secs": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/support/tickets/ticket_id"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/support/tickets/ticket_id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/support/tickets/ticket_id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/support/tickets/ticket_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/support/tickets/ticket_id")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/support/tickets/ticket_id');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/support/tickets/ticket_id");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/support/tickets/ticket_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```