4chems Trials API
The trials API from 4chems — 5 operation(s) for trials.
The trials API from 4chems — 5 operation(s) for trials.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/4chems-com:4chems-com-trials-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: platform-api Trials API
description: 'Platform API: infrastructure, operational, and customer tiers.'
version: 0.12.1
tags:
- name: trials
paths:
/infra/trials:
post:
tags:
- trials
summary: Create Trial Endpoint
description: 'Provision a trial tenant (async). Returns 202 + Location: /infra/operations/{id}.
Blocked when TRIALS_PROVISIONING_ENABLED=false and caller is TENANT_PROVISIONER
(UC-045 kill-switch halts the prospect funnel without affecting infra-admin).
A domain that already had its trial answers 409 `trial.exists_for_domain`;
`override_trial_once` with `override_reason` (ops-realm `sales` or
`infra-admin` only) lets it through and is audited (UC-099).'
operationId: create_trial
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TrialCreateIn'
required: true
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OperationOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
/infra/trials/{trial_id}:
get:
tags:
- trials
summary: Get Trial Endpoint
description: 'Retrieve a trial''s full detail by UUID. Call this when an operator needs a
trial''s current status before extending it, loading data, or tearing it down.'
operationId: get_trial
security:
- HTTPBearer: []
parameters:
- name: trial_id
in: path
required: true
schema:
type: string
format: uuid
title: Trial Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TrialOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- trials
summary: Teardown Trial Endpoint
description: 'Tear down a trial (erases tenant + data). Idempotent: 200 TrialOut if torn down.'
operationId: teardown_trial
security:
- HTTPBearer: []
parameters:
- name: trial_id
in: path
required: true
schema:
type: string
format: uuid
title: Trial Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: Response Teardown Trial
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/infra/trials/{trial_id}:extend:
post:
tags:
- trials
summary: Extend Trial Endpoint
description: 'Extend a trial once by 1 to 30 days with a written reason (ops-realm
`sales` or `infra-admin`; the provisioner credential is refused). Also
works during the grace period, when it restarts the trial. Returns the
updated trial.'
operationId: extend_trial
security:
- HTTPBearer: []
parameters:
- name: trial_id
in: path
required: true
schema:
type: string
format: uuid
title: Trial Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TrialExtendIn'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TrialOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/infra/trials/{trial_id}:load-data:
post:
tags:
- trials
summary: Load Data Endpoint
description: 'Import a prospect''s IUCLID export into the trial instance (UC-046).
Returns 202 + Location: /infra/operations/{id}. Preconditions:
trial must be ready, have a deployed IUCLID template, and the export
must be within the trial quota.'
operationId: load_trial_data
security:
- HTTPBearer: []
parameters:
- name: trial_id
in: path
required: true
schema:
type: string
format: uuid
title: Trial Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TrialLoadDataIn'
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OperationOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/infra/trials/{trial_id}:erase-data:
post:
tags:
- trials
summary: Erase Data Endpoint
description: 'Erase imported data from the trial instance without full teardown (UC-046).
The trial remains open and ready (empty) after erasure.
Returns 202 + Location: /infra/operations/{id}.'
operationId: erase_trial_data
security:
- HTTPBearer: []
parameters:
- name: trial_id
in: path
required: true
schema:
type: string
format: uuid
title: Trial Id
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OperationOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
TrialSeed:
type: string
enum:
- empty
- demo
- with_data
title: TrialSeed
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
TrialExtendIn:
properties:
days:
type: integer
minimum: 1.0
title: Days
reason:
type: string
maxLength: 500
minLength: 1
title: Reason
additionalProperties: false
type: object
required:
- days
- reason
title: TrialExtendIn
description: Operator extension (UC-098); the upper bound is a 409 (`trials_extension_max_days`).
ErrorDetail:
properties:
code:
type: string
title: Code
message:
type: string
title: Message
type: object
required:
- code
- message
title: ErrorDetail
TrialCreateIn:
properties:
legal_entity:
$ref: '#/components/schemas/LegalEntityIn'
initial_admin_email:
type: string
format: email
title: Initial Admin Email
products:
items:
type: string
type: array
minItems: 1
title: Products
seed:
$ref: '#/components/schemas/TrialSeed'
default: empty
ttl:
type: integer
maximum: 14.0
minimum: 1.0
title: Ttl
default: 14
override_trial_once:
type: boolean
title: Override Trial Once
default: false
override_reason:
anyOf:
- type: string
maxLength: 500
minLength: 1
- type: 'null'
title: Override Reason
type: object
required:
- legal_entity
- initial_admin_email
- products
title: TrialCreateIn
TrialLoadDataIn:
properties:
upload_ref:
type: string
maxLength: 2048
minLength: 1
title: Upload Ref
type: object
required:
- upload_ref
title: TrialLoadDataIn
LegalEntityIn:
properties:
country:
type: string
pattern: ^[A-Z]{2}$
title: Country
legal_entity_type:
type: string
pattern: ^[A-Z]{2,3}_[A-Z0-9][A-Z0-9_]*$
title: Legal Entity Type
other_label:
anyOf:
- type: string
maxLength: 80
minLength: 2
- type: 'null'
title: Other Label
name:
type: string
maxLength: 200
minLength: 1
title: Name
type: object
required:
- country
- legal_entity_type
- name
title: LegalEntityIn
description: "Composite legal-entity input validated against the country catalog.\n\nRules:\n- *country* must be a supported market (validated at field level via SupportedCountry,\n caught in the model validator against the loaded catalog).\n- *legal_entity_type* must appear in that country's catalog file.\n- When *legal_entity_type* is ``<CC>_OTHER``, *other_label* is required (2-80 chars).\n- For any other type, *other_label* must be absent."
OperationOut:
properties:
operation_id:
type: string
format: uuid
title: Operation Id
status:
type: string
title: Status
type:
type: string
title: Type
target_type:
anyOf:
- type: string
- type: 'null'
title: Target Type
target_id:
anyOf:
- type: string
- type: 'null'
title: Target Id
result:
anyOf:
- {}
- type: 'null'
title: Result
error:
anyOf:
- $ref: '#/components/schemas/ErrorDetail'
- type: 'null'
created_at:
type: string
format: date-time
title: Created At
finished_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Finished At
type: object
required:
- operation_id
- status
- type
- created_at
title: OperationOut
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
TrialOut:
properties:
id:
type: string
format: uuid
title: Id
tenant_id:
type: string
format: uuid
title: Tenant Id
email_domain:
type: string
title: Email Domain
seed:
type: string
title: Seed
status:
type: string
title: Status
subscription_state:
type: string
title: Subscription State
expires_at:
type: string
format: date-time
title: Expires At
products:
items:
type: string
type: array
title: Products
extensions_count:
type: integer
title: Extensions Count
erasure_attestation:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Erasure Attestation
import_ref:
anyOf:
- type: string
- type: 'null'
title: Import Ref
data_loaded:
type: boolean
title: Data Loaded
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
type: object
required:
- id
- tenant_id
- email_domain
- seed
- status
- subscription_state
- expires_at
- products
- extensions_count
- erasure_attestation
- import_ref
- data_loaded
- created_at
- updated_at
title: TrialOut
securitySchemes:
HTTPBearer:
type: http
scheme: bearer