Notify API reference

Notify API · Channels

put/v1/workspaces/{workspace_id}/channels/apns/credentialsAuth

Upload an APNs key

Uploads an APNs authentication key (`.p8`, token auth) for one bundle id. You still create the key in your Apple developer account; Notify validates it with Apple before activating it (a background push to a placeholder token that reaches no device), stores it encrypted and never returns it. An upload replaces the active or invalid key of the same bundle id whose environment overlaps (`replaced_credential_ids`), and resumes push for that bundle id if Apple had refused the previous key. Uploading the active key again unchanged only re-validates it. Nothing is stored when Apple refuses the key or cannot be reached.

Path parameters

workspace_id*string · uuid

Id of the workspace.

Headers

Idempotency-Keystring

A key (1..256 chars, [A-Za-z0-9._:-]) makes retries safe: a replay returns the original response for 24 h.

Request body

key_id*string

The 10-character key id Apple shows next to the key (Certificates, Identifiers & Profiles > Keys).

Example: "ABC123DEFG"

team_id*string

The 10-character team id of the Apple developer account the key belongs to.

Example: "DEF123GHIJ"

bundle_id*string

The app bundle id the key sends to (the `apns-topic`). Devices register with the same value as `app_id`.

Example: "com.example.app"

environment*object

Which APNs environment the key serves. Token-auth keys work in both; `both` lets debug builds (`sandbox` device tokens) and TestFlight/App Store builds (`production`) share one key.

p8*string

The full contents of the `.p8` file, including the `-----BEGIN PRIVATE KEY-----` lines (`\n` escapes are accepted). Write-only: validated with Apple, stored encrypted and never returned; responses show a fingerprint.

Response · 200 The active key for the bundle id (metadata only).

credential_id*string · uuid

The credential id.

key_id*string

APNs key id.

team_id*string

Apple team id.

bundle_id*string

The bundle id the key sends to.

environment*object

The environments the key serves.

fingerprint*string

First 16 hex characters of the SHA-256 of the key; the key itself is never returned.

status*object

`active` after a successful upload; `invalid` once Apple refused it while sending.

last_verified_at*string · date-time

When Apple last accepted the key (the upload validation).

last_error_code*string

The Apple reason that made the key `invalid` (e.g. `InvalidProviderToken`).

created_at*string · date-time

When the credential was created.

replaced_credential_ids*array

APNs credentials of the same bundle id with an overlapping environment that this upload replaced (now `superseded`; their key is erased after 24 h). Empty on a first upload or a no-op re-upload.

Example

Request

PUT https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/channels/apns/credentials
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "key_id": "ABC123DEFG",
  "team_id": "DEF123GHIJ",
  "bundle_id": "com.example.app",
  "environment": {},
  "p8": "string"
}

Response

{
  "credential_id": "00000000-0000-0000-0000-000000000000",
  "key_id": "string",
  "team_id": "string",
  "bundle_id": "string",
  "environment": {},
  "fingerprint": "string",
  "status": {},
  "last_verified_at": "2026-01-01T00:00:00.000Z",
  "last_error_code": "string",
  "created_at": "2026-01-01T00:00:00.000Z",
  "replaced_credential_ids": [
    "00000000-0000-0000-0000-000000000000"
  ]
}