Documentation

Team API Encurtee

Integration via API key (Team API v1) and session-based REST for the app (/api/v1/teams). Same host (Nitro /api).

Overview

There are two families of endpoints: (1) Team API v1 for automation with an API key and a plan that includes API access; (2) /api/v1/teams routes with Supabase session cookies, used by the dashboard after login.

Where :id appears, it can be the internal team UUID or the numeric public_id (5–12 digits), except on routes that only list the current user’s teams.

Error and success messages follow the i18n_redirected cookie (pt or en) when the server translates them.

Two integration types

Team API v1

Prefix /api/v1/teams/:id. Authenticate with Authorization: Bearer or X-Team-Api-Key / X-Encurtee-Team-Key. Currently: GET ping and POST links (minimal body: url and optional title).

Session REST

Prefix /api/v1/teams (and /api/v1/teams/:id/…). Requires a logged-in user (same browser session: cookies). Permissions depend on team role (owner, admin, etc.).

:id parameter

Where :id is used, the route accepts UUID or numeric public_id resolved in the database.

Team API v1

Authentication — Team API v1

Applies to endpoints under /api/v1/teams/:id/ (recommended).

Authorization header (recommended)

Authorization: Bearer YOUR_FULL_API_KEY

Alternative headers

X-Team-Api-Key or X-Encurtee-Team-Key with the key value.

When Authorization is sent

If Authorization is present, only a non-empty Bearer token is accepted (no X-* fallback).

Team API key model

Today there is one active key per team (stored as a hash). Rotating or revoking replaces or removes that key — useful for rotation and incident response.

Who manages it: members with edit_team (typically owner or admin). The key lets you automate calls without a browser session; treat it as a secret (do not commit to public repos).

Team API v1

Team API v1 — ping & links

Expand for parameters, query, and examples

Method
Path
Description
GET/api/v1/teams/:id/pingConfirms the key for the team. Consumes team API usage tokens.
POST/api/v1/teams/:id/linksCreates a team link (owner as creator). URL validation and team-scoped duplicate checks.

Authentication — session REST

Send Supabase session cookies (same as app $fetch with credentials: 'include'). Without a valid session, 401.

REST /api/v1/teams (session)

CRUD for teams, members, invites, listing/creating team links, API key management, and usage metrics. Permissions depend on your team role.

Expand for parameters, query, and examples

List and create teams

Method
Path
Description
Summary
GET/api/v1/teamsLists teams you own or are an accepted member of; includes pending invites with invite_status.
POST/api/v1/teamsCreates a team; slug is derived from the name. Requires a plan that allows teams (e.g. Premium).Body: { "name": "Team name" }

Get, update, and delete a team

Method
Path
Description
Summary
GET/api/v1/teams/:idTeam detail if you are a member; includes is_owner, myRole, and permissions.
PUT/api/v1/teams/:idUpdates name, slug, and/or settings. Requires edit_team (owner or admin).Body (optional): { "name", "slug", "settings" }
DELETE/api/v1/teams/:idDeletes the team. Owner only.

Members — list, invite, role, remove

Method
Path
Description
Summary
GET/api/v1/teams/:id/membersLists members and invite states when applicable.
POST/api/v1/teams/:id/membersInvite by email (registered user). Requires invite_members. Roles: admin, moderator, user, viewer.Body: { "email": "…", "role?": "user" }
PUT/api/v1/teams/:id/members/:userIdChange a member’s role. Not for the team owner.Body: { "role": "admin" | "moderator" | "user" | "viewer" }
DELETE/api/v1/teams/:id/members/:userIdRemove a member (owner/admin) or leave the team (your own userId). Cannot remove the owner.

Invites — accept

Method
Path
Description
Summary
POST/api/v1/teams/:id/accept-inviteThe authenticated user accepts a pending invite to that team.

Team API key — read, create, revoke

Method
Path
Description
Summary
GET/api/v1/teams/:id/api-keyKey state (hint, dates) and whether the plan allows API. Team member; management requires edit_team.
POST/api/v1/teams/:id/api-keyGenerate or rotate the full key (shown once). Owner/admin + API-enabled plan.
DELETE/api/v1/teams/:id/api-keyRevoke the team key. Owner/admin.

Usage (dashboard)

Method
Path
Description
Summary
GET/api/v1/teams/:id/usage-dashboardTeam stats: total and monthly links, members, monthly API tokens and rate policy. Does not include the owner’s personal plan URL quota. Team member.

Common errors — Team API v1

HTTP
Situation
Description
400Bad requestMissing id; missing url; URL validation; duplicate in team; etc.
401v1 authMissing key, invalid Bearer, or revoked key.
403PlanOwner’s plan has no API access.
404TeamTeam not found or invalid :id.
429LimitsOwner’s monthly link limit.
500ServerInternal error.

Common errors — session REST

HTTP
Situation
Description
401SessionNot authenticated.
403Permission / planNo permission in team, member limit, or plan without API when managing the key.
404Not foundTeam, member, or user email not found.
409ConflictTeam slug already used; invite/migration conflict.
500ServerInternal error.

cURL examples — Team API v1

Replace YOUR_API_KEY and TEAM_ID. The base URL is the one shown in the examples block (your public site).

For /api/v1/teams with session, curl needs the session cookie (copy from the browser) or use the app; it is not the same flow as the v1 key.

Ping

curl -s -H "Authorization: Bearer YOUR_API_KEY" "https://encurtee.me/api/v1/teams/TEAM_ID/ping"

Create link (v1)

curl -s -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"url":"https://example.com/path"}' "https://encurtee.me/api/v1/teams/TEAM_ID/links"

New endpoints will be documented here as they ship.

The best platform to shorten URLs safely and efficiently.

Shorten, analyze and share your links with security and style.

© 2026 encurtee.me. All rights reserved.