postLinkWithHttpInfo method
Registers a signed-in AI provider account on a machine.
Registers a signed-in AI provider account on a machine. It records that a developer has signed into one provider account on one machine — a Claude Max or ChatGPT Plus subscription, a Hanzo key, a raw provider key — and answers 201 with the stored link. Re-reporting the same (machine, provider, account) UPDATES that link rather than creating a second, so a collector may call this on every heartbeat. machine and provider are required (400 otherwise), as is a valid kind, and every field is length-bounded. Scoped to the caller: a validated principal and a non-empty org, else 403, so a caller writes only their OWN accounts within their own org.
Note: This method returns the HTTP Response.
Parameters:
- EnrollReq enrollReq (required):
Implementation
Future<Response> postLinkWithHttpInfo(EnrollReq enrollReq,) async {
// ignore: prefer_const_declarations
final path = r'/v1/link';
// ignore: prefer_final_locals
Object? postBody = enrollReq;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}