Create an organisation
const url = 'https://secure.ethicsportal.eu/organizations.json';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"organization":{"name":"Example organisation"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://secure.ethicsportal.eu/organizations.json \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "organization": { "name": "Example organisation" } }'Create an organisation. Requires organizations:create, which only personal tokens can hold, current user terms, and at least one active membership. An assistant connection is the exception: a person with no organisation can create their first one through it. The owner and an administrator membership are assigned from the token user. Creates the default inactive whistleblowing channel. No billing or DPA acceptance is performed: the owner accepts the DPA in a browser, and until then the organisation’s operations answer agreement_required. Limited to 10 creation attempts per user per minute, across tokens. Send an Idempotency-Key so a retry after a lost response returns the first response instead of creating a second organisation.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Recommended on every POST. Retrying with the same key and the same request within 24 hours returns the first response (with Idempotent-Replayed: true) instead of acting twice. Only successful responses and validation errors are stored; any other outcome releases the key. Reusing a key with a different request returns 409 idempotency_key_reused; a retry while the first request is still running returns 409 idempotency_key_in_progress. Keys are scoped to the token.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Example
{ "organization": { "name": "Example organisation" }}Responses
Section titled “Responses”Organisation and owner membership created, with a default channel.
object
The creating user’s administrator membership, as an obfuscated ID. Use as compliance_officer_id to appoint yourself.
object
Example
{ "id": "gHiJkl", "name": "Example organisation", "membership_id": "mAbCde", "channel": { "id": "AB12CD34", "active": false }, "reports_url": "https://secure.ethicsportal.eu/organizations/gHiJkl/whistleblower/reports.json", "channel_url": "https://secure.ethicsportal.eu/organizations/gHiJkl/whistleblower/portal.json", "members_url": "https://secure.ethicsportal.eu/organizations/gHiJkl/members.json", "webhooks_url": "https://secure.ethicsportal.eu/organizations/gHiJkl/webhooks.json", "audit_trail_url": "https://secure.ethicsportal.eu/organizations/gHiJkl/whistleblower/audit_logs.json", "documents_url": "https://secure.ethicsportal.eu/organizations/gHiJkl/whistleblower/documents.json", "billing_url": "https://secure.ethicsportal.eu/organizations/gHiJkl/subscriptions.json"}Headers
Section titled “Headers”Organisation web page; requires a separate authenticated browser session.
Invalid JSON body, attributes or types.
object
object
Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.
Example
{ "error": { "code": "invalid_request", "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json" }}Missing or unusable token.
object
object
Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.
Example
{ "error": { "code": "invalid_token", "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json" }}Required scope missing, a personal token whose user is not a current administrator, or agreement_required until browser acceptance.
object
object
Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.
Example
{ "error": { "code": "forbidden", "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json" }}Resource inaccessible, or API access suspended.
object
object
Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.
Example
{ "error": { "code": "not_found", "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json" }}This Idempotency-Key was already used with a different request, or its first request is still running
object
object
Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.
Example
{ "error": { "code": "idempotency_key_reused", "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json" }}Model validation failed. Fields are attribute names only; values and personal data are never reflected.
object
object
Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.
Example
{ "error": { "code": "validation_failed", "fields": [ "name" ], "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json" }}Rate limit exceeded. Retry-After: 60.
object
object
Where to tell EthicsPortal what went wrong: POST product feedback here with the same token.
Example
{ "error": { "code": "rate_limited", "feedback_url": "https://secure.ethicsportal.eu/me/feedback.json" }}