XNAT Tools

Client Tools

XNAT Desktop


Web Services

Web Services: XNAT Rest API

Web Services: Examples

[Edit Nav] ]

How to Create Subjects

Creating subjects via the XNAT REST API is simple. Performing a POST to the following URI would create a subject.

/REST/projects/TEST/subjects/1 (This would create a subject called '1' within the project 'TEST').

FYI, the project must exist before this command will succeed.

You can also assign demographics to this subject using the XML PATH shortcuts defined here.

To assign the gender and handedness to this subject, you would use the following POST.


Review the list of XML PATH shortcuts for a comprehensive list of the available fields.