REST API

발행

올리고, 읽고, 다시 시도하고, 지웁니다.

GET/v1/posts

최근 발행. 최신순이고 답글은 목록에 안 섞입니다.

페이지 넘기기

이름타입설명
limitquery1-100, defaults to 20.
beforequeryA publish id from a previous page's nextBefore. Returns the ones older than it.
includeDeletedquerytrue brings back posts you deleted from the channel. They are hidden by default. Our record and its metrics stay either way.
statusqueryNarrow to one status: publishing, published, partial, failed or cancelled. Omit for everything.
hasMoreresponseThe list was cut short.
nextBeforeresponsePass it back as before. Absent when there is nothing more.

POST/v1/posts

연결된 계정 하나 이상에 올립니다.

이름타입설명
content필수stringPost text. Emoji count as UTF-8 bytes.
accountIds필수string[]Ids from GET /v1/accounts.
mediaIdsstring[]Media already confirmed with complete.
replyTostringPublish this as a reply to that post id.
threadItemsobject[]Split a long post into a chain: [{ content, mediaIds? }]. The first item is the root, the rest become replies under it in order. Each item obeys the character limit on its own. Exclusive with content. If a later item fails the ones already up stay up, and the response carries thread.resumeFrom.
topicTagstringOne topic to tag the post with. Threads takes exactly one and rejects periods and ampersands. On a thread it applies to the first piece only.
Idempotency-KeyheaderSend the same key when you retry and we return the first answer instead of publishing twice. Reusing a key with a different body is a 422. Kept for 24 hours.
waitbooleanHold the response until the post is really out. Text waits up to 10 seconds, media up to 90. Past that you get the usual 202 with a next hint, and the post keeps going. Defaults to false.
curl -X POST https://api.uplika.com/v1/posts \
  -H "authorization: Bearer $UPLIKA_KEY" \
  -H "content-type: application/json" \
  -d '{
    "content": "Now with images",
    "accountIds": ["acc_01H..."],
    "mediaIds": ["med_01H..."]
  }'

GET/v1/posts/{id}

발행 하나와 대상별 상태.

대상 상태

이름타입설명
publishingstatusIn flight at the channel.
publishedstatusCarries externalId and url.
partialstatusSome channels went out and some did not. Retry sends only the ones that failed. There is no 207 — publishing is 202 plus polling, so nothing is held open.
cancelledstatusDeleted from the channel. Our record and its metrics stay. Hidden from GET /v1/posts unless you pass includeDeleted=true.
failedstatusCarries error.

발행 하나에 채널마다 행이 하나입니다. publishing 은 진행 중, published 는 채널의 id 와 주소를 들고 있고, failed 는 사유를 들고 있습니다.

POST/v1/posts/{id}/retry

실패한 대상만 다시 시도합니다. 이미 나간 대상은 건너뜁니다.

DELETE/v1/posts/{id}

채널에서 글을 지우고 우리 기록도 삭제로 표시합니다.

채널에 이미 있는 것 읽기

우리 기록에는 우리를 거쳐 나간 것만 있습니다. 아래 넷은 채널 자체를 읽고, 어디에 올릴지를 고릅니다. list_channel_posts · get_quota · open_post · select_channels 뒤에 있는 라우트라 REST 로도 같은 답을 받습니다.

GET/v1/posts/{id}/thread

글 하나와 댓글·지표를 한 번에 받습니다.

GET/v1/channels/posts

앱에서 직접 쓴 글까지, 지금 채널에 있는 것.

쿼리

이름타입설명
accountIdqueryLimit to one connected account. Omit to cover every channel.
limitquery1-100, defaults to 25.

GET/v1/channels/quota

24시간 한도를 채널이 얼마나 썼다고 말하는지.

POST/v1/accounts/select

연결된 채널 중 어디에 올릴지 고릅니다.

이름타입설명
scopestring | string[]Omit to list candidates. "all" for every active channel, or an array mixing platform names, handles and account ids.
publishing ──► published     the channel accepted it, permalink is set
           └─► partial       some channels made it, some did not
           └─► failed        none of them made it, error says why

failed     ──► publishing   retry, and only the targets that failed go again
published  ──► cancelled    you deleted it; our record and its metrics stay

자주 묻는 것

여러 채널에 한 번에 올리려면요?

accountIds 에 다 적어서 한 번만 부르면 됩니다. 요청 하나가 발행 하나를 만들고 채널마다 행이 하나씩 붙어서, 결과를 여러 호출에 걸쳐 맞춰 볼 필요가 없습니다.

202 는 무슨 뜻인가요?

글을 받았고 채널은 아직 대답하지 않았다는 뜻입니다. 무엇이 올라갔는지는 대상별 상태를 봐야 알고, 맨 위 응답은 일이 시작됐다는 것만 말합니다.

올라간 글을 지울 수 있나요?

됩니다. 채널에서 지우고 우리 기록은 삭제로 표시합니다. 그래서 그 글이 있었다는 것과 언제 나갔는지는 기록에 남습니다.