Skip to content

Upload dep token to a tenant
Stable

Request

Uploads a DEP token for a tenant's Apple Business Manager public key.

Uploads the .p7m token file downloaded from Apple Business Manager (ABM), associating it with the tenant's existing DEP public key record identified by id.

About DEP Tokens DEP (Apple's Device Enrollment Program, now part of Apple Business Manager) requires exchanging a public key with Apple and uploading the resulting signed token back to Esper to complete the DEP server token setup. This is a required step before DEP profiles can be used for zero-touch iOS enrollment.

Key Fields / Query Parameters

  • id — ID of the DEP public key record this token corresponds to
  • file — The .p7m token file downloaded from the ABM console
  • token_name — Name to assign to this DEP token

Common Use Cases

  • Completing initial DEP/ABM setup for zero-touch iOS device enrollment
  • Renewing an expiring DEP server token from Apple Business Manager
  • Re-establishing DEP connectivity after a token was revoked or rotated in ABM

Best Practices

  • Download the .p7m file directly from the ABM console for the matching public key — tokens are not interchangeable across public key records
  • Track token expiration and renew proactively in ABM before it lapses, since DEP enrollment stops working once a token expires
  • Give tokens a clear token_name if the tenant manages more than one ABM connection

Workflow

  1. Generate/download the DEP public key from Esper and upload it to Apple Business Manager
  2. Download the resulting .p7m token file from ABM
  3. PUT that file to this endpoint with the corresponding id and a token_name
Security
tenant_apiKey
Path
idstring, (UUID)required

ID of the token object

Bodymultipart/form-datarequired
filestring, (binary)required

.p7m file from abm console

token_namestringrequired
cURL
curl -i -X PUT \
  'https://develop-api.esper.io/_mock/openapi/tenant/v0/deptokens/{id}/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F token_name=string

Responses

Upload dep token for a public key by id

Bodyapplication/json
codeinteger
messagestring
contentobject
Response
{ "code": 0, "message": "string", "content": { "schema": { … } } }