# Subject registration

The first thing you need to do is create some public/private key material for your subjects. We use the term subjects for everything related to vendors, tenants, organizations and clients. Behind every subject there can be multiple DIDs ([decentralized identifiers](https://www.w3.org/TR/did-core/)). For most of the interactions with the Nuts node, you'll be using the subject identifier.

#### Create a subject

```http
POST /internal/vdr/v2/subject

{
  "subject": "my_subject_identifier"
}
```

See [API](https://nuts-node.readthedocs.io/en/latest/pages/integrating/api.html?urls.primaryName=Verifiable%20Data%20Registry%20(v2))

The `subject` in the POST body is optional. If not given, the subject identifier will be generated for you and returned in the result:

```json
{
  "subject": "my_subject_identifier",
  "documents": [
    {
      "id": "did:nuts:B8PUHs2AUHbFF1xLLK4eZjgErEcMXHxs68FteY7NDtCY",
      ...
    },
    {
      "id": "did:web:example.com:iam:657f064a-ebef-4f0f-aa87-88ed32db3142",
      ...
    }
  ]
}
```

You can now use these DIDs to issue and receive Verifiable Credentials.

#### List DIDs

For some operations you still need DIDs. Issuing credentials is an example. You can find your subject's DIDs by calling the following API:

```http
GET /internal/vdr/v2/subject/my_subject_identifier
```

Result:

```
[
  "did:nuts:B8PUHs2AUHbFF1xLLK4eZjgErEcMXHxs68FteY7NDtCY",
  "did:web:example.com:iam:657f064a-ebef-4f0f-aa87-88ed32db3142"
]
```