Cintoo Open API (2.0.0)
Cintoo Open API 1.x documentation: https://eu.cintoo.cloud/api
BETA: API v2 endpoints tagged "BETA" are available in beta-version, meaning that changes may be done later on.
The Cintoo API specification document you are viewing is compliant with the Open API Specification 3.0.3 and can be exported to json or yaml format that can be used by the API tool of your liking.
It also means the generated json/yaml will contain all the details present in this documentation about the
- JSON Objects schema being returned
- The status codes
- The authentication
- The verbs/paths/resources
With Cintoo Cloud API comes a Sandbox, which means a testing environment. This Sandbox is a separate tenant from the Cintoo Cloud platform that you are already familiar with.
The Sandbox is at your disposal so that you can test and use the API with no consequence on your production data (no unfortunate deletion by mistake for example).
- Scan capacity of 20 scans per user.
- Company SSO (if any) is not applicable since the Sandbox uses a different account.
- Please contact support@cintoo.com to get the invitation link to the Sandbox account.
- You can use the same email but you will be asked to set a new password by clicking on the invitation link.
- Please note that this is an experimental platform, so we reserve the right to refresh/delete the data (unlike the production platform).
- There is no limit in time for using the Sandbox.
- The BIM & CAD Module (BCM) is activated in this Sandbox, so feel free to use your BIM or CAD model in this testing environment.
Registering to the Sandbox / Cintoo Cloud API
Please contact our Support Team support@cintoo.com to be invited to the Sandbox and get all the documentation for Cintoo Cloud API.
There are 2 kind of tokens:
- Access token:
- is short lived (3h)
- is used to authenticate each query
- is personal and should not be shared, except for service users (see
Token management recipesat the end of the documentation) - is a JWT and is stateless, ie. there is NO limit of Access Token being valid for a given user simultaneously, and can be used in parallel.
- example of API call to list
accounts:curl -H Authorization="Bearer $access_token" https://eu.cintoo.cloud/api/accounts
Note: Calling the API with an already-used/expired token results in a response with status code
401
- Refresh token:
- is long lived (months)
- is used once to obtain a new
Access Token+Refresh Tokenpair. - cannot be used to make API calls.
- is personal and should not be shared, except for service users (see
Token management recipesat the end of the documentation) - there IS a limit of 10 Refresh Token being valid for a given user simultaneously
- is stateful and CANNOT be used in parallel, as it is consumed when used
- example of refresh token call to get a new pair of "Access Token" and "Refresh Token":
curl -X POST https://eu.cintoo.cloud/oauth/token -d "grant_type=refresh_token&refresh_token=$refresh_token"
Note: Calling the API with an already-used/expired token results in a response with status code
401
The Cintoo API follows the OAuth 2.0 Authorization Grant Type flow, and supports the PKCE extension which is recommended to provide better security (source: https://oauth.net/2/grant-types/authorization-code/)
Concretely, users are supposed to acquire the token once with a manual step (they have to click on approve), to get a first pair of tokens.
Once this is done, they can script the refresh with a simple curl command.
Note: a refresh token is valid for 21 days. It can be used only once. The refreshing mechanism can be done an unlimited number of times
To generate an Access Token with OAuth please use the following nice CLI tool cintoo-login.exe and double click on it.
If you are on a dedicated tenant, please add the argument --url.
.\cintoo-login-1.1.0-signed.exe --url https://eu.cintoo.cloud
Opening OAuth page in browser.
To receive your JWT token:
* Ensure you are logged-in
* Click on the 'Allow' button
INFO: You have 30s to complete these actions
Which opens this page
Hint: if you wait more than 30s you will have to run the command again Hint: you can change the timeout duration to another value with
--timeout 60

Once you click on Allow the page should lead you to:

AND (most importantly) the token appears magically in your cmd output
Hint: Copy paste the
Bearer xxxxxto avoid errors
Opening OAuth page in browser.
To receive your JWT token:
* Ensure you are logged-in
* Click on the 'Allow' button
INFO: You have 30s to complete these actions
Here is your token: to use it put in the Authorization header (copy paste below):
{"Authorization": "Bearer <access_token>"}
Its validity is of 3h
A new token can be-regenerated simply thanks to this refresh_token: <refresh_token>
Validating token
Success: API Token was successfully validated
While the Refresh Token is valid (within 21 days), you can consume it to get a new Access-Token + Refresh-Token pair.
Note: consuming the Refresh Token can be done before the expiration of the Access Token Note: consuming the Refresh Token does NOT invalidate other Access Token as they are short lived
Using shell (Linux, OSX)
refresh_token="<Your refresh token>" curl -X POST https://eu.cintoo.cloud/oauth/token -d "grant_type=refresh_token&refresh_token=$refresh_token"
Which returns the following
{
"access_token": "{access_token}",
"refresh_token": "{refresh_token}",
"token_type": "Bearer",
"expires_in": 10800,
"user_id": "{user_id}"
}
Using powershell (Windows)
$refresh_token = "<Your refresh token>"
$params = @{
Uri = 'https://eu.cintoo.cloud/oauth/token'
Method = 'POST'
Body = @{
grant_type = 'refresh_token'
refresh_token = $refresh_token
}
ContentType = 'application/x-www-form-urlencoded'
}
Invoke-RestMethod @params
Which returns the following
access_token : {access_token}
refresh_token : {refresh_token}
token_type : Bearer
expires_in : 10800
user_id : {user_id}
The Cintoo API follows the oauth protocol Authorization Code Grant to generate the access-tokens and refresh-tokens.
As such, it is possible to use 3rd party libraries and tools that implement the Oauth2 Authorization Code protocol to manage the tokens (and perform automatic refresh).
The important fields are the following and they match those defined by the authorization code request, authorization code request with PKCE and refreshing access tokens :
| Field | Value |
|---|---|
| Grant Type | Authorization Code or Authorization Code (With PKCE) |
| Callback URL | localhost or 127.0.0.1 or / |
| Auth URL | https://eu.cintoo.cloud/oauth/authorize |
| Access Token URL | https://eu.cintoo.cloud/oauth/token |
| Refresh Token URL | https://eu.cintoo.cloud/oauth/token |
| State | use a random code made of [a-z0-9]+ with a "correct length". More information about the state-parameters |
| Code Challenge Method (only with PKCE) | SHA-256 more info on PKCE |
This section is here in case you want to build an oauth client for acquiring the first Token pair without the help of the cintoo-login or without 3rd party software.
The term "Client" is going to be described as the originator of the oauth token request.
Client calls the Cintoo
oauth/authorizeendpoint from the browser with the following query parameters:- the
redirect_uri(callback-url) it wants Cintoo to send the authorization code to - the
stateuses a random code made of[a-z0-9]+with a "correct length". More information about the state-parameters - (optional)
code_challengea random code that has been hashed using the SHA256 algorithm. More info on PKCE.
code_verifier = high-entropy cryptographic random STRING using the unreserved characters [A-Z] / [a-z] / [0-9] / "-" / "." / "_" / "~" from Section 2.3 of [RFC3986], with a minimum length of 43 characters and a maximum length of 128 characters.
- (optional but mandatory if
code_challengeis set)code_challenge_method: "SHA256"
- the
Cintoo API returns an html element with an
approvebutton to be clicked by the user that started the action (the same shown in the previous chapter)Once the
approvebutton is pressed there is aForm Post URL redirectthat will target theredirect_uriprovided by the Client with the query parameters :codeandstate(+code_challengeandcode_challenge_methodif specified before)The Client should check that the
statesent and received are the same to avoid CSRF attacks.If they are the same, the Client can then send a
POSTquery to theoauth/tokenendpoint with the following payload that contains thecodeit received on the previous steps.{ "code": "{code}", "grant_type": "authorization_code", "authorization_code": "{redirect_uri}" }or with PKCE
{ "code": "{code}", "grant_type": "authorization_code", "authorization_code": "{redirect_uri}", "code_verifier": "{code_verifier}" }Finally the Cintoo API answers the
oauth/tokenwith a json object that contains theaccess_tokenandrefresh_tokenpair:{ "access_token": "{access_token}", "refresh_token": "{refresh_token}", "token_type": "Bearer", "expires_in": 10800, "user_id": "{user_id}" }
Below you will find an example on how to use the token to do a query.
A good endpoint to start with is the isLogged resource which simply returns 200 and {"success": true} if the token was recognized by the Cintoo API.
We highly recommend that you try it, then start changing the resource type (like accounts for instance) to get used to the API.
Copy the code below and try it in your Powershell terminal.
Hint: copy paste this while replacing the
xxxxxxxwith your token, and call as manyInvoke-RestMethodas you want. Note: the token is surrounded by"
$token = "xxxxxxxxxxxxxxxxxx"
$headers = @{
Authorization="Bearer $token"
Content='application/json'
}
Invoke-RestMethod -Headers $headers -Method Get -Uri "https://eu.cintoo.cloud/api/isLogged"
The powershell command line should return this
success ------- True
URNs are standard Uniform Resource Names.
Our NID is of course "cintoo", so they look like: urn:cintoo:{object type}:{object id}.
All the endpoints that return an object or a list of objects include a field giving the URN of the object, that you can in turn use to reference this object whenever you need to mention it.
Throughout the API, most endpoints need you to give references to existing objects, like accounts, projects, roles, etc. For example, getting the details of an account will look like:
GET /api/2/accounts/{accountRef}
A reference can be any unambiguous identifier for the object. It typically is either:
- the raw uuid or numerical id, depending on the type of the object:
c41aec8b-3b85-4bdd-81e5-c2cfdb8980e85
- a URN (Uniform Resource Name), looking like:
urn:cintoo:<object type>:<raw uuid or id>. For example:urn:cintoo:account:c41aec8b-3b85-4bdd-81e5-c2cfdb8980e8urn:cintoo:user:5
The URN is the most durable option and should be preferred, each object returned by the API has an urn field holding it, whereas at some point the raw id/uuid objects fields will be deprecated or removed from the objects content.
If your client needs to store identifiers for objects, you should choose the URN,
To communicate errors, the Cintoo API
- fills the HTTP status code defined by the standard: HTTP response status codes
It is consensus in the industry that the status code is the source of truth on whether an API call was successful or not, the body is merely a BONUS.
We are following this RFC whose content is the following
The "status" member is a JSON number indicating The HTTP status code ([HTTP], Section 15) generated by the origin server for this occurrence of the problem.
The "status" member, if present, is only advisory; it conveys the HTTP status code used for the convenience of the consumer. Generators MUST use the same status code in the actual HTTP response, to assure that generic HTTP software that does not understand this format still behaves correctly. See Section 5 for further caveats regarding its use.
Consumers can use the status member to determine what the original status code used by the generator was when it has been changed (e.g., by an intermediary or cache) and when a message's content is persisted without HTTP information. Generic HTTP software will still use the HTTP status code.
The "title" member is a JSON string containing a short, human-readable summary of the problem type.
It SHOULD NOT change from occurrence to occurrence of the problem, except for localization (e.g., using proactive content negotiation; see [HTTP], Section 12.1).
The "title" string is advisory and is included only for users who are unaware of and cannot discover the semantics of the type URI (e.g., during offline log analysis).
"detail" (string) - The "detail" member is a JSON string containing a human-readable explanation specific to this occurrence of the problem.
The "detail" string, if present, ought to focus on helping the client correct the problem, rather than giving debugging information.
Consumers SHOULD NOT parse the "detail" member for information; extensions are more suitable and less error-prone ways to obtain such information.
In addition, 2 extension fields are added:
errorCode: detailed code describing the error, can be used to map to a localized messageerrorValues: values implied in the error, typically an input parameter, can be used to include in a localized message
The mandatory fields that are always present are : status and title. Others are optional.
Example:
{
"status": 404,
"title": "Not Found",
"detail": "Account 1234 not found",
"errorCode": "account-not-found",
"errorValues": {
"accountId": "1234"
}
}
So the HTTP response status code is both in the HTTP header, and in the status attribute of the returned JSON object.
For a list of errorCode and errorValues, see the dedicated section Errors List
Each resource needs to have a permission to be accessed. Permissions are represented by three elements:
- domain: the level on which the resource is:
tenant,account,projectorworkzone - resource: the type of resource, for example
usersortags - right: the right on the resource the permission is giving. Most of the time it will be either
read(get/list resource) orwrite(create, update, delete) but can be another action when finer granularity is needed.
This is represented by a string containing those 3 elements separated by a colon: <domain>:<resource>:<right>. For example account:users:read is the permission to read (view/list) users on the account level.
Here is the list of the currently supported permissions:
tenant:user-permissions:readtenant:user-permissions:writeaccount:account:readaccount:account:update-owneraccount:administrators:readaccount:administrators:writeaccount:integrations:readaccount:integrations:writeaccount:project-listers:readaccount:project-listers:writeaccount:project-managers:readaccount:project-managers:writeaccount:projects:list(impliesproject:project:liston all projects of the account)account:projects:createaccount:projects:update(impliesproject:project:update-detailson all projects of the account)account:projects:delete(impliesproject:project:deleteon all projects of the account)account:roles:readaccount:roles:writeaccount:subscriptions:readaccount:subscriptions:update-nameaccount:users:readaccount:users:write(impliesworkzone:members:writeon all workzones in the account)account:groups:readproject:project:listproject:project:deleteproject:project:update-detailsproject:project:update-ownerproject:project:update-subscriptionproject:members:listproject:workzones:listproject:annotations:create-integration-linkproject:integrations:readproject:integrations:writeworkzone:annotations:readworkzone:annotations:writeworkzone:crops:readworkzone:crops:writeworkzone:documents:readworkzone:documents:writeworkzone:zip-mesh:readworkzone:zip-mesh:writeworkzone:export-jobs-reality-data:readworkzone:export-jobs-reality-data:writeworkzone:import-jobs-reality-data:writeworkzone:measurements:readworkzone:measurements:writeworkzone:members:writeworkzone:share-links:readworkzone:share-links:writeworkzone:own-share-links:readworkzone:own-share-links:writeworkzone:reality-data:readworkzone:reality-data:writeworkzone:reality-data:transformworkzone:savedviews:readworkzone:savedviews:writeworkzone:tags:readworkzone:tags:writeworkzone:workzones:readworkzone:workzones:writeworkzone:progress-monitoring-jobs:readworkzone:progress-monitoring-jobs:writeworkzone:own-progress-monitoring-jobs:readworkzone:own-progress-monitoring-jobs:writeworkzone:model-reports:readworkzone:model-reports:writeworkzone:cad-model:readworkzone:cad-model:writeworkzone:cad-model:transformworkzone:own-import-jobs-cad-model:readworkzone:own-import-jobs-cad-model:writeworkzone:import-jobs-cad-model:readworkzone:import-jobs-cad-model:writeworkzone:video3d:readworkzone:video3d:writeworkzone:import-video3d:write
Roles on an account are currently not modifiable, and are the following:
- Account Member is any user invited to the account
- Account Owner
- Account Administrator
- Project Manager
- Project Lister
An account member has the following permissions:
account:account:readto view the accountaccount:roles:readto view roles on the accountaccount:groups:readto view groups on the account
An account owner or account administrator are account members, and have the following additional permissions:
account:projects:listto list and view all projects on the accountaccount:projects:updateto update any project on the accountaccount:roles:writeto create, edit and delete roles on the accountaccount:users:readto list users members of the accountaccount:users:writeto invite or remove users on the accountaccount:subscriptions:readto view subscriptions of the accountaccount:subscriptions:update-nameto rename a subscription of the accountaccount:administrators:readto list administrators on the accountaccount:administrators:writeto invite or remove an administratoraccount:project-managers:readto list project managers on the accountaccount:project-managers:writeto invite or remove a project manageraccount:project-listers:readto list project listers on the accountaccount:project-listers:writeto invite or remove a project listeraccount:integrations:readto list and view all integrations configured on the accountaccount:integrations:writeto create, update and delete integrations on the account
An account owner has also the permission account:account:update-owner that an account administrator does not have, to set another user as the account owner
A project manager is an account member with the following additional permissions:
account:projects:listto list and view all projects on the accountaccount:projects:createto create new projectsaccount:projects:updateto update any projectaccount:projects:deleteto delete any projectaccount:roles:writeto create, edit and delete roles on the accountaccount:users:readto list users of the accountaccount:users:writeto invite or remove users on the accountaccount:subscriptions:readto view subscriptions of the accountaccount:project-managers:readto list project managers on the accountaccount:project-managers:writeto invite or remove a project manager
A project lister is an account member with the following additional permission:
account:projects:listto list and view all projects of the account
Roles can be created on an account to give permissions on project and workzone levels.
Users and groups are invited to a project with a specific role, thus a user has the role assigned to him, but also the roles of the groups he belongs to. A user's permissions are determined by adding the permissions of all his roles.
A given member, user or group, can only have one role within a project: the role cannot differ from one work zone to another. Assigning a different role on another work zone of the same project is rejected, and changing the role changes it on every work zone the member has access to. The same holds for the expiration date of the access. The role of a user and the roles of his groups remain independent from each other.
Currently the permissions given to a role are restricted to the following:
project:project:update-details+project:project:deleteallows the user to manage the projectworkzone:workzones:read+workzone:workzones:writeallows the user to create, modify and delete work zonesworkzone:reality-data:read+workzone:crops:readallows the user to view reality dataworkzone:reality-data:write+workzone:import-jobs-reality-data:writeallows the user to import or delete scansworkzone:reality-data:transformallows the user to modify the position and/or rotation of a scanworkzone:export-jobs-reality-data:writeallows the user to export and download reality dataworkzone:annotations:readallows the user to view annotationsworkzone:annotations:read+workzone:annotations:writeallows the user to create, edit and delete annotations, and assign notes to team membersworkzone:measurements:read+workzone:measurements:write+workzone:crops:writeallows the user to add and view 3D measurements (and add/update crops)workzone:share-links:read+workzone:share-links:writeallows the user to create, edit and delete share linksworkzone:own-share-links:read+workzone:own-share-links:writeallows the user to create, edit and delete the share links they createdworkzone:documents:read+workzone:documents:writeallows the user to upload and download documentsworkzone:zip-mesh:read+workzone:zip-mesh:writeallows the user to upload, download and export mesh filesworkzone:tags:readallows the user to view tagsworkzone:tags:writeallows the user to import, create, edit and delete tagsworkzone:savedviews:readallows the user to view saved viewsworkzone:savedviews:read+workzone:savedviews:writeallows the user to create, edit and delete saved viewsworkzone:members:writeallows the user to add and remove team membersworkzone:progress-monitoring-jobs:read+workzone:progress-monitoring-jobs:writeworkzone:own-progress-monitoring-jobs:read+workzone:own-progress-monitoring-jobs:writeworkzone:model-reports:read+workzone:model-reports:writeallows the user to create, edit, download and delete progress monitoring reports
workzone:cad-model:read+workzone:cad-model:write+workzone:own-import-jobs-cad-model:read+workzone:own-import-jobs-cad-model:write+workzone:import-jobs-cad-model:read+workzone:import-jobs-cad-model:writeallow the user to create, edit, download and delete CAD Model and to import them from different sources.workzone:cad-model:transformallows the user to modify the position and/or rotation of a 3D modelworkzone:video3d:write+workzone:import-video3d:writeallow the user to trigger the Add 360Video job
A user is a member of a project as soon as he has a role on at least one work zone of that project, granted either directly to him, or to a group he belongs to.
A role granted on a work zone applies to that work zone and all its descendants. Therefore:
- granting a role on a work zone makes the user a member of every work zone below it
- a work zone created later under it inherits the members of its parent
- removing a member from a work zone also removes him from all the work zones below it, and from the parent work zones he was a member of (see the
allowRemoveOnParentsparameter)
A member is therefore never a member of a work zone without being a member of all its descendants.
Note: this expansion is materialised, not computed on the fly. Endpoints returning member access, such as
GET /accounts/{accountRef}/projects/{projectRef}/members/access, return the full expanded list of work zones for each member, not only the topmost ones.
A member automatically has the following permissions on that project:
project:workzones:listproject:members:list
and workzone:workzones:read on each work zone he is a member of.
project:workzones:list is the marker of membership: if it is present in the permissions array of a project, the caller is a member of that project.
Note:
project:workzones:listandproject:project:listare different things.project:project:listonly means the project is visible to the caller. It is given to account owners, administrators, project managers and project listers throughaccount:projects:list, whether they are members of the project or not. A project is returned by the API when the caller has either of the two.
A project owner automatically has all permissions on the project and all its workzones.
A member having permission workzone:annotations:write on the root work zone of a project, automatically has the following permissions on the project:
project:annotations:create-integration-linkproject:integrations:readproject:integrations:write
- Stage 1: API 2 provides features not covered by API 1.
Most of features are taggedBETAshowing that they will continue to mature - Stage 2: API 2
BETAtags are removed, and API 2 starts covering API 1 features - Stage 3: API 2 fully covers API 1 scope
- Stage 4: API 1 will have a end of life support date communicated
- Stage 5: API 1 will be decommissioned
- Reference system is different: API 2 handles new Reference types (URNs), classic references (UUID) and "legacy references" coming from API 1.
API 1 supports UUID and "legacy references" only. - Error messages in API 2 follow the RFC 9457 (Problem Details for HTTP APIs).
In short{"code": ..., "message": ...}becomes{"status": ..., "title": ...}. - All resources returned by API 2 have multiple ref types (always an URN + UUID or INT)
- POST and PUT endpoints do return full objets (normally available with a GET)
- Objects returned from API 1 and API 2 differ