Skip to content

Create Application

Request

Create a new application. The application will be created in the system and an email will be sent to the applicant requesting consent.

Security
bearer
Headers
ProjectIdstring, (uuid)required
Example:e6b01018-a333-4732-917e-fe38e91b0fdf
Bodyapplication/jsonrequired
idstring, (uuid)required
Example:"c8ec1d54-a85c-411f-aa12-fd3a7f2480f4"
firstNamestringrequired
Example:"David"
lastNamestringrequired
Example:"Mann"
birthDatestring, (yyyy-mm-dd)required
Example:"2023-05-26"
addressPostalCodestring, <= 10 charactersrequired
Example:"55401"
sexAtBirthstringrequired
Enum:"male""female""unknown"
emailAddressstring, (email)required
Example:"david.mann@example.com"
middleNamestring

Full middle name or a bare initial; omit if the applicant has none.

Example:"Quincy"
addressLine1string
Example:"123 Main St."
addressLine2string
Example:"Apt 4B"
addressCitystring
Example:"Minneapolis"
addressStatestring, (XX)

Two letter state code

Example:"MN"
phoneNumberstring
Example:"123-456-7890"
cohortIdstring, (uuid)
Example:"f46c52af-820b-4169-82af-b740b54d8bb5"
onConsentWebhookUrlstring

Webhook URL to invoke when an applicant accepts or denies consent.

Example:"https://example.com/webhooks/consent"
onIdentityValidationWebhookUrlstring

Webhook URL to invoke when there's a result for an applicant's identity validation.

Example:"https://example.com/webhooks/identity-validation"
onQueryResultWebhookUrlstring

Webhook URL to invoke when there's a result for an applicant's EHR query.

Example:"https://example.com/webhooks/ehr-query"
curl -i -X POST \
  https://partner.xcures.com/api/v1/patient-registry/application \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'ProjectId: e6b01018-a333-4732-917e-fe38e91b0fdf' \
  -d '{
    "id": "c8ec1d54-a85c-411f-aa12-fd3a7f2480f4",
    "firstName": "David",
    "middleName": "Quincy",
    "lastName": "Mann",
    "birthDate": "2023-05-26",
    "addressLine1": "123 Main St.",
    "addressLine2": "Apt 4B",
    "addressCity": "Minneapolis",
    "addressState": "MN",
    "addressPostalCode": "55401",
    "sexAtBirth": "male",
    "emailAddress": "david.mann@example.com",
    "phoneNumber": "123-456-7890",
    "cohortId": "f46c52af-820b-4169-82af-b740b54d8bb5",
    "onConsentWebhookUrl": "https://example.com/webhooks/consent",
    "onIdentityValidationWebhookUrl": "https://example.com/webhooks/identity-validation",
    "onQueryResultWebhookUrl": "https://example.com/webhooks/ehr-query"
  }'

Responses

Bodyapplication/json
idstring, (uuid)required
Example:"c8ec1d54-a85c-411f-aa12-fd3a7f2480f4"
createdstring, (ISO 8601)read-onlyrequired
Example:"2025-05-26T23:30:40.912Z"
updatedstring, (ISO 8601)read-onlyrequired
Example:"2025-05-26T23:30:40.912Z"
firstNamestringrequired
Example:"David"
lastNamestringrequired
Example:"Mann"
birthDatestring, (yyyy-mm-dd)required
Example:"2023-05-26"
addressPostalCodestring, <= 10 charactersrequired
Example:"55401"
sexAtBirthstringrequired
Enum:"male""female""unknown"
emailAddressstring, (email)required
Example:"david.mann@example.com"
middleNamestring

Full middle name or a bare initial; omit if the applicant has none.

Example:"Quincy"
addressLine1string
Example:"123 Main St."
addressLine2string
Example:"Apt 4B"
addressCitystring
Example:"Minneapolis"
addressStatestring, (XX)

Two letter state code

Example:"MN"
phoneNumberstring
Example:"123-456-7890"
cohortIdstring, (uuid)
Example:"f46c52af-820b-4169-82af-b740b54d8bb5"
cohortNamestring
Example:"Cohort A"
consentAcceptedboolean
onConsentWebhookUrlstring

Webhook URL to invoke when an applicant accepts or denies consent.

Example:"https://example.com/webhooks/consent"
onIdentityValidationWebhookUrlstring

Webhook URL to invoke when there's a result for an applicant's identity validation.

Example:"https://example.com/webhooks/identity-validation"
onQueryResultWebhookUrlstring

Webhook URL to invoke when there's a result for an applicant's EHR query.

Example:"https://example.com/webhooks/ehr-query"
Response
{ "id": "c8ec1d54-a85c-411f-aa12-fd3a7f2480f4", "created": "2025-05-26T23:30:40.912Z", "updated": "2025-05-26T23:30:40.912Z", "firstName": "David", "middleName": "Quincy", "lastName": "Mann", "birthDate": "2023-05-26", "addressLine1": "123 Main St.", "addressLine2": "Apt 4B", "addressCity": "Minneapolis", "addressState": "MN", "addressPostalCode": "55401", "sexAtBirth": "male", "emailAddress": "david.mann@example.com", "phoneNumber": "123-456-7890", "cohortId": "f46c52af-820b-4169-82af-b740b54d8bb5", "cohortName": "Cohort A", "consentAccepted": true, "onConsentWebhookUrl": "https://example.com/webhooks/consent", "onIdentityValidationWebhookUrl": "https://example.com/webhooks/identity-validation", "onQueryResultWebhookUrl": "https://example.com/webhooks/ehr-query" }