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)yes
Idempotency-KeyheaderstringyesminLength: 1; maxLength: 200

Request body

Content type: application/json

NameTypeRequiredDescriptionConstraints
namestringnoOptional 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_onboardingobjectyes
replaces_enrollment_idstring | null (uuid)noOptional 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

NameTypeRequiredDescriptionConstraints
agent_enrollment_idstring (uuid)yesStable identifier of this resource.
expires_atstring (date-time)yesISO 8601 timestamp recorded by CloudPrint.
agent_onboarding_urlstring (uri)yesCloudPrint-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"
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
403Partner capability is not granted
404Managed Account or replacement Enrollment was not found
409Idempotency key conflicts with a previous request
422Request is invalid
429Rate limit exceeded
500Unexpected error

Integration guidance

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