Developers
API
The Okwerin API is a versioned REST API. Every request is authenticated with an API key, scoped to one organisation and one environment.
Authentication
Send the API key as a bearer token. Keys carry scopes such as agreements:read and agreements:write, and the secret is shown only once when the key is created.
curl https://okwerin.com/api/public/v1/agreements \
-H "Authorization: Bearer ok_live_..."Create an agreement
Send an Idempotency-Key so a retried request never creates a second agreement.
curl -X POST https://okwerin.com/api/public/v1/agreements \
-H "Authorization: Bearer ok_live_..." \
-H "Idempotency-Key: 8f1c-..." \
-H "Content-Type: application/json" \
-d '{"title":"Service agreement","amount":48000,"currency":"SEK","counterparty_email":"buyer@example.com"}'Send for signature
Only a draft agreement can be sent. The response returns the new status and the send timestamp.
curl -X POST https://okwerin.com/api/public/v1/agreements/{id}/send \
-H "Authorization: Bearer ok_live_..."Errors and pagination
Errors always return { error: { code, message, request_id } } with no stack traces. Lists are cursor based and return data, next_cursor and has_more.