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 | Stable UUID of the partner's relationship with the managed customer. | — |
Idempotency-Key | header | string | yes | Stable caller-generated key that makes retries return the original result instead of creating a duplicate. | minLength: 1; maxLength: 200 |
X-Request-Id | header | string | no | Optional request identifier for tracing; CloudPrint returns a safe value in the response header. | maxLength: 128; example: "order-100045-attempt-1" |
Request body
Content type: application/json
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
name | string | no | Human-readable resource name shown to account operators. | minLength: 1; maxLength: 255; example: "Warehouse workstation 2" |
agent_onboarding | object | yes | One-time Agent connection details created for the managed customer. | — |
replaces_enrollment_id | string | null (uuid) | no | UUID of the earlier Agent Enrollment replaced by this Enrollment. | — |
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 the Agent Enrollment. | — |
expires_at | string (date-time) | yes | ISO 8601 timestamp recorded by CloudPrint. | — |
agent_onboarding_url | string (uri) | yes | Canonical one-time link for connecting an Agent. Open the complete value unchanged and do not log 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 | Developer Account production access is not active |
404 | Managed Account or replacement Enrollment was not found |
409 | Idempotency conflict or open Agent Enrollment capacity reached |
422 | Request is invalid |
429 | Rate limit exceeded |
500 | Unexpected error |
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.