---
source_url: https://www.pubnub.com/docs/admin-api/upload-ap-ns-credentials
title: Upload APNs credentials
---

# Upload APNs credentials

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Uploads the APNs token file used to deliver push notifications to Apple devices, and replaces the APNs credentials stored for the keyset. The request must contain every field. APNs is enabled for the keyset by this upload. The response contains the stored metadata only: the token is write-only and cannot be read back. If the upload is rejected, nothing is stored and the previously stored credentials stay in place.

## Request

Example

```
{
  "teamId": "string",
  "authKeyId": "string",
  "filename": "string"
}
```

Example

```
{
  "statusCode": 0,
  "error": "BadRequest",
  "message": [
    "string"
  ]
}
```

Example

```
{
  "statusCode": 0,
  "error": "Unauthorized",
  "message": [
    "string"
  ]
}
```

Example

```
{
  "statusCode": 0,
  "error": "Forbidden",
  "message": [
    "string"
  ]
}
```

Example

```
{
  "statusCode": 0,
  "error": "NotFound",
  "message": [
    "string"
  ]
}
```

Example

```
{
  "statusCode": 0,
  "error": "InternalError",
  "message": [
    "string"
  ]
}
```
