Castor EDC (also known as Castor CDMS) is a cloud-based electronic data capture (EDC) and clinical data management platform for clinical trials and other medical research. It supports participant (record) management, case report form (CRF) data collection, electronic patient-reported outcomes (ePRO) surveys, randomization, and study data export. The Castor public REST API lets you read and write study structure, records, and clinical data points programmatically.
Power end-to-end data operations for your Castor EDC API with Nexla. Our bi-directional Castor EDC connector is purpose-built for Castor EDC, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Castor EDC or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Castor EDC workflows fast, secure, and fully governed.
Features
Type: API
SourceDestination
Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
The Castor EDC API uses the industry-standard OAuth 2.0 client credentials grant for server-to-server authentication. Nexla connects to Castor on your behalf using a Client ID and Client Secret that are tied to your Castor user account. These credentials grant the same access to your studies and data as your Castor username and password, so they should be treated as sensitive secrets and stored securely.
Before creating a Castor EDC credential in Nexla, complete the steps below to obtain your API credentials and confirm the correct API base URL for your account.
Your API client credentials are available in your Castor account settings. Each Castor user has a unique Client ID and Client Secret.
Sign in to your Castor account at the regional URL for your organization (for example, https://data.castoredc.com).
In the top blue navigation bar, hover over Account, and then click Settings.
Open the Castor EDC API subtab to view your user credentials.
Copy the Client ID and Client Secret values for use in Nexla.
If a Client Secret has not yet been generated, or if you need to replace an existing one, use the option in the Castor EDC API subtab to generate a new secret. When you regenerate a Client Secret, any previously issued secrets become invalid immediately, so be sure to update Nexla with the most recent value. Storing your secret in a password manager is recommended.
Keep your credentials confidential
The Client ID and Client Secret provide the same access to your data as your own username and password. Do not share them with third parties unless you intend to grant those parties access to your studies and data through your account.
Castor operates separate regional environments, and your credentials are valid only on the environment where your studies are hosted. The Base URL identifies the regional API endpoint, and the Access Token URL is where Nexla exchanges your Client ID and Client Secret for an access token.
Base URL – Select the value that matches your Castor environment:
EU Production: https://data.castoredc.com/api
UK Production: https://uk.castoredc.com/api
US Production: https://us.castoredc.com/api
AU Production: https://au.castoredc.com/api
Sandbox: https://sandbox.castoredc.com/api
Access Token URL – The OAuth 2.0 token endpoint for your environment, formed by appending /oauth/token to your environment host (for example, https://data.castoredc.com/api/oauth/token for EU Production).
Complete API reference documentation for each regional environment is available at the corresponding base URL (for example, https://data.castoredc.com/api). Confirm that the region you select here matches the region where you log in to Castor.
After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
Enter the Client ID for your Castor user in the Client ID field. This is the unique public identifier assigned to your account in the Castor EDC API settings subtab.
Enter the Client Secret that accompanies your Client ID in the Client Secret field. This value is treated as a password and is stored securely. If you regenerate the secret in Castor at any time, update this field with the new value.
Enter the Access Token URL for your environment in the Access Token URL field (for example, https://data.castoredc.com/api/oauth/token for EU Production). Nexla sends a POST request to this URL to obtain an access token using the client credentials grant.
Select or enter the Base URL for your Castor environment in the Base URL field. This must match the region where your studies are hosted. The default value is https://data.castoredc.com/api (EU Production).
Click the Save button at the bottom of the overlay to save the configured credential. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Castor EDC connector tile, then select the credential that will be used to connect to the Castor EDC instance, and click Next; or, create a new Castor EDC credential for use in this flow.
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Castor EDC endpoints. Many Castor EDC endpoints are scoped to a specific study, and several are further scoped to a specific participant (record) or survey package instance — these templates require you to supply the relevant identifiers, all of which can be obtained from the higher-level list endpoints (for example, use Get Study to find Study IDs and List Study Records to find Record IDs). Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.
Get Current User
Retrieves information about the user account associated with the configured API credentials. Use this endpoint to confirm connectivity and identify the account Nexla is authenticating as.
No additional configuration is required beyond selecting this endpoint template. The endpoint returns the details of the currently authenticated user.
This is a useful first endpoint to test that your credential is valid and reaching the correct Castor environment.
Get Study
Retrieves the list of studies accessible to the authenticated user. Use this endpoint to discover the studies available in your account and to obtain the Study IDs required by most other Castor EDC endpoints.
No additional configuration is required beyond selecting this endpoint template. Results are paginated automatically, and Nexla fetches additional pages until all studies have been retrieved.
The Study ID returned by this endpoint is required to configure most study-scoped endpoints, such as List Study Records, List Study Fields, and Export Study Data.
Get Study By ID
Retrieves metadata for a single study identified by its Study ID. Use this endpoint when you already know the study you want and need its detailed metadata.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Get Audit Trail
Retrieves the audit trail records for a study, capturing changes and actions performed within the study. Use this endpoint for compliance, monitoring, or change-tracking workflows.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Countries
Retrieves the list of countries available in Castor. Use this reference data when mapping or validating country values used in study sites and records.
No additional configuration is required beyond selecting this endpoint template.
List Study Surveys
Retrieves the surveys defined in a study. Surveys are the building blocks of ePRO data collection in Castor.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Survey Packages
Retrieves the survey packages defined in a study. A survey package groups one or more surveys that are dispatched to participants together as an ePRO submission.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Study Sites
Retrieves the sites participating in a study. Sites represent the clinical locations enrolling participants.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Study Fields
Retrieves all fields defined in a study. Fields define the individual variables collected on CRFs and surveys and are an essential part of a study's data dictionary.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Field Dependencies
Retrieves the field dependencies defined in a study. Field dependencies control when fields are shown or hidden based on the values of other fields.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Field Validations
Retrieves the field validation rules defined in a study. Validations enforce data quality constraints, such as ranges and required values, on collected field data.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Study Forms
Retrieves all forms configured in a study. Forms (CRFs) organize fields into structured pages for data entry.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Study Roles
Retrieves all user roles defined in a study. Roles determine the permissions granted to users assigned to the study.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Field Option Groups
Retrieves all field option groups configured in a study. Option groups define the selectable answer options for choice-based fields.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Get Study Statistics
Returns statistical summary data for a study, including participant counts and data completion metrics. Use this endpoint for study-level progress reporting and dashboards.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Study Users
Returns all users assigned to a study. Use this endpoint for access review and user management reporting.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Study Visits
Returns all visit definitions configured in a study. Visits represent the scheduled time points at which data is collected for participants.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Study Records
Retrieves a paginated list of all participants (records) enrolled in a study. This is the primary endpoint for discovering Record IDs used by participant-scoped endpoints.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
In Castor, a "record" represents an individual study participant. The Record IDs returned here are required to configure endpoints such as Get Record, List Study Data Points, and List Record Survey Package Instances.
Get Record
Retrieves a single participant (record) by ID. Use this endpoint when you need the details of one specific participant.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint.
List Study Data Points
Retrieves the study-form data points (CRF answers) collected for a specific participant. Use this endpoint to extract the clinical field values entered for a participant's study forms.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint.
List Repeating Data Instances
Retrieves all instances of repeating-data (report) forms across a study, such as adverse events or concomitant medications. Repeating data captures information that can occur multiple times per participant.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
List Record Repeating Data Instances
Lists all repeating-data instances belonging to a specific participant. Use this endpoint to enumerate the repeating-data instances for one record before retrieving their data points.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint.
List Repeating Data Data Points
Retrieves the data points captured for a specific repeating-data instance on a participant. Use this endpoint to extract the field values recorded within a single repeating-data instance.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint.
Enter the identifier of the repeating-data instance in the Repeating Data Instance ID field. These IDs can be obtained from the List Repeating Data Instances or List Record Repeating Data Instances endpoints.
List Record Survey Package Instances
Retrieves all survey package instances (ePRO submissions) for a specific participant. Use this endpoint to track which surveys have been dispatched to or completed by a participant.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint.
List Survey Package Instance Data Points
Retrieves all survey data points collected for a specific survey package instance (ePRO submission). Use this endpoint to extract the survey responses captured for one dispatched survey package.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Enter the identifier of the survey package instance in the Survey Package Instance ID field. These IDs can be obtained from the List Record Survey Package Instances endpoint.
Export Study Data
Bulk-exports all clinical data (records and data points) for a study in a single response. Use this endpoint when you need a complete snapshot of a study's collected data rather than per-participant calls.
Enter the identifier of the study to export in the Study ID field. Study IDs can be obtained from the Get Study endpoint.
Study data exports can return large volumes of data. This endpoint is well suited for periodic full-data ingestion into a database or data warehouse.
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
Castor EDC data sources can also be manually configured to ingest data from any valid Castor EDC API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
Castor endpoints are built on your environment base URL—for example, https://data.castoredc.com/api/study/{'{study_id}'}/record to list records for a study, where {'{study_id}'} is the identifier of your study. Castor list endpoints return their records inside an _embedded object—for example, the List Study Records endpoint returns participants under $._embedded.records[*], and List Study Fields returns fields under $._embedded.fields[*]. Only Content-Type: application/json is required—the OAuth 2.0 Authorization header is added automatically by Nexla based on your credential configuration.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Castor EDC data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.
Click the + icon on the Nexset that will be sent to the Castor EDC destination, and select the Send to Destination option from the menu. Select the Castor EDC connector from the list of available destination connectors, then select the credential that will be used to connect to the Castor EDC organization, and click Next; or, create a new Castor EDC credential for use in this flow.
Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Castor EDC endpoints. Several Castor EDC write endpoints are scoped to a specific study, participant (record), or survey package instance, and require you to supply the relevant identifiers—these can be obtained from the corresponding list endpoints on the Castor EDC data source (for example, Get Study for Study IDs and List Study Records for Record IDs). Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.
Create Record
Enrolls a new participant (record) in a study. Use this endpoint to automate participant enrollment from an upstream data source.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Map the Nexset fields to the participant attributes expected by Castor in the request body, such as the assigned site.
Update Record
Updates participant metadata on an existing record, such as status, site assignment, or randomization details.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the participant to update in the Record ID field. Record IDs can be obtained from the List Study Records endpoint on the data source.
Randomize Record
Triggers randomization for a participant record using the study's configured randomization module. Use this endpoint to automate randomization as participants become eligible.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the participant to randomize in the Record ID field. Record IDs can be obtained from the List Study Records endpoint on the data source.
Randomization can only be triggered for studies that have a randomization module configured and for participants that meet the study's randomization criteria.
Create Site
Creates a new site within a study. Use this endpoint to automate study setup workflows that provision clinical sites.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Map the Nexset fields to the site attributes expected by Castor in the request body, such as name and abbreviation.
Update Site
Updates the attributes of an existing site, such as its name or abbreviation.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the site to update in the Site ID field. Site IDs can be obtained from the List Study Sites endpoint on the data source.
Post Study Data Points
Writes or updates study-form data points (CRF answers) for a participant. Use this endpoint to push collected field values into a participant's study forms.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint on the data source.
Create Repeating Data Instance
Creates a new repeating-data (report form) instance for a participant. A repeating-data instance must exist before data points can be posted to it.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint on the data source.
Update Repeating Data Instance
Updates the metadata of an existing repeating-data instance, such as its status or name.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint on the data source.
Enter the identifier of the repeating-data instance to update in the Repeating Data Instance ID field. These IDs can be obtained from the List Record Repeating Data Instances endpoint on the data source.
Post Repeating Data Data Points
Posts or upserts data points into an existing repeating-data instance for a participant.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint on the data source.
Enter the identifier of the repeating-data instance in the Repeating Data Instance ID field. These IDs can be obtained from the List Record Repeating Data Instances endpoint on the data source.
Delete Repeating Data Instance
Deletes a repeating-data instance from a participant record.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the participant in the Record ID field. Record IDs can be obtained from the List Study Records endpoint on the data source.
Enter the identifier of the repeating-data instance to delete in the Repeating Data Instance ID field. These IDs can be obtained from the List Record Repeating Data Instances endpoint on the data source.
Deleting a repeating-data instance removes the instance and its associated data points. Confirm that the instance is no longer needed before sending data to this endpoint.
Create Survey Package Instance
Creates and dispatches a new survey package instance (ePRO) to a participant. Use this endpoint to automate sending surveys to participants.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Map the Nexset fields to the survey package and participant attributes expected by Castor in the request body.
Update Survey Package Instance
Updates an existing survey package instance—for example, to reschedule the send date, mark it as finished, or resend it.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the survey package instance to update in the Survey Package Instance ID field. These IDs can be obtained from the List Record Survey Package Instances endpoint on the data source.
Post Survey Package Instance Data Points
Writes (creates or updates) data points for a survey package instance. Use this endpoint to pre-fill or correct ePRO survey responses.
Enter the identifier of the study in the Study ID field. Study IDs can be obtained from the Get Study endpoint on the data source.
Enter the identifier of the survey package instance in the Survey Package Instance ID field. These IDs can be obtained from the List Record Survey Package Instances endpoint on the data source.
Castor EDC destinations can also be manually configured to send data to any valid Castor EDC API endpoint, including additional write operations not covered by the pre-built templates. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.
Castor EDC write endpoints typically use POST to create resources or write data points, PATCH to update existing resources, and DELETE to remove resources. Endpoints are built on your environment base URL—for example, https://data.castoredc.com/api/study/{'{study_id}'}/record to create a record, where {'{study_id}'} is the identifier of your study; for update operations, include the ID of the object to be updated at the end of the URL. Castor EDC API endpoints accept JSON, and the OAuth 2.0 Authorization header is added automatically by Nexla based on your credential configuration.
Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to the configured Castor EDC endpoint, open the destination resource menu, and select Activate.
Castor EDC write endpoints modify live study data. When testing against a production study, use sample payloads carefully, or test against the Sandbox environment to avoid creating or altering real participant data. The Nexset data will not be sent to Castor EDC until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.