Skip to content
Coritan Docs

Organization API: Organizations & Members: Settings

The 9 Organization API operations for settings.

View as Markdown

Part of Organizations & Members.

Method Path Summary
GET /api/v1/orgs/{org_slug}/settings The organization's settings
PATCH /api/v1/orgs/{org_slug}/settings Change the settings sent, and answer them as GET /settings does
POST /api/v1/orgs/{org_slug}/settings/custom-domain/verify Verify org custom domain
GET /api/v1/orgs/{org_slug}/settings/mail-outbound The outbound transport block plus whether the in-house side can send now
GET /api/v1/orgs/{org_slug}/settings/support-mailbox Show the organization's own support mailbox
PUT /api/v1/orgs/{org_slug}/settings/support-mailbox Connect or change the organization's own support mailbox
DELETE /api/v1/orgs/{org_slug}/settings/support-mailbox Disconnect the organization's own support mailbox
POST /api/v1/orgs/{org_slug}/settings/support-mailbox/test Check that Coritan can sign in to the mailbox
POST /api/v1/orgs/{org_slug}/settings/support-mailbox/verify Send the confirmation message that makes the mailbox active

GET /api/v1/orgs/{org_slug}/settings

The organization's settings. domain_pointing says whether the platform serves the storefront on custom_domain: only a hostname the brand registry lists for the organization's brand is served, so no DNS record of the organization's points one here.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type Description
id integer
org_id integer
custom_domain string or null
custom_domain_verified boolean
logo_url string or null
favicon_url string or null
primary_color string
secondary_color string
company_name string or null
legal_name string or null
registration_number string or null
tax_id string or null
registered_address string or null
billing_email string or null
country_code string or null
support_email string or null
terms_url string or null
privacy_url string or null
smtp_host string or null
smtp_port integer
smtp_user string or null
smtp_from_email string or null
smtp_from_name string or null
invoice_prefix string
invoice_footer string or null
default_currency string
tax_rate string
payment_terms_days integer
timezone string
features object or null
self_serve_downgrade_credit boolean or null
self_serve_cancellation_credit boolean or null
domain_pointing OrgDomainPointing or null
domain_pointing.served boolean
domain_pointing.storefront_host string or null
domain_verification object or null {type, name, value}: the TXT record that proves the organization holds custom_domain. None when there is no custom domain.
smtp_pass_set boolean Whether an SMTP password is stored. smtp_pass itself is write-only.

Change the settings sent, and answer them as GET /settings does

Section titled Change the settings sent, and answer them as GET /settings does

PATCH /api/v1/orgs/{org_slug}/settings

Change the settings sent, and answer them as GET /settings does.

A new custom_domain is saved as its bare hostname and starts unverified, with the TXT record to publish in domain_verification; 409 when another organization has it. smtp_pass is write-only: smtp_pass_set says whether one is stored. mail_outbound is merged into features.mail.outbound, and whatever the stored block ends up as must name one of the organization's relay tenants and a domain on it unless its transport is smtp (422). google_analytics (enabled, measurement_id) is merged into features.google_analytics and into the Google Analytics 4 entry of features.tags, which PUT /{org_slug}/tags sets with every other platform: 422 for a measurement ID that is not a GA4 one, or for turning it on without one. 422 for null on a setting the row requires. Audited with the names of the keys sent, never their values.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
mail_outbound OrgMailOutbound or null no
mail_outbound.transport string, one of auto, smtp, inhouse no
mail_outbound.tenant string or null no
mail_outbound.envelope_domain string or null no
mail_outbound.envelope_local string or null no
mail_outbound.from_mode string, one of apex, subdomain no
google_analytics OrgGoogleAnalytics or null no
google_analytics.enabled boolean or null no
google_analytics.measurement_id string or null no
custom_domain string or null no
logo_url string or null no
favicon_url string or null no
primary_color string or null no
secondary_color string or null no
company_name string or null no
legal_name string or null no
registration_number string or null no
tax_id string or null no
registered_address string or null no
billing_email string or null no
country_code string or null no
support_email string or null no
terms_url string or null no
privacy_url string or null no
smtp_host string or null no
smtp_port integer or null no
smtp_user string or null no
smtp_pass string or null no
smtp_from_email string or null no
smtp_from_name string or null no
invoice_prefix string or null no
invoice_footer string or null no
default_currency string or null no
tax_rate number or string or null no
payment_terms_days integer or null no
timezone string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type Description
id integer
org_id integer
custom_domain string or null
custom_domain_verified boolean
logo_url string or null
favicon_url string or null
primary_color string
secondary_color string
company_name string or null
legal_name string or null
registration_number string or null
tax_id string or null
registered_address string or null
billing_email string or null
country_code string or null
support_email string or null
terms_url string or null
privacy_url string or null
smtp_host string or null
smtp_port integer
smtp_user string or null
smtp_from_email string or null
smtp_from_name string or null
invoice_prefix string
invoice_footer string or null
default_currency string
tax_rate string
payment_terms_days integer
timezone string
features object or null
self_serve_downgrade_credit boolean or null
self_serve_cancellation_credit boolean or null
domain_pointing OrgDomainPointing or null
domain_pointing.served boolean
domain_pointing.storefront_host string or null
domain_verification object or null {type, name, value}: the TXT record that proves the organization holds custom_domain. None when there is no custom domain.
smtp_pass_set boolean Whether an SMTP password is stored. smtp_pass itself is write-only.

POST /api/v1/orgs/{org_slug}/settings/custom-domain/verify

Check the custom domain's DNS now, and answer the settings row as GET /settings does: custom_domain_verified says whether it passed.

It passes once the record in domain_verification (TXT _coritan-org.<domain>, the row's token) is published. A verified domain is answered as it is, and changing the domain unverifies it. Admins and the owner; 422 without a custom domain; 409 when the domain changed during the check; 429 past twelve checks an hour.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type Description
id integer
org_id integer
custom_domain string or null
custom_domain_verified boolean
logo_url string or null
favicon_url string or null
primary_color string
secondary_color string
company_name string or null
legal_name string or null
registration_number string or null
tax_id string or null
registered_address string or null
billing_email string or null
country_code string or null
support_email string or null
terms_url string or null
privacy_url string or null
smtp_host string or null
smtp_port integer
smtp_user string or null
smtp_from_email string or null
smtp_from_name string or null
invoice_prefix string
invoice_footer string or null
default_currency string
tax_rate string
payment_terms_days integer
timezone string
features object or null
self_serve_downgrade_credit boolean or null
self_serve_cancellation_credit boolean or null
domain_pointing OrgDomainPointing or null
domain_pointing.served boolean
domain_pointing.storefront_host string or null
domain_verification object or null {type, name, value}: the TXT record that proves the organization holds custom_domain. None when there is no custom domain.
smtp_pass_set boolean Whether an SMTP password is stored. smtp_pass itself is write-only.

The outbound transport block plus whether the in-house side can send now

Section titled The outbound transport block plus whether the in-house side can send now

GET /api/v1/orgs/{org_slug}/settings/mail-outbound

The outbound transport block plus whether the in-house side can send now.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Show the organization's own support mailbox

Section titled Show the organization's own support mailbox

GET /api/v1/orgs/{org_slug}/settings/support-mailbox

Show the organization's own support mailbox.

Needs an owner or admin. Answers whether a mailbox is connected, the providers you can choose from, and for a connected mailbox its status, the IMAP login (without the password), when Coritan last read it, the last error, whether it is confirmed and what its messages became in the last 24 hours. A mailbox you removed answers as not configured.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type Description
configured boolean
presets array of PresetView
presets[].key string
presets[].label string
presets[].imap_host string or null
presets[].imap_port integer
mailbox MailboxView or null
mailbox.status string pending, active, auth_failed, error or disabled.
mailbox.enabled boolean
mailbox.address string
mailbox.reply_local string
mailbox.domain string
mailbox.preset string
mailbox.imap MailboxImap
mailbox.trusted_authserv string or null
mailbox.last_fetch_at string or null
mailbox.last_ok_at string or null
mailbox.last_error string or null
mailbox.consecutive_failures integer
mailbox.verified boolean
mailbox.verified_at string or null
mailbox.verify_sent_at string or null
mailbox.reply_example string What a ticket's Reply-To looks like, with the token masked.
mailbox.counts_24h MailboxCounts

Connect or change the organization's own support mailbox

Section titled Connect or change the organization's own support mailbox

PUT /api/v1/orgs/{org_slug}/settings/support-mailbox

Connect or change the organization's own support mailbox.

Needs an owner or admin who confirmed their password in the last ten minutes. Saving does not sign in to the mailbox: use Test, then Send confirmation. A new mailbox, or a change to its address, reply name, host, username or password, makes it pending again and starts it afresh, so mail already in the Inbox is never imported. Leave the password out to keep the saved one. Refuses a value that is not usable with 422 and the name of the field, a host that is not a public mail server, an organization that already has a Coritan ticket address, and a login another organization already uses with 409.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required Description
address string yes The mailbox to read, such as tickets@example.com.
preset string no gmail for Google Workspace or Gmail, other for another provider.
imap_host string or null no The IMAP host. Fixed by the gmail preset; required for other.
imap_port integer or null no Always 993 (IMAP over TLS).
imap_user string or null no The IMAP username. Defaults to the address.
imap_password string or null no The app password. Leave it out to keep the saved one.
reply_local string or null no The name before the plus tag in a ticket's Reply-To. Defaults to the address's own name.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type Description
configured boolean
presets array of PresetView
presets[].key string
presets[].label string
presets[].imap_host string or null
presets[].imap_port integer
mailbox MailboxView or null
mailbox.status string pending, active, auth_failed, error or disabled.
mailbox.enabled boolean
mailbox.address string
mailbox.reply_local string
mailbox.domain string
mailbox.preset string
mailbox.imap MailboxImap
mailbox.trusted_authserv string or null
mailbox.last_fetch_at string or null
mailbox.last_ok_at string or null
mailbox.last_error string or null
mailbox.consecutive_failures integer
mailbox.verified boolean
mailbox.verified_at string or null
mailbox.verify_sent_at string or null
mailbox.reply_example string What a ticket's Reply-To looks like, with the token masked.
mailbox.counts_24h MailboxCounts

Disconnect the organization's own support mailbox

Section titled Disconnect the organization's own support mailbox

DELETE /api/v1/orgs/{org_slug}/settings/support-mailbox

Disconnect the organization's own support mailbox.

Needs an owner or admin who confirmed their password in the last ten minutes. Coritan stops reading the mailbox at once, deletes the saved password and forgets where it stopped. Messages already turned into ticket replies stay. Ticket emails then no longer ask for replies at this mailbox. Removing a mailbox that is not connected is not an error.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
ok boolean

Check that Coritan can sign in to the mailbox

Section titled Check that Coritan can sign in to the mailbox

POST /api/v1/orgs/{org_slug}/settings/support-mailbox/test

Check that Coritan can sign in to the mailbox.

Needs an owner or admin who confirmed their password in the last ten minutes. Tests the saved login, or the login in the request when you send one (anything you leave out comes from the saved mailbox). It signs in, opens the Inbox read-only and counts its messages. It sends no email, changes no message and saves nothing. The answer says whether it worked and, when it did not, why. Refuses a host that is not a public mail server with 422. Ten tests an hour are allowed.

Name In Type Required
org_slug path string yes

application/json

Field Type Required
preset string or null no
imap_host string or null no
imap_port integer or null no
imap_user string or null no
imap_password string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type Description
imap LoginResult
imap.ok boolean
imap.message string
imap.messages integer or null How many messages the Inbox holds, when the sign-in worked.

Send the confirmation message that makes the mailbox active

Section titled Send the confirmation message that makes the mailbox active

POST /api/v1/orgs/{org_slug}/settings/support-mailbox/verify

Send the confirmation message that makes the mailbox active.

Needs an owner or admin who confirmed their password in the last ten minutes, and a saved mailbox that Coritan can sign in to. Coritan sends a short email to the mailbox's reply address with the organization's normal outgoing email. When Coritan reads it from the Inbox, the mailbox turns active and ticket emails start asking for replies there. Refuses with 409 when the mailbox is already active (add resend=1 to send it again), when its sign-in was refused, when it cannot be signed in to, or when the outgoing email did not accept the message. Ten confirmations an hour are allowed.

Name In Type Required Description
org_slug path string yes
resend query boolean no Send the confirmation again for a mailbox that is already active. Default: False.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type Description
sent boolean
address string The mailbox the confirmation message was sent to.