Developer docs menu
Reference · Organisation
Get your organisation
/api/organizations/currentReturns the organisation the key belongs to: its id, its name and the name of its plan. Any active key can call it, whatever its scopes, so it is the quickest way to check a new key works.
Parameters
None.
Example request
curl -s "https://www.quickpolicy.co.uk/api/organizations/current" \
-H "Authorization: Bearer $QP_API_KEY"Response
200 OK with a JSON body. Responses can carry more fields than are listed here; ignore any you do not recognise.
successalways trueorganizationobjectidstringnamestringplanobjectnamestringThe name of your plan, for example Professional.
{
"success": true,
"organization": {
"id": "cm3org0001",
"name": "Acme Health Ltd",
"plan": {
"name": "Professional"
}
}
}Errors
Every error has a JSON body with an error message. About errors
401The key is missing, wrong, deleted, switched off or past its expiry date.{"error":{"code":"UNAUTHORIZED","message":"The API key is missing, wrong, deleted or past its expiry date."}}403Your organisation's plan no longer includes API access. Checked on every request.{"error":{"code":"API_ACCESS_NOT_IN_PLAN","message":"Your organisation's plan no longer includes API access, so its API keys have stopped working."}}429The key has made more than 120 requests in a minute. Wait for the seconds in Retry-After.{"error":{"code":"RATE_LIMITED","message":"This key has made more than 120 requests in a minute. Wait 42 seconds and try again."}}404The organisation no longer exists.{"error":{"code":"NOT_FOUND","message":"Organization not found"}}500Something went wrong on our side.{"error":{"code":"INTERNAL_ERROR","message":"Unable to fetch organization"}}