1. Arrange an account and API access
Contact info@calcwire.se. An administrator registers the client in API access and selects its responsible user, companies and permissions. You need an Ed25519 key; register only the public key. Keep the private key in your own secure environment.
2. Obtain a short-lived token
Send a signed JWT to POST /api/v1/api-client/token. Use grant_type client_credentials and client_assertion_type urn:ietf:params:oauth:client-assertion-type:jwt-bearer. The JWT header specifies alg EdDSA and the registered kid. Claims include iss and sub set to the key ID, a unique jti, company_id, iat and exp (at most 60 seconds after iat), and aud exactly matching the registered token endpoint. The response contains access_token, valid for 300 seconds.
3. Check the identity
Use the Bearer token for GET /api/v1/api-client/me. Confirm the identity and company before writing project data. A 401 means authentication needs attention; 403 means access is missing. Do not automatically expand permissions.
4. Read the schema and choose a test project
The API reference and OpenAPI document require permission at /api-docs and /api-docs/openapi.json. Ask the administrator for reference access; a scoped project client does not automatically have it. Follow the current schemas and the import workflow provided during onboarding. Start with a separate test project and explicitly authorized drawing files.
5. Build, review and hand over
Read saved data back and complete the remaining project reviews, including visual comparisons. If the result of a write request is uncertain, check project state before retrying. Deliver a reviewable result with clear outstanding questions.
Your first read request
After the token exchange, set CALCWIRE_ACCESS_TOKEN to the issued token in your local environment. This example uses curl in a POSIX shell.
curl --fail-with-body \
-H "Authorization: Bearer $CALCWIRE_ACCESS_TOKEN" \
https://www.calcwire.se/api/v1/api-client/me
Updated 15 October 2026