푸시알림 V2 API Endpoints
🔔 최신화 일자: 2025-10-15
nachocode 푸시 API는 다양한 엔드포인트를 제공하여 푸시 알림 관리 및 전송을 지원합니다.
이 문서에서는 API 사용법, 요청/응답 형식, 에러 케이스 등을 다룹니다.
[POST] /api/push/v2/messages
설명
- 개별적으로 설정된 메시지를 각 유저 ID의 푸시 토큰에 전송합니다.
- 요청된 유저의 총 푸시 토큰 수에 따라 요청 건수가 차감됩니다.
요청 당 메세지의 최대 개수는 200개이며, Body의 크기는 150KB를 초과하지 않아야 합니다.
토큰이 없거나, 토큰 만료 또는 앱 삭제의 이유로 전송 불가한 유저의 목록은 웹훅을 통해 확인할 수 있습니다.
➡️ 전송불가 유저 웹훅 개요
➡️ 전송불가 유저 웹훅 등록
Request
-
Header
Parameter Type Required Description x-api-key string✔ API 키 x-secret-key string✔ Secret 키 -
Body
Parameter Type Required Constraints Description messages Message[]✔ 길이 200이하의 배열 전송할 메시지 배열 options PushOptions푸시 상세 옵션 -
Example
{
"header": { "x-api-key": "APIKEYVALUE", "x-secret-key": "SECRETKEYVALUE" },
"body": {
"messages": [
{
"userId": "nachoUser1",
"title": "나쵸코드 업데이트",
"content": "새로운 기능이 추가되었습니다.",
"linkURL": "https://nachocode.io",
"imageURL": "https://example.com/images/sample-image.jpg" // since App Source ver.1.6.0
},
{
"userId": "nachoUser2",
"title": "알림 메시지",
"content": "지금 확인하세요!"
}
],
"options": {
"isUsingBadge": true // since App Source ver.1.5.0
}
}
}
Response
-
Success Response
-
Property
Properties Type Description status numberHTTP 응답 상태 코드 (200) response string요청 성공 문자열 -
Example
"Push successfully requested to be sent."
-
-
Error Response
-
에러코드
(샌드박스 혹은 운영환경에서 아래에 명세되지 않은 에러 코드를 수신받을 경우 나쵸코드로 문의해주세요.)ErrorCode Status Code Message Description ERR-AB-PSS-91 404 App data not found. 미등록 앱 ERR-AB-PSS-92 404 FCM Account data not found. FCM Service Account파일 미등록
[POST] /api/push/v2/users
설명
- 동일한 제목과 내용으로 여러 유저에게 푸시 알림을 전송합니다.
- 유저 ID로 조회된 모든 푸시 토큰을 대상으로 전송합니다.
- 유저 1명당 요청 건수를 차감합니다.
요청 당 userId의 최대 개수는 500개입니다.
토큰이 없거나, 토큰 만료 또는 앱 삭제의 이유로 전송 불가한 유저의 목록은 웹훅을 통해 확인할 수 있습니다.
➡️ 전송불가 유저 웹훅 개요
➡️ 전송불가 유저 웹훅 등록
Request
-
Header
Parameter Type Required Description x-api-key string✔ API 키 x-secret-key string✔ Secret 키 -
Body
Parameter Type Required Constraints Description userIds (string | number)[]✔ 길이 500이하의 배열 푸시를 전송할 유저 ID 배열 title string✔ 푸시 알림 제목 content string✔ 푸시 알림 내용 linkURL string길이 255이하의 배열 푸시 클릭 시 이동할 URL imageURL string- 길이 500이하의 문자열
- App Source ver.1.6.0이상의 앱
(25년 06월 11일 이후 빌드된 앱에서만 노출)
⚠️FCM정책에 따라 아래 조건에서는 이미지가 노출되지 않을 수 있습니다.
- SSL인증이 되지 않은 http프로토콜 링크
- 용량이 1MB를 초과하는 이미지
- 리다이렉션 처리 되는 링크푸시에 표시될 이미지의 링크 options PushOptions푸시 상세 옵션 -
Example
{
"header": { "x-api-key": "APIKEYVALUE", "x-secret-key": "SECRETKEYVALUE" },
"body": {
"userIds": ["nachoUser1", "nachoUser2", 3, 4],
"title": "나쵸코드 개인화 푸시 기능 추가!",
"content": "새로운 기능이 추가되었습니다.",
"linkURL": "https://nachocode.io",
"imageURL": "https://example.com/images/sample-image.jpg", // since App Source ver.1.6.0
"options": {
"isUsingBadge": true // since App Source ver.1.5.0
}
}
}
Response
-
Success Response
-
Property
Properties Type Description status numberHTTP 응답 상태 코드 (200) response string요청 성공 문자열 -
Example
"Push successfully requested to be sent."
-
-
Error Response
-
에러코드
(샌드박스 혹은 운영환경에서 아래에 명세되지 않은 에러 코드를 수신받을 경우 나쵸코드로 문의해주세요.)ErrorCode Status Code Message Description ERR-AB-PSS-91 404 App data not found. 미등록 앱 ERR-AB-PSS-92 404 FCM Account data not found. FCM Service Account 파일 미등록
[POST] /api/push/v2/topic
설명
- 특정 토픽에 대한 구독 과정을 통해 구독된 모든 디바이스로 푸시를 전송합니다.
- 토픽 푸시 전송 요청 건수에 따라 차감됩니다.
Request
-
Header
Parameter Type Required Description x-api-key string✔ API 키 x-secret-key string✔ Secret 키 -
Body
Parameter Type Required Constraints Description topicName string✔ 길이 500이하의 문자열 푸시를 전송할 토픽명 title string✔ 푸시 알림 제목 content string✔ 푸시 알림 내용 linkURL string길이 255이하의 문자열 푸시 클릭 시 이동할 URL imageURL string- 길이 500이하의 문자열
- App Source ver.1.6.0이상의 앱
(25년 06월 11일 이후 빌드된 앱에서만 노출)
⚠️FCM정책에 따라 아래 조건에서는 이미지가 노출되지 않을 수 있습니다.
- SSL인증이 되지 않은 http프로토콜 링크
- 용량이 1MB를 초과하는 이미지
- 리다이렉션 처리 되는 링크푸시에 표시될 이미지의 링크 options PushOptions푸시 상세 옵션 -
Example
{
"header": { "x-api-key": "APIKEYVALUE", "x-secret-key": "SECRETKEYVALUE" },
"body": {
"topicName": "update-topic",
"title": "나쵸코드 업데이트",
"content": "토픽 푸시 기능이 추가되었습니다.",
"linkURL": "https://nachocode.io",
"imageURL": "https://example.com/images/sample-image.jpg", // since App Source ver.1.6.0
"options": {
"isUsingBadge": true // since App Source ver.1.5.0
}
}
}
Response
-
Success Response
-
Property
Properties Type Description status numberHTTP 응답 상태 코드 (200) response string요청 성공 문자열 -
Example
"Push successfully requested to be sent."
-
-
Error Response
-
에러코드
(샌드박스 혹은 운영환경에서 아래에 명세되지 않은 에러 코드를 수신받을 경우 나쵸코드로 문의해주세요.)ErrorCode Status Code Message Description ERR-AB-PSS-91 404 App data not found. 미등록 앱 ERR-AB-PSS-92 404 FCM Account data not found. FCM Service Account파일 미등록 ERR-AB-CST-51 400 No topics are available to send. 전송이 불가하거나 존재하지 않는 토픽
[POST] /api/push/v2/topic/subscription
설명
- SDK의
registerPushToken()을 통해 토큰이 등록된 유저에 한하여, 해당 유저들의 토큰을 토픽에 구독시킵니다. - FCM으로의 구독과정 중 발견된 유효하지 않은 토큰의 경우, nachocode server에서 자동 삭제됩니다.
- 유저 1명당 요청 건수를 차감합니다.
요청 당 userId의 최대 개수는 100개입니다.
Request
-
Header
Parameter Type Required Description x-api-key string✔ API 키 x-secret-key string✔ Secret 키 -
Body
Parameter Type Required Constraints Description userIds (string | number)[]✔ 길이 100이하의 배열 구독할 유저 ID 배열 topicName string✔ 길이 500이하의 문자열 구독시킬 토픽 명 -
Example
{
"header": { "x-api-key": "APIKEYVALUE", "x-secret-key": "SECRETKEYVALUE" },
"body": {
"userIds": ["nachoUser1", "nachoUser2", 3, 4],
"topicName": "나쵸코드 개인화 푸시 기능 추가!"
}
}
Response
-
Success Response
-
Property
Properties Type Description status numberHTTP 응답 상태 코드 (200) response Subscription Result 구독 성공, 구독 실패, 등록된 토큰 부재, 토큰 삭제 유저의 목록 -
Example
{
"success": ["nachoUser1", "nachoUser2", "nachoUser3"],
"notFound": ["nachoUser4", "nachoUser5"],
"failed": ["nachoUser1", "nachoUser6"]
}
-
-
Error Response
-
에러코드
(샌드박스 혹은 운영환경에서 아래에 명세되지 않은 에러 코드를 수신받을 경우 나쵸코드로 문의해주세요.)ErrorCode Status Code Message Description ERR-AB-PSS-91 404 App data not found. 미등록 앱 ERR-AB-PSS-92 404 FCM Account data not found. FCM Service Account 파일 미등록
[DELETE] /api/push/v2/topic/subscription
설명
- SDK의
registerPushToken()을 통해 토큰이 등록된 유저에 한하여, 해당 유저들의 토큰을 토픽에서 구독을 해제합니다. - FCM으로의 구독해제 과정 중 발견된 유효하지 않은 토큰의 경우, nachocode server에서 자동 삭제됩니다.
- 유저 1명당 요청 건수를 차감합니다.
요청 당 userId의 최대 개수는 100개입니다.
Request
-
Header
Parameter Type Required Description x-api-key string✔ API 키 x-secret-key string✔ Secret 키 -
Body
Parameter Type Required Constraints Description userIds (string | number)[]✔ 길이 100이하의 배열 구독해제할 유저 ID 배열 topicName string✔ 길이 500이하의 문자열 구독을 해제시킬 토픽 명 -
Example
{
"header": { "x-api-key": "APIKEYVALUE", "x-secret-key": "SECRETKEYVALUE" },
"body": {
"userIds": ["nachoUser1", "nachoUser2", 3, 4],
"topicName": "나쵸코드 개인화 푸시 기능 추가!"
}
}
Response
-
Success Response
-
Property
Properties Type Description status numberHTTP 응답 상태 코드 (200) response Subscription Result 구독해제 성공, 구독해제 실패, 등록 토큰 부재, 토큰 삭제 유저의 목록 -
Example
{
"success": ["nachoUser1", "nachoUser2", "nachoUser3"],
"notFound": ["nachoUser4", "nachoUser5"],
"failed": ["nachoUser1", "nachoUser6"]
}
-
-
Error Response
-
에러코드
(샌드박스 혹은 운영환경에서 아래에 명세되지 않은 에러 코드를 수신받을 경우 나쵸코드로 문의해주세요.)ErrorCode Status Code Message Description ERR-AB-PSS-91 404 App data not found. 미등록 앱 ERR-AB-PSS-92 404 FCM Account data not found. FCM Service Account 파일 미등록