- v0
- v1
- 인증
- 유저
- 이미지
- 이야기
단일 이야기 생성
Develop Env
Develop Env
POST
/apis/v1/posts
Request
Body Params application/json
title
string
required
summary
string
required
content
string
required
thumbnailPath
string | null
optional
category
enum<string>
required
Allowed values:
GENERAL_KNOWLEDGEETYMOLOGYPURE_KOREANQUOTATIONINFORMATIONNONSENSE
Example
{
"title": "Postman 게시글",
"summary": "Postman 게시글 요약",
"content": "Postman 게시글 요약입니다.\n대충 아무말 작성",
"category": "GENERAL_KNOWLEDGE"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:9050/apis/v1/posts' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Postman 게시글",
"summary": "Postman 게시글 요약",
"content": "Postman 게시글 요약입니다.\n대충 아무말 작성",
"category": "GENERAL_KNOWLEDGE"
}'
Responses
🟢201🟢 이야기 생성 성공
application/json
Body
toast
object (Toast)
required
title
string
required
description
string
required
payload
object (Post)
required
id
string
required
createdAt
string
required
Default:
CURRENT_TIMESTAMP
updatedAt
string
required
deletedAt
string | null
optional
title
string
required
summary
string
required
content
string
required
thumbnailPath
string | null
optional
category
enum<string>
required
Allowed values:
GENERAL_KNOWLEDGEETYMOLOGYPURE_KOREANQUOTATIONINFORMATIONNONSENSE
userId
string
required
Example
{
"toast": {
"title": "게시글 작성 완료",
"description": "게시글을 작성했습니다.\n메인 페이지로 이동합니다!"
},
"payload": {
"id": "af27e410-b35a-4e9b-8e63-fcadffc6a0a6",
"createdAt": "2025-01-12T01:05:35.042Z",
"updatedAt": "2025-01-12T01:05:35.042Z",
"deletedAt": null,
"title": "Postman 게시글",
"summary": "Postman 게시글 요약",
"content": "Postman 게시글 요약입니다.\n대충 아무말 작성",
"thumbnailPath": null,
"category": "GENERAL_KNOWLEDGE",
"userId": "00000000-0000-0000-0000-000000000000"
}
}
🟠400🔴 유효성 검사 실패
🟠403🔴 권한없음
🟠409🔴 중복된 요청
Modified at 2025-01-14 08:53:22