Create a managed Agent Enrollment
Issue an idempotent one-time Enrollment before or after customer onboarding.
POST
/partner-api/v1/accounts/{relationshipId}/agent-enrollmentsAPI version: v1operationId: createPartnerAgentEnrollmentView as MarkdownWhat this endpoint does
Issue an idempotent one-time Enrollment before or after customer onboarding.
Authentication
Send a one-time RS256 Developer Application assertion in Authorization: Bearer <application_assertion>. This assertion is not a Public API access token.
Request
Production base URL: https://public-api.cloudprint.me/partner-api/v1/accounts/{relationshipId}/agent-enrollments
Parameters
| Name | Location | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
relationshipId | path | string (uuid) | yes | — | — |
Idempotency-Key | header | string | yes | — | minLength: 1; maxLength: 200 |
Request body
Content type: application/json
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
name | string | no | Optional operator-facing computer name. When omitted, CloudPrint derives a name from the managed Account. A supplied name is trimmed, must contain 1 to 255 Unicode characters and must not contain ASCII control characters. | minLength: 1; maxLength: 255; example: "Warehouse workstation 2" |
agent_onboarding | object | yes | — | — |
replaces_enrollment_id | string | null (uuid) | no | Optional unclaimed Enrollment to revoke atomically before issuing the new one. | — |
Example requests
cURL
bash
curl -sS -X POST "https://public-api.cloudprint.me/partner-api/v1/accounts/$RELATIONSHIP_ID/agent-enrollments" \
-H "Authorization: Bearer $APPLICATION_ASSERTION" \
-H 'Idempotency-Key: customer-42-agent-2-v1' \
-H 'Content-Type: application/json' \
-d '{
"name": "Warehouse workstation 2",
"agent_onboarding": {
"return_uri": "https://app.integrator.example/cloudprint/callback",
"state": "new-single-use-random-state"
}
}'Response
HTTP status: 201 — Agent Enrollment created
Response fields
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
agent_enrollment_id | string (uuid) | yes | Stable identifier of this resource. | — |
expires_at | string (date-time) | yes | ISO 8601 timestamp recorded by CloudPrint. | — |
agent_onboarding_url | string (uri) | yes | CloudPrint-selected hosted onboarding URL. Open the complete value unchanged, including its #token fragment. Do not parse, log, proxy or rebuild it. | example: "https://connect.cloudprint.me/setup#token=cpat_example" |
status | string | yes | Current resource or workflow state; use the endpoint-specific enum values. | enum: pending |
Example response
json
{
"agent_enrollment_id": "11111111-1111-4111-8111-111111111111",
"expires_at": "2026-08-06T12:00:00Z",
"agent_onboarding_url": "https://connect.cloudprint.me/setup#token=cpat_example",
"status": "pending"
}Errors
| HTTP status | Description |
|---|---|
401 | Application assertion is invalid |
403 | Partner capability is not granted |
404 | Managed Account or replacement Enrollment was not found |
409 | Idempotency key conflicts with a previous request |
422 | Request is invalid |
429 | Rate limit exceeded |
500 | Unexpected error |
Integration guidance
Related documentation
List managed Agent EnrollmentsList pending, claimed, expired and revoked Agent Enrollments without exposing their secret codes.Get one Agent EnrollmentCheck the exact one-time Agent Enrollment created for a managed customer and correlate it with the connected Agent.Idempotent print-job creationPrevent duplicate physical prints when retrying CloudPrint print-job requests after a timeout or network failure.