Getting Started with Spacenus

Spacenus APIs run on company-scoped JWT tokens. This guide gets you from credentials to your
first real response.

Base URL: https://backend.spacenus.de/api/v1.2/

Don't have API access yet? Contact [email protected] to set up a company account and
get your login credentials or an API key.

1. Log in

curl -X POST https://backend.spacenus.de/api/v1.2/auth/v2/login/ \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "your-password"}'
{
  "access": "<identity-token>",
  "refresh": "<refresh-token>",
  "expires_at": "2026-09-18T12:00:00Z",
  "requires_company_selection": true,
  "user": { "id": 1, "email": "[email protected]" }
}

This access token confirms who you are, but it isn't scoped to a company yet — every
Spacenus resource belongs to a company, so you need one more step before you can call anything
else.

2. Pick a company

Most accounts belong to at least one company. See yours:

curl https://backend.spacenus.de/api/v1.2/auth/v2/my-companies/ \
  -H "Authorization: Bearer <identity-token>"

Then select one to get the token you'll actually use:

curl -X POST https://backend.spacenus.de/api/v1.2/auth/v2/select-company/ \
  -H "Authorization: Bearer <identity-token>" \
  -H "Content-Type: application/json" \
  -d '{"company_id": 123}'

This returns a new access/refresh pair — this one is scoped to that company. Use it for
every call below.

3. Make your first call

List the farms registered to your company:

curl https://backend.spacenus.de/api/v1.2/farm/ \
  -H "Authorization: Bearer <company-scoped-access-token>"
{
  "status": "success",
  "message": "Operation successful.",
  "data": {
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
      { "id": 1, "name": "North Field Farm", "total_fields": 4, "company": 123 }
    ]
  }
}

Every Spacenus response uses this same envelope — status, message, and either data (on
success) or details (on an error) — no matter which endpoint you call.

Refreshing your token

curl -X POST https://backend.spacenus.de/api/v1.2/auth/v2/token/refresh/ \
  -H "Content-Type: application/json" \
  -d '{"refresh": "<refresh-token>"}'

Using an API key instead

For server-to-server integrations, Spacenus can issue a long-lived API key so you can skip the
login flow entirely — pass it as a query parameter on any request:

curl "https://backend.spacenus.de/api/v1.2/farm/?api-key=<your-api-key>"

Next steps

  • Farm Management — register farms, fields, and seasons before calling anything downstream
  • ANA — nitrogen recommendations and agronomic mapping
  • SatMRV — soil sampling and carbon verification
  • RegenScope3 — DPP and Scope 3 GHG accounting
  • Browse the full API Reference for every endpoint

Still stuck, or need a company account? Contact [email protected].


Did this page help you?