Create a Delegation

POST

/api/v1/delegations

Creates a new Delegation for an existing Profile

Request

curl --location 'https://nanotrust.io/api/v1/delegations?profile_id=PROFILE_ID' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer YOUR_TOKEN' \
    --data-raw '{
    "delegation": {
        "email": "lorem@ipsum.com"
        }
    }'

Query Params

Name Type Descriptipon
Profile_id String Profile id
Email String Email of the delegation

Responses

200

Delegation successfully created

{
"delegation": {
    "id": "1e301cd8-023f-4be9-b31c-7c535d050097",
    "user_id": null,
    "profile_id": "8ce34183-88fb-45ce-9a8d-a1e4c77e7642",
    "invited_at": null,
    "invitation_token": "wLoSBSjK4CkDUZRdPEybxiwB",
    "status": "pending",
    "created_at": "2023-03-06T14:16:56.641+01:00",
    "updated_at": "2023-03-06T14:16:56.641+01:00",
    "email": "heriberto_witting@reichert.net",
    "deleted_at": null
}
}

401

Invalid token You have not provided a profile_id parameter, we cannot return Credentials without a requested Profile