Amazon Pinpoint
REST API Reference

APNs Channel

A channel defines the types of platforms to which you can deliver messages. Before you can use Amazon Pinpoint to send messages using Apple Push Notification service (APNs), you must create an APNs channel. You can use this resource to create, update, look up, or delete an APNs channel.

URI

/v1/apps/application-id/channels/apns

HTTP Methods

DELETE

Deletes the APNs channel for an app.

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

APNSChannelResponse

GET

Returns information about the APNs channel for an app.

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

APNSChannelResponse

PUT

Use to update the APNs channel for an app.

Body

Name Required Type

APNSChannelRequest

true

APNSChannelRequest

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

200

APNSChannelResponse

Errors

Errors

Status Code Schema Error Type

400

MessageBody

BadRequestException

403

MessageBody

ForbiddenException

404

MessageBody

NotFoundException

405

MessageBody

MethodNotAllowedException

429

MessageBody

TooManyRequestsException

500

MessageBody

InternalServerErrorException

Schemas

Request Schemas

Example APNSChannelRequest

{ "Certificate": "string", "PrivateKey": "string", "Enabled": true, "TokenKeyId": "string", "TeamId": "string", "TokenKey": "string", "BundleId": "string", "DefaultAuthenticationMethod": "string" }

Response Schemas

Example APNSChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "HasTokenKey": true, "DefaultAuthenticationMethod": "string" }

Example MessageBody

{ "RequestID": "string", "Message": "string" }

Attributes

APNSChannelRequest

Attribute Type Description

BundleId

string

The bundle id used for APNs Tokens.

Certificate

string

The distribution certificate from Apple.

DefaultAuthenticationMethod

string

The default authentication method used for APNs.

Enabled

boolean

If the channel is enabled for sending messages.

PrivateKey

string

The certificate private key.

TeamId

string

The team id used for APNs Tokens.

TokenKey

string

The token key used for APNs Tokens.

TokenKeyId

string

The token key used for APNs Tokens.

APNSChannelResponse

Attribute Type Description

ApplicationId

string

The ID of the application that the channel applies to.

CreationDate

string

The date and time when this channel was created.

DefaultAuthenticationMethod

string

The default authentication method used for APNs.

Enabled

boolean

If the channel is enabled for sending messages.

HasCredential

boolean

Not used. Retained for backwards compatibility.

HasTokenKey

boolean

Indicates whether the channel is configured with a key for APNs token authentication. Provide a token key by setting the TokenKey attribute.

Id

string

(Deprecated) An identifier for the channel. Retained for backwards compatibility.

IsArchived

boolean

Indicates whether or not the channel is archived.

LastModifiedBy

string

The user who last updated this channel.

LastModifiedDate

string

The date and time when this channel was last modified.

Platform

string

The platform type. For this channel, the value is always "ADM."

Version

integer

The channel version.

MessageBody

Attribute Type Description

Message

string

The error message that's returned from the API.

RequestID

string

The unique message body ID.