Agent links
List agent links
/v1/agent-linksParameters
alllimitcursor
Responses
200
agentLinksiduserIdagentlabelgrantprefixcreatedAtexpiresAtrevokedAtlastUsedAt
nextCursor
403
errormessagetypecodeparamnexusminimum
429
errormessagetypecodeparamnexusminimum
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request_error | A field is missing or not valid; the message names it |
| 401 | authentication_error | No key, or a key Gateway does not accept |
| 403 | role_required | Your role does not have this permission |
| 429 | Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
Example
curl "$NEXUS_URL/v1/agent-links" \
-H "Authorization: Bearer $NEXUS_API_KEY"Link agent
post
/v1/agent-linksParameters
Idempotency-Key
Request body · application/json
agentlabelgrantexpiresAtsessiondryRun
Responses
200
iduserIdagentlabelgrantprefixcreatedAtexpiresAtrevokedAtlastUsedAttokendryRun
201
iduserIdagentlabelgrantprefixcreatedAtexpiresAtrevokedAtlastUsedAttokendryRun
400
errormessagetypecodeparamnexusminimum
403
errormessagetypecodeparamnexusminimum
409
errormessagetypecodeparamnexusminimum
429
errormessagetypecodeparamnexusminimum
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request_error | A field is missing or not valid; the message names it |
| 400 | Not valid: an `agent` that is no slug (`invalid_agent`), no label (1 to 80 characters), an empty `grant` (`invalid_grant`), an action that cannot be granted (`grant_not_allowed`) an `expiresAt` that is not a future time within 365 days (`invalid_expiry`), or a field that the body does not define | |
| 401 | authentication_error | No key, or a key Gateway does not accept |
| 403 | role_required | Your role does not have this permission |
| 409 | The person already holds 20 live links (`agent_link_limit`) | |
| 409 | agent_link_limit | The next is 409 `agent_link_limit` |
| 409 | idempotency_in_progress | A request with the same Idempotency-Key is still running |
| 409 | idempotency_interrupted | The first request with this Idempotency-Key was cut off and may have run in part |
| 422 | idempotency_key_reused | The Idempotency-Key was used with a different request |
| 429 | Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
Example
curl -X POST "$NEXUS_URL/v1/agent-links" \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"agent": "claude",
"label": "CI"
}'Unlink agent
DEL
/v1/agent-links/{id}Parameters
idIdempotency-Key
Responses
200
iduserIdagentlabelgrantprefixcreatedAtexpiresAtrevokedAtlastUsedAt
403
errormessagetypecodeparamnexusminimum
404
errormessagetypecodeparamnexusminimum
429
errormessagetypecodeparamnexusminimum
Errors
| Status | Code | When |
|---|---|---|
| 401 | authentication_error | No key, or a key Gateway does not accept |
| 403 | role_required | Your role does not have this permission |
| 404 | not_found | Nothing matches the path in your organization |
| 404 | No such link in this organization (`unknown_agent_link`) | |
| 409 | idempotency_in_progress | A request with the same Idempotency-Key is still running |
| 409 | idempotency_interrupted | The first request with this Idempotency-Key was cut off and may have run in part |
| 422 | idempotency_key_reused | The Idempotency-Key was used with a different request |
| 429 | Over the caller's rate limit (`rate_limit_error`): retry after `Retry-After` seconds. Also a 429 `concurrency_limit`, with `Retry-After: 1`, when the organization already has its most requests in flight (off unless Gateway sets a cap). | |
| 429 | rate_limit_error | Too many requests from this key in a minute |
Example
curl -X DELETE "$NEXUS_URL/v1/agent-links/<id>" \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"