Promote Ephemeral Endpoint

POST /v1/endpoints/{uuid}/promote

Convert an ephemeral endpoint into a permanent one. Ephemeral endpoints are auto-created by ngris.connect(), the agent's ngris http <port> command, and similar one-shot flows; they're tracked by a janitor that reaps them when the agent has been disconnected for a configurable idle window.

Promotion clears the ephemeral flag, the device fingerprint, and the last_active_at tracking, so the row becomes indistinguishable from one created via POST /v1/endpoints. The endpoint now counts against the account's permanent endpoint quota — if you're already at the limit, promotion fails with 403 and you must delete a permanent endpoint first.

Only an ephemeral endpoint can be promoted: any other endpoint — including every endpoint made with POST /v1/endpoints — answers 409 endpoint is already permanent.

The whole operation is wrapped in a transaction with a SELECT ... FOR UPDATE on both the account and endpoint rows, so concurrent create + promote calls can't both push you over the quota.

Path parameters

uuid string (uuid) Req
Endpoint UUID. Must be an ephemeral endpoint of your active account.

Request body

None. Empty {} or no body. The promotion is unconditional — there's nothing to configure.

Response (200 OK)

Returns a minimal confirmation — uuid and ephemeral: false. To read the full endpoint after promotion, call GET /v1/endpoints/{uuid}.

uuid string (uuid)
The promoted endpoint's uuid (echo of the path parameter).
endpoint_uuid string (uuid)
Same value as uuid.
ephemeral boolean
Always false after a successful promotion.

Deprecated: until the sunset this response also carries the legacy integer endpoint_id. Don't use it; read uuid / endpoint_uuid.

Errors

400 Bad Request
Missing or empty UUID in the path.
401 Unauthorized
Missing auth.
403 Forbidden
Permanent endpoint quota reached. Delete a permanent endpoint or upgrade plan, then retry.
404 Not Found
No such endpoint in your active account (endpoint not found).
409 Conflict
endpoint is already permanent: the endpoint isn't ephemeral (it was created permanent, or was promoted already). Nothing changes. Also 409 with "code": "quota_paused" when the endpoint is paused over your plan's limits.
Request
curl -X POST "https://api.ngris.com/v1/endpoints/019bb1e4-e785-77d2-9966-c3cff31d0a0e/promote" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") ep = client.endpoints.promote("<endpoint_uuid>") print(ep["uuid"], ep["ephemeral"]) # ephemeral=False after promote
Response — 200 OK
{ "uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e", "ephemeral": false }
Response — 409 Conflict (not ephemeral)
{ "error": "endpoint is already permanent" }
Response — 403 Forbidden (quota reached)
{ "error": "permanent endpoint limit reached (N). Delete an existing endpoint or upgrade to promote this one." }
Was this helpful?
Was this helpful?