# Update Permanent Supporting Document

Update the external reference of a single Permanent Supporting Document owned by your
account.

Only `external_reference_id` can be updated. The `files`, `template`, `identity`,
and `created_at` values cannot be changed. To replace the document content, template, or
identity, [create a new Permanent Supporting Document](create-permanent-document.html);
creating a document for the same template and identity supersedes the previous one.

## Request

HTTP Method: `PATCH`

URI Path: `/v3/permanent_supporting_documents/{id}`

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| id | `string` | Yes | Unique ID identifier of the Permanent Supporting Document. |

### Request Body Object Attributes

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| external\_reference\_id | `string` | No | Optional identifier for the permanent supporting document in the customer's external system. Maximum length is 100 characters. |

## Examples

Update external\_reference\_id

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/permanent_supporting_documents/d1a1a686-969a-4c02-954c-ae500ba74a1d HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "d1a1a686-969a-4c02-954c-ae500ba74a1d",
10    "type": "permanent_supporting_documents",
11    "attributes": {
12      "external_reference_id": "test"
13    }
14  }
15}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/permanent_supporting_documents/d1a1a686-969a-4c02-954c-ae500ba74a1d -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"external_reference_id": "test"}, "id": "d1a1a686-969a-4c02-954c-ae500ba74a1d", "type": "permanent_supporting_documents"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "d1a1a686-969a-4c02-954c-ae500ba74a1d",
 7    "type": "permanent_supporting_documents",
 8    "attributes": {
 9      "created_at": "2021-03-28T18:51:59.590Z",
10      "external_reference_id": "test"
11    },
12    "relationships": {
13      "template": {
14        "links": {
15          "self": "https://api.didww.com/v3/permanent_supporting_documents/d1a1a686-969a-4c02-954c-ae500ba74a1d/relationships/template",
16          "related": "https://api.didww.com/v3/permanent_supporting_documents/d1a1a686-969a-4c02-954c-ae500ba74a1d/template"
17        }
18      },
19      "identity": {
20        "links": {
21          "self": "https://api.didww.com/v3/permanent_supporting_documents/d1a1a686-969a-4c02-954c-ae500ba74a1d/relationships/identity",
22          "related": "https://api.didww.com/v3/permanent_supporting_documents/d1a1a686-969a-4c02-954c-ae500ba74a1d/identity"
23        }
24      }
25    }
26  },
27  "meta": {
28    "api_version": "2026-11-19"
29  }
30}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 404 | No | [Not Found](../../../specification/errors/index.html#api-not-found) |
| 400 | No | [Bad Request](../../../specification/errors/index.html#api-bad-request) |
| 401 | No | [Unauthorized](../../authentication.html#authentication-v35) |
| 403 | No | The access token carries the `read` scope, which does not cover this method (title `Insufficient scope`). The response carries `WWW-Authenticate: Bearer error="insufficient_scope"`. See [Scopes](../../authentication.html#authentication-scopes-v35). |
| 422 | No | [Validation error](../../../specification/errors/index.html#api-validation-error-object). `external_reference_id` is longer than 100 characters. |
| 429 | No | The request budget of the account for the current window is spent (`too_many_requests`). `Retry-After` gives the number of seconds to wait. |
