---
title: "Save APNs credentials"
method: PUT
path: "/push/settings/ios"
tags: ["Push"]
---

# Save APNs credentials

`PUT /push/settings/ios`

## Request

- Base URL: `https://api.sequenzy.com/api/v1`
- URL: `https://api.sequenzy.com/api/v1/push/settings/ios`
- Auth: HTTP bearer

Connects iOS push with an APNs auth key (.p8). The key is validated, encrypted at rest and never returned. Replacing the key clears the last credential error. Requires the integrations:manage scope and edit access to the workspace.

## Request body

- object
  - `keyId` string, required: 10-character APNs key ID.
  - `teamId` string, required: 10-character Apple developer team ID.
  - `bundleId` string, required: Your app's bundle ID.
  - `privateKey` string, required: Full contents of the AuthKey_XXXXXXXXXX.p8 file.
  - `environment` 'production' | 'sandbox': production for App Store and TestFlight builds, sandbox for Xcode development builds.

## Response `200`

Credentials saved

- object
  - `success` boolean
  - `push` PushSettings
    - `web` object
      - `enabled` boolean
      - `vapidPublicKey` string, nullable: Public VAPID key browsers subscribe with. null while web push is off.
    - `ios` object
      - `configured` boolean
      - `keyId` string, nullable
      - `teamId` string, nullable
      - `bundleId` string, nullable
      - `environment` 'production' | 'sandbox' | 'null', nullable
      - `lastError` string, nullable: Last credential rejection from APNs, cleared by a successful send or new credentials.
      - `lastErrorAt` string, date-time, nullable
    - `android` object
      - `configured` boolean
      - `projectId` string, nullable
      - `clientEmail` string, nullable
      - `lastError` string, nullable: Last credential rejection from Firebase, cleared by a successful send or new credentials.
      - `lastErrorAt` string, date-time, nullable
    - `defaultIconUrl` string, nullable: Custom web push icon. When null, web pushes use the company logo (brandIconUrl on Get Push Settings).
  - `message` string

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Missing scope or insufficient workspace permissions
- `500`: Server error

## Changes

- **2026-10-16** `db3873ca3d4d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/push/settings/ios/put.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) - [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sequenzy/apis/sequenzy-api/revisions/8156dc12d8b4?raw)
