Skip to main content
POST
/
certificates?type=url
Create a certificate from a website content.
curl --request POST \
  --url 'https://lab.trustos.telefonicatech.com/cert/v2/certificates?type=url' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Certificate",
  "description": "Certificate description",
  "url": "https://trustos.telefonicatech.com/politica-privacidad/",
  "content": {},
  "public": true,
  "expires": 1234567890,
  "certificatePin": "1234",
  "externalId": "extcertid"
}'
{
  "statusCode": 201,
  "message": "Certificate created",
  "data": {
    "certID": "did:local:certid:123124",
    "data": {
      "name": "Certificate",
      "description": "Certificate description",
      "type": "content",
      "content": {},
      "issuer": "did:user:{issuer}",
      "issuedOn": 1696840286580,
      "hash": "a2ac9343a3d94e41bbc5c152fb8382c5233a47cee23cf765c7e6d67d9e61a142",
      "expires": 1696840286580
    },
    "metadata": [
      {
        "type": "Evidence",
        "networkId": 10004,
        "smartContract": "0xabcdbcbff5fa05e060e7dfe3e608cba010d11abc",
        "transactionHash": "0xabcdbcbff5fa05e060e7dfe3e608cba010d11abc",
        "trustPointHash": "a2ac9343a3d94e41bbc5c152fb8382c5233a47cee23cf765c7e6d67d9e61a142",
        "timestamp": 1696840286580
      }
    ],
    "access": {
      "public": true,
      "certificatePin": "1234",
      "externalId": "extcertid"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

qualified
boolean

Flag that indicates whether the certificate should be qualified sign.

networkId
string
required

Network identifier where the trustpoint will be registered.

Example:

10004

Body

application/json

Data needed for the creation of a certificate from a website content.

name
string
required

Name of the certificate.

Example:

"Certificate"

description
string
required

Description of the certificate.

Example:

"Certificate description"

url
string
required

URL of the website that is going to be certified.

Example:

"https://trustos.telefonicatech.com/politica-privacidad/"

content
object

Additional content properties of the certificate.

Example:
{}
public
boolean

Flag that indicates whether the certificate is public or not.

expires
number

Timestamp of the expiration date of the certificate.

Example:

1234567890

certificatePin
string

PIN of the certificate.

Example:

"1234"

externalId
string

Custom identifier of the certificate.

Example:

"extcertid"

Response

Successful certificate creation.

statusCode
integer

Request status code.

Example:

201

message
string

Message returned by the request.

Example:

"Certificate created"

data
object

Data returned by the request.

I