DevelopersREST API
Organisation API
Get your AutoRFP.ai organisation's custom project field definitions with the REST API, to discover the fields you can set when you update a project.
Use this endpoint to read your organisation’s custom project field definitions. It tells you which fields you can set with Update project custom fields.
It needs the organisation:read scope.
Get organisation settings#
get/v1/organisation
Returns the organisation's custom project field definitions (id, type, options, and flags). Use this to discover which fields you can set with PATCH /v1/projects/{projectId}. customFields is [] when no organisation template is configured. required on these definitions is the organisation-template flag; PATCH evaluates requiredness on the project working set (see PATCH docs). manageOnly is discovery-only and ignored by PATCH. Dynamic optionSource.set values such as users, usersAndTeams, or teams use user:<id> / team:<id> (bare id = legacy user); PATCH validates organisation membership for these known sets. Requires organisation:read. Rate limit: 100 requests / 60 seconds.
Required scopeorganisation:read
Returns
Organisation settings (custom field definitions)
typeenumrequiredidstringrequiredOrganisation id
attributesobjectrequiredShow child attributes
customFieldsarray of objectsrequiredOrganisation custom project field definitions. Empty when no template is configured.
Show child attributes
idstringrequiredStable field id, pass as id in PATCH /v1/projects/{projectId}
labelstringrequiredHuman-readable field label
typeenumrequiredField value type
requiredbooleanrequiredOrganisation-template required flag. PATCH uses each field.required on the project working set (cloned/appended from this template when missing; existing project flags are not rewritten). See PATCH docs for snapshot∪touched rules.
sectionstring | nullrequiredUI section grouping, or null
manageOnlybooleanrequiredProduct UI may hide this field from non-managers. Ignored by PATCH (no write-deny; still counts when the project field is required).
externalIdstring | nullrequiredOptional CRM/external key, pass as externalId in PATCH
optionsarray of objectsStatic dropdown/multiselect options on the organisation template. Non-empty PATCH refreshes matched project optionSource from this template.
Show child attributes
valuestringrequiredlabelstringrequired
optionSourceobjectDynamic option set (e.g. users, usersAndTeams, teams). For known sets, PATCH requires org membership via user:<id> / team:<id> (bare id = legacy user). Non-empty PATCH refreshes matched project optionSource from this template.
Show child attributes
typeenumrequiredsetstringrequired
multilinebooleanPresent on text fields when multiline is enabled
Errors
| Status | Meaning |
|---|---|
401 | Unauthorized |
403 | Insufficient scope (requires organisation:read) |
429 | Rate limit exceeded |
500 | Internal server error |
Request
curl -g "https://api.autorfp.ai/v1/organisation" \
-H "Authorization: Bearer $AUTORFP_API_KEY"const response = await fetch("https://api.autorfp.ai/v1/organisation", {
headers: {
Authorization: `Bearer ${process.env.AUTORFP_API_KEY}`,
},
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.get(
"https://api.autorfp.ai/v1/organisation",
headers={"Authorization": "Bearer " + os.environ["AUTORFP_API_KEY"]},
)
print(response.json())Response
Response
{
"data": {
"type": "organisation",
"id": "8f14e45f",
"attributes": {
"customFields": [
{
"id": "8f14e45f",
"label": "Security",
"type": "text",
"required": true,
"section": "example",
"manageOnly": true,
"externalId": "8f14e45f",
"options": [
{
"value": "example",
"label": "Security"
}
],
"optionSource": {
"type": "dynamic",
"set": "users"
},
"multiline": true
}
]
}
}
}