Update DID#
Description
Update the settings of a single DID owned by your account. Using this endpoint you can cancel, restore or renew DID.
To cancel a DID, attribute terminated must be true, to renew or restore DID attribute terminated must be false.
Request#
HTTP Method: PATCH
URI Path: /v3/dids/
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
id |
|
Yes |
Unique ID number allocated to this DID. |
include |
|
Optional |
Includes:
Value |
Description |
|---|---|
trunk |
Attributes
Name |
Type |
Is Required? | Description |
|
|---|---|---|---|
terminated |
|
Optional |
If set to |
description |
|
Optional |
A DID number description. |
billing_cycles_count |
|
Optional |
The number of Billing Cycles that this DID Number will renew until expiration. |
dedicated_channels_count |
|
Optional |
Amount of dedicated channels to assign. |
capacity_limit |
|
Optional |
Limits incoming capacity per DID number according to entered value. If set as |
Examples#
http
1PATCH /v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "id": "46e129f1-deaa-44db-8915-2646de4d4c70",
10 "type": "dids",
11 "attributes": {
12 "terminated": false,
13 "description": "string",
14 "capacity_limit": 1
15 }
16 }
17}
curl
1curl -i -X PATCH https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"capacity_limit": 1, "description": "string", "terminated": false}, "id": "46e129f1-deaa-44db-8915-2646de4d4c70", "type": "dids"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "46e129f1-deaa-44db-8915-2646de4d4c70",
7 "type": "dids",
8 "attributes": {
9 "blocked": false,
10 "capacity_limit": 1,
11 "description": "string",
12 "terminated": false,
13 "awaiting_registration": false,
14 "number": "437xxxxxxxxx",
15 "expires_at": "2017-06-25T08:21:41.795Z",
16 "channels_included_count": 2,
17 "created_at": "2017-06-25T08:21:41.795Z",
18 "dedicated_channels_count": 0
19 }
20 },
21 "relationships": {
22 "did_group": {
23 "links": {
24 "self": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/relationships/did_group",
25 "related": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/did_group"
26 }
27 },
28 "order": {
29 "links": {
30 "self": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/relationships/order",
31 "related": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/order"
32 }
33 },
34 "trunk": {
35 "links": {
36 "self": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/relationships/trunk",
37 "related": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/trunk"
38 }
39 },
40 "trunk_group": {
41 "links": {
42 "self": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/relationships/trunk_group",
43 "related": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/trunk_group"
44 }
45 },
46 "capacity_pool": {
47 "links": {
48 "self": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/relationships/capacity_pool",
49 "related": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/capacity_pool"
50 }
51 },
52 "shared_capacity_group": {
53 "links": {
54 "self": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/relationships/shared_capacity_group",
55 "related": "https://api.didww.com/v3/dids/46e129f1-deaa-44db-8915-2646de4d4c70/shared_capacity_group"
56 }
57 }
58 }
59}
http
1PATCH /v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "id": "3505b18a-3019-47bc-95d1-0f9ec7766fd5",
10 "type": "dids",
11 "relationships": {
12 "trunk": {
13 "data": {
14 "type": "trunks",
15 "id": "c80d096a-c8cf-4449-aa6d-8bac39130fe0"
16 }
17 }
18 }
19 }
20}
curl
1curl -i -X PATCH https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"id": "3505b18a-3019-47bc-95d1-0f9ec7766fd5", "relationships": {"trunk": {"data": {"id": "c80d096a-c8cf-4449-aa6d-8bac39130fe0", "type": "trunks"}}}, "type": "dids"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "3505b18a-3019-47bc-95d1-0f9ec7766fd5",
7 "type": "dids",
8 "attributes": {
9 "blocked": false,
10 "capacity_limit": 1,
11 "description": "string",
12 "terminated": false,
13 "awaiting_registration": false,
14 "number": "437xxxxxxxxx",
15 "expires_at": "2017-06-25T08:21:41.795Z",
16 "channels_included_count": 2,
17 "created_at": "2017-06-25T08:21:41.795Z",
18 "dedicated_channels_count": 0
19 },
20 "relationships": {
21 "did_group": {
22 "links": {
23 "self": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/relationships/did_group",
24 "related": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/did_group"
25 }
26 },
27 "order": {
28 "links": {
29 "self": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/relationships/order",
30 "related": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/order"
31 }
32 },
33 "trunk": {
34 "links": {
35 "self": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/relationships/trunk",
36 "related": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/trunk"
37 }
38 },
39 "trunk_group": {
40 "links": {
41 "self": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/relationships/trunk_group",
42 "related": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/trunk_group"
43 }
44 },
45 "capacity_pool": {
46 "links": {
47 "self": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/relationships/capacity_pool",
48 "related": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/capacity_pool"
49 }
50 },
51 "shared_capacity_group": {
52 "links": {
53 "self": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/relationships/shared_capacity_group",
54 "related": "https://api.didww.com/v3/dids/3505b18a-3019-47bc-95d1-0f9ec7766fd5/shared_capacity_group"
55 }
56 }
57 }
58 }
59}
http
1PATCH /v3/dids/3e3f57ec-0541-473a-af63-103216d19db3 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "id": "3e3f57ec-0541-473a-af63-103216d19db3",
10 "type": "dids",
11 "relationships": {
12 "trunk_group": {
13 "data": {
14 "type": "trunk_groups",
15 "id": "1dc6e448-d9d8-4da8-a34b-21459b03112f"
16 }
17 }
18 }
19 }
20}
curl
1curl -i -X PATCH https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"id": "3e3f57ec-0541-473a-af63-103216d19db3", "relationships": {"trunk_group": {"data": {"id": "1dc6e448-d9d8-4da8-a34b-21459b03112f", "type": "trunk_groups"}}}, "type": "dids"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "3e3f57ec-0541-473a-af63-103216d19db3",
7 "type": "dids",
8 "attributes": {
9 "blocked": false,
10 "capacity_limit": 1,
11 "description": "string",
12 "terminated": false,
13 "awaiting_registration": false,
14 "number": "437xxxxxxxxx",
15 "expires_at": "2017-06-25T08:21:41.795Z",
16 "channels_included_count": 2,
17 "created_at": "2017-06-25T08:21:41.795Z",
18 "dedicated_channels_count": 0
19 }
20 },
21 "relationships": {
22 "did_group": {
23 "links": {
24 "self": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/relationships/did_group",
25 "related": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/did_group"
26 }
27 },
28 "order": {
29 "links": {
30 "self": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/relationships/order",
31 "related": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/order"
32 }
33 },
34 "trunk": {
35 "links": {
36 "self": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/relationships/trunk",
37 "related": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/trunk"
38 }
39 },
40 "trunk_group": {
41 "links": {
42 "self": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/relationships/trunk_group",
43 "related": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/trunk_group"
44 }
45 },
46 "capacity_pool": {
47 "links": {
48 "self": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/relationships/capacity_pool",
49 "related": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/capacity_pool"
50 }
51 },
52 "shared_capacity_group": {
53 "links": {
54 "self": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/relationships/shared_capacity_group",
55 "related": "https://api.didww.com/v3/dids/3e3f57ec-0541-473a-af63-103216d19db3/shared_capacity_group"
56 }
57 }
58 }
59}
http
1PATCH /v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "id": "a8d13b71-8f0b-4393-8992-ff5e4e7521f9",
10 "type": "dids",
11 "attributes": {
12 "dedicated_channels_count": 2
13 },
14 "relationships": {
15 "capacity_pool": {
16 "data": {
17 "type": "capacity_pools",
18 "id": "1eb75a47-38b6-4ec2-8990-fe249ffd7b92"
19 }
20 }
21 }
22 }
23}
curl
1curl -i -X PATCH https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"dedicated_channels_count": 2}, "id": "a8d13b71-8f0b-4393-8992-ff5e4e7521f9", "relationships": {"capacity_pool": {"data": {"id": "1eb75a47-38b6-4ec2-8990-fe249ffd7b92", "type": "capacity_pools"}}}, "type": "dids"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "a8d13b71-8f0b-4393-8992-ff5e4e7521f9",
7 "type": "dids",
8 "attributes": {
9 "blocked": false,
10 "capacity_limit": null,
11 "description": null,
12 "terminated": false,
13 "awaiting_registration": false,
14 "created_at": "2019-05-21T08:25:02.223Z",
15 "number": "4474183XXXXX",
16 "expires_at": "2019-06-21T08:25:13.367Z",
17 "channels_included_count": 2,
18 "dedicated_channels_count": 2
19 },
20 "relationships": {
21 "did_group": {
22 "links": {
23 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/did_group",
24 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/did_group"
25 }
26 },
27 "order": {
28 "links": {
29 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/order",
30 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/order"
31 }
32 },
33 "trunk": {
34 "links": {
35 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/trunk",
36 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/trunk"
37 }
38 },
39 "trunk_group": {
40 "links": {
41 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/trunk_group",
42 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/trunk_group"
43 }
44 },
45 "capacity_pool": {
46 "links": {
47 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/capacity_pool",
48 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/capacity_pool"
49 }
50 },
51 "shared_capacity_group": {
52 "links": {
53 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/shared_capacity_group",
54 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/shared_capacity_group"
55 }
56 }
57 }
58 }
59}
http
1PATCH /v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "id": "a8d13b71-8f0b-4393-8992-ff5e4e7521f9",
10 "type": "dids",
11 "relationships": {
12 "shared_capacity_group": {
13 "data": {
14 "type": "shared_capacity_groups",
15 "id": "8a581244-de83-4c46-ac0a-32659279169e"
16 }
17 }
18 }
19 }
20}
curl
1curl -i -X PATCH https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"id": "a8d13b71-8f0b-4393-8992-ff5e4e7521f9", "relationships": {"shared_capacity_group": {"data": {"id": "8a581244-de83-4c46-ac0a-32659279169e", "type": "shared_capacity_groups"}}}, "type": "dids"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "a8d13b71-8f0b-4393-8992-ff5e4e7521f9",
7 "type": "dids",
8 "attributes": {
9 "blocked": false,
10 "capacity_limit": null,
11 "description": null,
12 "terminated": false,
13 "awaiting_registration": false,
14 "created_at": "2019-05-21T08:25:02.223Z",
15 "number": "4474183XXXXX",
16 "expires_at": "2019-06-21T08:25:13.367Z",
17 "channels_included_count": 2,
18 "dedicated_channels_count": 2
19 },
20 "relationships": {
21 "did_group": {
22 "links": {
23 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/did_group",
24 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/did_group"
25 }
26 },
27 "order": {
28 "links": {
29 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/order",
30 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/order"
31 }
32 },
33 "trunk": {
34 "links": {
35 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/trunk",
36 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/trunk"
37 }
38 },
39 "trunk_group": {
40 "links": {
41 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/trunk_group",
42 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/trunk_group"
43 }
44 },
45 "capacity_pool": {
46 "links": {
47 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/capacity_pool",
48 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/capacity_pool"
49 }
50 },
51 "shared_capacity_group": {
52 "links": {
53 "self": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/relationships/shared_capacity_group",
54 "related": "https://api.didww.com/v3/dids/a8d13b71-8f0b-4393-8992-ff5e4e7521f9/shared_capacity_group"
55 }
56 }
57 }
58 }
59}
http
1PATCH /v3/dids/1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "type": "dids",
10 "id": "1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5",
11 "relationships": {
12 "trunk": {
13 "data": null
14 }
15 }
16 }
17}
curl
1curl -i -X PATCH https://api.didww.com/v3/dids/1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"id": "1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5", "relationships": {"trunk": {"data": null}}, "type": "dids"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
http
1PATCH /v3/dids/1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5 HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
6
7{
8 "data": {
9 "type": "dids",
10 "id": "1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5",
11 "relationships": {
12 "address_verification": {
13 "data": null
14 }
15 }
16 }
17}
curl
1curl -i -X PATCH https://api.didww.com/v3/dids/1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"id": "1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5", "relationships": {"address_verification": {"data": null}}, "type": "dids"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "1e0c45b1-1fea-4552-b41b-ffa9f5eb44c5",
7 "type": "dids",
8 "attributes": {
9 "blocked": false,
10 "capacity_limit": null,
11 "description": null,
12 "terminated": false,
13 "awaiting_registration": false,
14 "created_at": "2019-05-21T08:25:02.223Z",
15 "number": "4474183XXXXX",
16 "expires_at": "2019-06-21T08:25:13.367Z",
17 "channels_included_count": 2,
18 "dedicated_channels_count": 2
19 }
Other Responses#
Code |
Success |
Description |
|---|---|---|
404 |
No |
|
401 |
No |