Skip to content
MiJornada

Developers

API documentation

With this API, software reads the working days, clock events, absences and employees of a company using MiJornada. Each key belongs to one company and sees only that company.

Getting started

  1. The company owner creates a key in Company › Integrations. It is shown once.
  2. Send the key in the Authorization header of every request.
  3. Call /me to check that it works, then /workdays to get the working days.

curl

curl "https://api.mijornada.app/v1/me" \
  -H "Authorization: Bearer mj_live_…"

Base URL

https://api.mijornada.app/v1

Resources

Keys and scopes

Keys created in the app today are read-only: employees:read, time:read and absences:read. Inviting, creating absences and webhooks need scopes that arrive with the Zapier connection. If your software needs them, write to us.

Dates and days

Instants are in UTC with a Z suffix. dayKey is the working day in the company's time zone, so a shift that ends after midnight belongs to the day it started.

Pagination

Lists return data and nextCursor. Pass nextCursor back as cursor until it is empty. The default page size is 50 and the maximum is 100.

Limits

  • 120 requests per minute per key. Above that, the API answers 429 with Retry-After.
  • Date ranges cover at most 93 days, or a year for absences.
  • 60 invitations per hour and key.

Errors

Errors use application/problem+json with a stable code, a readable detail and a requestId for support.

Status Code Meaning
401 invalid_key The key is missing, wrong or revoked.
403 missing_scope The key lacks that scope.
403 organization_closed The company is closed.
404 not_found It does not exist in this company.
405 method_not_allowed That address does not accept that method.
409 conflict It clashes with something that exists: an overlapping absence, a full plan.
409 idempotency_conflict That Idempotency-Key was used for a different request.
422 invalid_parameter A value is missing or not valid.
429 rate_limited Too many requests.
503 maintenance MiJornada is under maintenance.

Verifying a webhook signature

Each delivery carries X-MiJornada-Signature: t=<unix>,v1=<hmac>, the HMAC-SHA256 of <t>.<body> with the secret returned when the webhook was created.

Node.js

import crypto from "node:crypto";

export function isValid(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(",").map((part) => part.split("=")));
  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${parts.t}.${rawBody}`)
    .digest("hex");
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
}

Versions

/v1 may gain new fields and addresses. Removing or redefining anything requires /v2.

OpenAPI contract

Last updated: .