Aller au contenu

Affecter un agent à une zone à la main

PUT/api/public/v1/agents/{agent_id}/zone

Sets zone_override_id, so directory sync stops moving this agent — exactly as ownership already behaves once set by hand. An unknown or retired zone answers 422, not 404: the AGENT exists, the body's zone_id is what is unacceptable.

Fenêtre de terminal
curl --fail-with-body -X PUT 'https://app.openlatch.ai/api/public/v1/agents/<agent_id>/zone' \
-H "Authorization: Bearer $OPENLATCH_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"zone_id":"<zone_id>"}'
Rôle dans l’organisationCe point de terminaison
ownerAutorisé
adminAutorisé
editorNon autorisé
viewerNon autorisé

Une clé porte le rôle que son propriétaire détient dans l’organisation. Voir Authentification.

Portée de clé d’API : zones:write

ParamètreTypeDescription
agent_idstringObligatoire.
ParamètreTypeDescription
Idempotency-Keystring or nullOptional. Makes the request safe to retry: the same key and the same request, within 24 hours, returns the stored response with Idempotent-Replayed: true and runs once.
ChampTypeDescription
zone_idstring (uuid)Obligatoire.
ChampTypeDescription
assignment_sourcestringObligatoire.
zone_idstring or nullObligatoire.
{
"assignment_source": "string",
"zone_id": "3f6c1a2e-8b4d-4c1f-9a7e-0d5b2c8e4f10"
}