---
title: Update the assignee of an issue
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Error Tracking
---

# Update the assignee of an issue{% #update-the-assignee-of-an-issue %}
Copy pageCopied
{% tab title="v2" %}

| Datadog site      | API endpoint                                                                       |
| ----------------- | ---------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v2/error-tracking/issues/{issue_id}/assignee |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v2/error-tracking/issues/{issue_id}/assignee |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v2/error-tracking/issues/{issue_id}/assignee      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v2/error-tracking/issues/{issue_id}/assignee      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v2/error-tracking/issues/{issue_id}/assignee  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v2/error-tracking/issues/{issue_id}/assignee     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v2/error-tracking/issues/{issue_id}/assignee |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v2/error-tracking/issues/{issue_id}/assignee |

### Overview

Update the assignee of an issue by `issue_id`.

OAuth apps require the `error_tracking_read, error_tracking_write, cases_read, cases_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#error-tracking) to access this endpoint.



### Arguments

#### Path Parameters

| Name                       | Type   | Description                  |
| -------------------------- | ------ | ---------------------------- |
| issue_id [*required*] | string | The identifier of the issue. |

### Request

#### Body Data (required)

Update issue assignee request payload.

{% tab title="Model" %}

| Parent field | Field                  | Type   | Description                                         |
| ------------ | ---------------------- | ------ | --------------------------------------------------- |
|              | data [*required*] | object | Update issue assignee request.                      |
| data         | id [*required*]   | string | User identifier.                                    |
| data         | type [*required*] | enum   | Type of the object. Allowed enum values: `assignee` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "id": "87cb11a0-278c-440a-99fe-701223c80296",
    "type": "assignee"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing error tracking issue data.

| Parent field  | Field                          | Type            | Description                                                                                                                                                                                           |
| ------------- | ------------------------------ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|               | data                           | object          | The issue matching the request.                                                                                                                                                                       |
| data          | attributes [*required*]   | object          | Object containing the information of an issue.                                                                                                                                                        |
| attributes    | error_message                  | string          | Error message associated with the issue.                                                                                                                                                              |
| attributes    | error_type                     | string          | Type of the error that matches the issue.                                                                                                                                                             |
| attributes    | file_path                      | string          | Path of the file where the issue occurred.                                                                                                                                                            |
| attributes    | first_seen                     | int64           | Timestamp of the first seen error in milliseconds since the Unix epoch.                                                                                                                               |
| attributes    | first_seen_version             | string          | The application version (for example, git commit hash) where the issue was first observed.                                                                                                            |
| attributes    | function_name                  | string          | Name of the function where the issue occurred.                                                                                                                                                        |
| attributes    | is_crash                       | boolean         | Error is a crash.                                                                                                                                                                                     |
| attributes    | languages                      | [string]        | Array of programming languages associated with the issue.                                                                                                                                             |
| attributes    | last_seen                      | int64           | Timestamp of the last seen error in milliseconds since the Unix epoch.                                                                                                                                |
| attributes    | last_seen_version              | string          | The application version (for example, git commit hash) where the issue was last observed.                                                                                                             |
| attributes    | platform                       | enum            | Platform associated with the issue. Allowed enum values: `ANDROID,BACKEND,BROWSER,FLUTTER,IOS,REACT_NATIVE,ROKU,UNKNOWN`                                                                              |
| attributes    | regression                     | object          | Regression information for an issue that was previously resolved and then reopened.                                                                                                                   |
| regression    | regressed_at [*required*] | date-time       | Timestamp when the issue was reopened (regressed).                                                                                                                                                    |
| regression    | regressed_at_version           | string          | Application version where the regression was observed.                                                                                                                                                |
| regression    | resolved_at [*required*]  | date-time       | Timestamp when the issue was resolved before the regression.                                                                                                                                          |
| attributes    | service                        | string          | Service name.                                                                                                                                                                                         |
| attributes    | state                          | enum            | State of the issue Allowed enum values: `OPEN,ACKNOWLEDGED,RESOLVED,IGNORED,EXCLUDED`                                                                                                                 |
| data          | id [*required*]           | string          | Issue identifier.                                                                                                                                                                                     |
| data          | relationships                  | object          | Relationship between the issue and an assignee, case and/or teams.                                                                                                                                    |
| relationships | assignee                       | object          | Relationship between the issue and assignee.                                                                                                                                                          |
| assignee      | data [*required*]         | object          | The user the issue is assigned to.                                                                                                                                                                    |
| data          | id [*required*]           | string          | User identifier.                                                                                                                                                                                      |
| data          | type [*required*]         | enum            | Type of the object Allowed enum values: `user`                                                                                                                                                        |
| relationships | case                           | object          | Relationship between the issue and case.                                                                                                                                                              |
| case          | data [*required*]         | object          | The case the issue is attached to.                                                                                                                                                                    |
| data          | id [*required*]           | string          | Case identifier.                                                                                                                                                                                      |
| data          | type [*required*]         | enum            | Type of the object. Allowed enum values: `case`                                                                                                                                                       |
| relationships | team_owners                    | object          | Relationship between the issue and teams.                                                                                                                                                             |
| team_owners   | data [*required*]         | [object]        | Array of teams that are owners of the issue.                                                                                                                                                          |
| data          | id [*required*]           | string          | Team identifier.                                                                                                                                                                                      |
| data          | type [*required*]         | enum            | Type of the object. Allowed enum values: `team`                                                                                                                                                       |
| data          | type [*required*]         | enum            | Type of the object. Allowed enum values: `issue`                                                                                                                                                      |
|               | included                       | [ <oneOf>] | Array of resources related to the issue.                                                                                                                                                              |
| included      | Option 1                       | object          | The case attached to the issue.                                                                                                                                                                       |
| Option 1      | attributes [*required*]   | object          | Object containing the information of a case.                                                                                                                                                          |
| attributes    | archived_at                    | date-time       | Timestamp of when the case was archived.                                                                                                                                                              |
| attributes    | closed_at                      | date-time       | Timestamp of when the case was closed.                                                                                                                                                                |
| attributes    | created_at                     | date-time       | Timestamp of when the case was created.                                                                                                                                                               |
| attributes    | creation_source                | string          | Source of the case creation.                                                                                                                                                                          |
| attributes    | description                    | string          | Description of the case.                                                                                                                                                                              |
| attributes    | due_date                       | string          | Due date of the case.                                                                                                                                                                                 |
| attributes    | insights                       | [object]        | Insights of the case.                                                                                                                                                                                 |
| insights      | ref                            | string          | Reference of the insight.                                                                                                                                                                             |
| insights      | resource_id                    | string          | Insight identifier.                                                                                                                                                                                   |
| insights      | type                           | string          | Type of the insight.                                                                                                                                                                                  |
| attributes    | jira_issue                     | object          | Jira issue of the case.                                                                                                                                                                               |
| jira_issue    | error_message                  | string          | Error message set when the Jira issue creation fails.                                                                                                                                                 |
| jira_issue    | result                         | object          | Contains the identifiers and URL for a successfully created Jira issue.                                                                                                                               |
| result        | account_id                     | string          | Jira account identifier.                                                                                                                                                                              |
| result        | issue_id                       | string          | Jira issue identifier.                                                                                                                                                                                |
| result        | issue_key                      | string          | Jira issue key.                                                                                                                                                                                       |
| result        | issue_url                      | string          | Jira issue URL.                                                                                                                                                                                       |
| result        | project_id                     | string          | Jira project identifier.                                                                                                                                                                              |
| result        | project_key                    | string          | Jira project key.                                                                                                                                                                                     |
| jira_issue    | status                         | string          | Creation status of the Jira issue.                                                                                                                                                                    |
| attributes    | key                            | string          | Key of the case.                                                                                                                                                                                      |
| attributes    | linear_issue                   | object          | Linear issue of the case.                                                                                                                                                                             |
| linear_issue  | error_message                  | string          | Error message set when the Linear issue creation fails.                                                                                                                                               |
| linear_issue  | result                         | object          | Contains the identifiers and URL for a successfully created Linear issue.                                                                                                                             |
| result        | account_id                     | string          | Linear account identifier.                                                                                                                                                                            |
| result        | issue_id                       | string          | Linear issue identifier.                                                                                                                                                                              |
| result        | issue_key                      | string          | Linear issue key.                                                                                                                                                                                     |
| result        | issue_url                      | string          | Linear issue URL.                                                                                                                                                                                     |
| result        | team_id                        | string          | Linear team identifier.                                                                                                                                                                               |
| linear_issue  | status                         | string          | Creation status of the Linear issue.                                                                                                                                                                  |
| attributes    | modified_at                    | date-time       | Timestamp of when the case was last modified.                                                                                                                                                         |
| attributes    | priority                       | enum            | Case priority Allowed enum values: `NOT_DEFINED,P1,P2,P3,P4,P5`                                                                                                                                       |
| attributes    | status                         | enum            | **DEPRECATED**: Deprecated way of representing the case status, which only supports OPEN, IN_PROGRESS, and CLOSED statuses. Use `status_name` instead. Allowed enum values: `OPEN,IN_PROGRESS,CLOSED` |
| attributes    | title                          | string          | Title of the case.                                                                                                                                                                                    |
| attributes    | type                           | string          | Type of the case.                                                                                                                                                                                     |
| Option 1      | id [*required*]           | string          | Case identifier.                                                                                                                                                                                      |
| Option 1      | relationships                  | object          | Resources related to a case.                                                                                                                                                                          |
| relationships | assignee                       | object          | Relationship to user.                                                                                                                                                                                 |
| assignee      | data [*required*]         | object          | Relationship to user object.                                                                                                                                                                          |
| data          | id [*required*]           | string          | A unique identifier that represents the user.                                                                                                                                                         |
| data          | type [*required*]         | enum            | User resource type. Allowed enum values: `user`                                                                                                                                                       |
| relationships | created_by                     | object          | Relationship to user.                                                                                                                                                                                 |
| created_by    | data [*required*]         | object          | Relationship to user object.                                                                                                                                                                          |
| data          | id [*required*]           | string          | A unique identifier that represents the user.                                                                                                                                                         |
| data          | type [*required*]         | enum            | User resource type. Allowed enum values: `user`                                                                                                                                                       |
| relationships | modified_by                    | object          | Relationship to user.                                                                                                                                                                                 |
| modified_by   | data [*required*]         | object          | Relationship to user object.                                                                                                                                                                          |
| data          | id [*required*]           | string          | A unique identifier that represents the user.                                                                                                                                                         |
| data          | type [*required*]         | enum            | User resource type. Allowed enum values: `user`                                                                                                                                                       |
| relationships | project                        | object          | Relationship to project.                                                                                                                                                                              |
| project       | data [*required*]         | object          | Relationship to project object.                                                                                                                                                                       |
| data          | id [*required*]           | string          | A unique identifier that represents the project.                                                                                                                                                      |
| data          | type [*required*]         | enum            | Project resource type. Allowed enum values: `project`                                                                                                                                                 |
| Option 1      | type [*required*]         | enum            | Type of the object. Allowed enum values: `case`                                                                                                                                                       |
| included      | Option 2                       | object          | The user to whom the issue is assigned.                                                                                                                                                               |
| Option 2      | attributes [*required*]   | object          | Object containing the information of a user.                                                                                                                                                          |
| attributes    | email                          | string          | Email of the user.                                                                                                                                                                                    |
| attributes    | handle                         | string          | Handle of the user.                                                                                                                                                                                   |
| attributes    | name                           | string          | Name of the user.                                                                                                                                                                                     |
| Option 2      | id [*required*]           | string          | User identifier.                                                                                                                                                                                      |
| Option 2      | type [*required*]         | enum            | Type of the object Allowed enum values: `user`                                                                                                                                                        |
| included      | Option 3                       | object          | A team that owns an issue.                                                                                                                                                                            |
| Option 3      | attributes [*required*]   | object          | Object containing the information of a team.                                                                                                                                                          |
| attributes    | handle                         | string          | The team's identifier.                                                                                                                                                                                |
| attributes    | name                           | string          | The name of the team.                                                                                                                                                                                 |
| attributes    | summary                        | string          | A brief summary of the team, derived from its description.                                                                                                                                            |
| Option 3      | id [*required*]           | string          | Team identifier.                                                                                                                                                                                      |
| Option 3      | type [*required*]         | enum            | Type of the object. Allowed enum values: `team`                                                                                                                                                       |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "error_message": "object of type 'NoneType' has no len()",
      "error_type": "builtins.TypeError",
      "file_path": "/django-email/conduit/apps/core/utils.py",
      "first_seen": 1671612804001,
      "first_seen_version": "aaf65cd0",
      "function_name": "filter_forbidden_tags",
      "is_crash": false,
      "languages": [
        "PYTHON",
        "GO"
      ],
      "last_seen": 1671620003100,
      "last_seen_version": "b6199f80",
      "platform": "BACKEND",
      "regression": {
        "regressed_at": "2024-01-03T08:00:00Z",
        "regressed_at_version": "v2.5.2",
        "resolved_at": "2024-01-01T10:00:00Z"
      },
      "service": "email-api-py",
      "state": "RESOLVED"
    },
    "id": "c1726a66-1f64-11ee-b338-da7ad0900002",
    "relationships": {
      "assignee": {
        "data": {
          "id": "87cb11a0-278c-440a-99fe-701223c80296",
          "type": "user"
        }
      },
      "case": {
        "data": {
          "id": "2841440d-e780-4fe2-96cd-6a8c1d194da5",
          "type": "case"
        }
      },
      "team_owners": {
        "data": [
          {
            "id": "221b0179-6447-4d03-91c3-3ca98bf60e8a",
            "type": "team"
          }
        ]
      }
    },
    "type": "issue"
  },
  "included": [
    {
      "attributes": {
        "archived_at": "2025-01-01T00:00:00Z",
        "closed_at": "2025-01-01T00:00:00Z",
        "created_at": "2025-01-01T00:00:00Z",
        "creation_source": "ERROR_TRACKING",
        "description": "string",
        "due_date": "2025-01-01",
        "insights": [
          {
            "ref": "/error-tracking?issueId=2841440d-e780-4fe2-96cd-6a8c1d194da5",
            "resource_id": "2841440d-e780-4fe2-96cd-6a8c1d194da5",
            "type": "ERROR_TRACKING"
          }
        ],
        "jira_issue": {
          "error_message": "",
          "result": {
            "account_id": "abcd1234-5678-90ab-cdef-1234567890ab",
            "issue_id": "1904866",
            "issue_key": "ET-123",
            "issue_url": "https://your-jira-instance.atlassian.net/browse/ET-123",
            "project_id": "10001",
            "project_key": "ET"
          },
          "status": "COMPLETED"
        },
        "key": "ET-123",
        "linear_issue": {
          "error_message": "",
          "result": {
            "account_id": "abcd1234-5678-90ab-cdef-1234567890ab",
            "issue_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
            "issue_key": "ENG-123",
            "issue_url": "https://linear.app/your-workspace/issue/ENG-123",
            "team_id": "f1e2d3c4-5678-90ab-cdef-1234567890ab"
          },
          "status": "COMPLETED"
        },
        "modified_at": "2025-01-01T00:00:00Z",
        "priority": "NOT_DEFINED",
        "status": "OPEN",
        "title": "Error: HTTP error",
        "type": "ERROR_TRACKING_ISSUE"
      },
      "id": "2841440d-e780-4fe2-96cd-6a8c1d194da5",
      "relationships": {
        "assignee": {
          "data": {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        },
        "created_by": {
          "data": {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        },
        "modified_by": {
          "data": {
            "id": "00000000-0000-0000-0000-000000000000",
            "type": "user"
          }
        },
        "project": {
          "data": {
            "id": "e555e290-ed65-49bd-ae18-8acbfcf18db7",
            "type": "project"
          }
        }
      },
      "type": "case"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
 \# Path parameters export issue_id="c1726a66-1f64-11ee-b338-da7ad0900002" \# Curl command curl -X PUT "https://api.datadoghq.com/api/v2/error-tracking/issues/${issue_id}/assignee" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "id": "87cb11a0-278c-440a-99fe-701223c80296",
    "type": "assignee"
  }
}
EOF 
                        
##### 

```go
// Update the assignee of an issue returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	// there is a valid "issue" in the system
	IssueID := os.Getenv("ISSUE_ID")

	body := datadogV2.IssueUpdateAssigneeRequest{
		Data: datadogV2.IssueUpdateAssigneeRequestData{
			Id:   "87cb11a0-278c-440a-99fe-701223c80296",
			Type: datadogV2.ISSUEUPDATEASSIGNEEREQUESTDATATYPE_ASSIGNEE,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewErrorTrackingApi(apiClient)
	resp, r, err := api.UpdateIssueAssignee(ctx, IssueID, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ErrorTrackingApi.UpdateIssueAssignee`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `ErrorTrackingApi.UpdateIssueAssignee`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Update the assignee of an issue returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ErrorTrackingApi;
import com.datadog.api.client.v2.model.IssueResponse;
import com.datadog.api.client.v2.model.IssueUpdateAssigneeRequest;
import com.datadog.api.client.v2.model.IssueUpdateAssigneeRequestData;
import com.datadog.api.client.v2.model.IssueUpdateAssigneeRequestDataType;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    ErrorTrackingApi apiInstance = new ErrorTrackingApi(defaultClient);

    // there is a valid "issue" in the system
    String ISSUE_ID = System.getenv("ISSUE_ID");

    IssueUpdateAssigneeRequest body =
        new IssueUpdateAssigneeRequest()
            .data(
                new IssueUpdateAssigneeRequestData()
                    .id("87cb11a0-278c-440a-99fe-701223c80296")
                    .type(IssueUpdateAssigneeRequestDataType.ASSIGNEE));

    try {
      IssueResponse result = apiInstance.updateIssueAssignee(ISSUE_ID, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ErrorTrackingApi#updateIssueAssignee");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```python
"""
Update the assignee of an issue returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.error_tracking_api import ErrorTrackingApi
from datadog_api_client.v2.model.issue_update_assignee_request import IssueUpdateAssigneeRequest
from datadog_api_client.v2.model.issue_update_assignee_request_data import IssueUpdateAssigneeRequestData
from datadog_api_client.v2.model.issue_update_assignee_request_data_type import IssueUpdateAssigneeRequestDataType

# there is a valid "issue" in the system
ISSUE_ID = environ["ISSUE_ID"]

body = IssueUpdateAssigneeRequest(
    data=IssueUpdateAssigneeRequestData(
        id="87cb11a0-278c-440a-99fe-701223c80296",
        type=IssueUpdateAssigneeRequestDataType.ASSIGNEE,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = ErrorTrackingApi(api_client)
    response = api_instance.update_issue_assignee(issue_id=ISSUE_ID, body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Update the assignee of an issue returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::ErrorTrackingAPI.new

# there is a valid "issue" in the system
ISSUE_ID = ENV["ISSUE_ID"]

body = DatadogAPIClient::V2::IssueUpdateAssigneeRequest.new({
  data: DatadogAPIClient::V2::IssueUpdateAssigneeRequestData.new({
    id: "87cb11a0-278c-440a-99fe-701223c80296",
    type: DatadogAPIClient::V2::IssueUpdateAssigneeRequestDataType::ASSIGNEE,
  }),
})
p api_instance.update_issue_assignee(ISSUE_ID, body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```rust
// Update the assignee of an issue returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_error_tracking::ErrorTrackingAPI;
use datadog_api_client::datadogV2::model::IssueUpdateAssigneeRequest;
use datadog_api_client::datadogV2::model::IssueUpdateAssigneeRequestData;
use datadog_api_client::datadogV2::model::IssueUpdateAssigneeRequestDataType;

#[tokio::main]
async fn main() {
    // there is a valid "issue" in the system
    let issue_id = std::env::var("ISSUE_ID").unwrap();
    let body = IssueUpdateAssigneeRequest::new(IssueUpdateAssigneeRequestData::new(
        "87cb11a0-278c-440a-99fe-701223c80296".to_string(),
        IssueUpdateAssigneeRequestDataType::ASSIGNEE,
    ));
    let configuration = datadog::Configuration::new();
    let api = ErrorTrackingAPI::with_config(configuration);
    let resp = api.update_issue_assignee(issue_id.clone(), body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Update the assignee of an issue returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.ErrorTrackingApi(configuration);

// there is a valid "issue" in the system
const ISSUE_ID = process.env.ISSUE_ID as string;

const params: v2.ErrorTrackingApiUpdateIssueAssigneeRequest = {
  body: {
    data: {
      id: "87cb11a0-278c-440a-99fe-701223c80296",
      type: "assignee",
    },
  },
  issueId: ISSUE_ID,
};

apiInstance
  .updateIssueAssignee(params)
  .then((data: v2.IssueResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
