Create Proof#
Description
Creates an identity proof.
Request#
HTTP Method: POST
URI Path: /v3/proofs
Request Body Object Relationships:
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
files |
|
Yes |
The ID of encrypted files associated to this proof. |
proof_types |
|
Yes |
The ID of proof type associated to this proof. |
entity |
|
Yes |
Allowed entity types: |
Examples#
http
1POST /v3/proofs 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": "proofs",
10 "relationships": {
11 "files": {
12 "data": [
13 {
14 "id": "cc52b6b3-0627-47d3-a1c9-b54d3de42813",
15 "type": "encrypted_files"
16 }
17 ]
18 },
19 "proof_type": {
20 "data": {
21 "id": "d2c1b3fb-29f7-46ca-ba82-b617f4630b78",
22 "type": "proof_types"
23 }
24 },
25 "entity": {
26 "data": {
27 "id": "54c92d8e-f135-4b55-ac48-748d44437509",
28 "type": "identities"
29 }
30 }
31 }
32 }
33}
curl
1curl -i -X POST https://api.didww.com/v3/proofs -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"relationships": {"entity": {"data": {"id": "54c92d8e-f135-4b55-ac48-748d44437509", "type": "identities"}}, "files": {"data": [{"id": "cc52b6b3-0627-47d3-a1c9-b54d3de42813", "type": "encrypted_files"}]}, "proof_type": {"data": {"id": "d2c1b3fb-29f7-46ca-ba82-b617f4630b78", "type": "proof_types"}}}, "type": "proofs"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "84155378-88d5-456e-844d-103596e3fb2c",
7 "type": "proofs",
8 "attributes": {
9 "created_at": "2021-03-28T18:01:50.387Z",
10 "expires_at": null
11 },
12 "relationships": {
13 "proof_type": {
14 "links": {
15 "self": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/relationships/proof_type",
16 "related": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/proof_type"
17 }
18 },
19 "entity": {
20 "links": {
21 "self": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/relationships/entity",
22 "related": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/entity"
23 }
24 }
25 }
26 },
27 "meta": {
28 "api_version": "2021-12-15"
29 }
30}
http
1POST /v3/proofs 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": "proofs",
10 "relationships": {
11 "files": {
12 "data": [
13 {
14 "id": "cc52b6b3-0627-47d3-a1c9-b54d3de42813",
15 "type": "encrypted_files"
16 }
17 ]
18 },
19 "proof_type": {
20 "data": {
21 "id": "d2c1b3fb-29f7-46ca-ba82-b617f4630b78",
22 "type": "proof_types"
23 }
24 },
25 "entity": {
26 "data": {
27 "id": "54c92d8e-f135-4b55-ac48-748d44437509",
28 "type": "addresses"
29 }
30 }
31 }
32 }
33}
curl
1curl -i -X POST https://api.didww.com/v3/proofs -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"relationships": {"entity": {"data": {"id": "54c92d8e-f135-4b55-ac48-748d44437509", "type": "addresses"}}, "files": {"data": [{"id": "cc52b6b3-0627-47d3-a1c9-b54d3de42813", "type": "encrypted_files"}]}, "proof_type": {"data": {"id": "d2c1b3fb-29f7-46ca-ba82-b617f4630b78", "type": "proof_types"}}}, "type": "proofs"}}'
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "84155378-88d5-456e-844d-103596e3fb2c",
7 "type": "proofs",
8 "attributes": {
9 "created_at": "2021-03-28T18:01:50.387Z",
10 "expires_at": null
11 },
12 "relationships": {
13 "proof_type": {
14 "links": {
15 "self": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/relationships/proof_type",
16 "related": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/proof_type"
17 }
18 },
19 "entity": {
20 "links": {
21 "self": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/relationships/entity",
22 "related": "https://sandbox-api.didww.com/v3/proofs/84155378-88d5-456e-844d-103596e3fb2c/entity"
23 }
24 }
25 }
26 },
27 "meta": {
28 "api_version": "2021-12-15"
29 }
30}
Other Responses#
Code |
Success |
Description |
|---|---|---|
401 |
No |