Skip to content

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 Markdown

What 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 ​

NameLocationTypeRequiredDescriptionConstraints
relationshipIdpathstring (uuid)yesStable UUID of the partner's relationship with the managed customer.—
Idempotency-KeyheaderstringyesStable caller-generated key that makes retries return the original result instead of creating a duplicate.minLength: 1; maxLength: 200
X-Request-IdheaderstringnoOptional 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

NameTypeRequiredDescriptionConstraints
namestringnoHuman-readable resource name shown to account operators.minLength: 1; maxLength: 255; example: "Warehouse workstation 2"
agent_onboardingobjectyesOne-time Agent connection details created for the managed customer.—
replaces_enrollment_idstring | null (uuid)noUUID 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 ​

NameTypeRequiredDescriptionConstraints
agent_enrollment_idstring (uuid)yesStable identifier of the Agent Enrollment.—
expires_atstring (date-time)yesISO 8601 timestamp recorded by CloudPrint.—
agent_onboarding_urlstring (uri)yesCanonical 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"
statusstringyesCurrent 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 statusDescription
401Application assertion is invalid
403Developer Account production access is not active
404Managed Account or replacement Enrollment was not found
409Idempotency conflict or open Agent Enrollment capacity reached
422Request is invalid
429Rate limit exceeded
500Unexpected error

Guides for integrating CloudPrint, connecting the local agent and operating print workflows.