The active organisation (for an API key, its organisation)
const url = 'https://api.threadkite.app/v1/organisations/current';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.threadkite.app/v1/organisations/current \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”object
ISO 3166-1 alpha-2
ISO 4217
The industry pack the organisation uses, or null for none
The location whose opening hours apply where an inbox and a thread have no location (group-wide inboxes); null for none
End of the free trial
The business email domain the organisation uses, e.g. smithmotors.co.uk
Only people with an address at signInDomain can join
The organisation’s own address: email sent or forwarded here arrives in the default inbox
object
object
upload (uploaded or cropped by your team) or website (your website’s icon)
Why the currency can’t be changed (a live subscription is priced in it), in plain English; null when it can
Example
{ "name": "Smith Motors", "slug": "smith-motors", "country": "GB", "timeZone": "Europe/London", "currency": "GBP", "locale": "en-GB", "region": "uk", "industryPack": "automotive", "plan": "pro", "status": "trialing", "inboundAddress": "smith-motors@in.threadkite.net", "logo": { "url": "https://api.threadkite.com/business-images/3f2a….png" }, "squareLogo": { "url": "https://api.threadkite.com/avatars/5b1d….png", "source": "upload" }, "currencyLockedReason": "Your plan is billed in GBP. Contact us to change it."}Missing or invalid API key
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}The organisation is on the Free plan (code upgrade_required)
object
Stable machine-readable reason
The feature that needs Pro
Where to upgrade or pay, in the web app
Example
{ "statusCode": 402, "code": "upgrade_required", "message": "Connections are part of Pro. Upgrade to connect texts, calls and more.", "feature": "extraSeats", "upgradePath": "/settings/billing"}The key does not have the scope (or the person the permission)
object
Stable machine-readable reason
With code invalid: every problem with the request, by field (message is the first)
object
Dotted path inside the item, e.g. attributes.price.amountMinor
Example
{ "statusCode": 403, "code": "forbidden", "message": "You do not have permission to do that.", "errors": [ { "message": "Enter the make" } ]}Rate limit reached
object
Stable machine-readable reason
Seconds until another request will be accepted
Example
{ "statusCode": 429, "code": "rate_limited", "message": "Too many requests. Each key can make 120 requests a minute; try again in 12 seconds.", "retryAfter": 12}