01 Getting started
1.1 Have your API key ready first
Create a key on your workspace's API key screen, then call the token endpoint. The key is shown only once, when it is created.
- Create an API key on the
/app/w/{워크스페이스}/api-keysscreen in the app. The plaintext key is shown only once, at the moment it is created, so store it somewhere safe right away. - Call
POST /auth/tokenfrom your server to get a token valid for 1 hour. - Send the token in the
Authorization: Bearer <ACCESS_TOKEN>header of subsequent requests.
Base URL · v1
https://moacast.com/api/moacast/v1
02 Authentication flow
2.1 From key to token
- Create an API key
- Issue a token
- Call with Bearer
You don't send your API key in request headers directly. Use the key once to get a token, then make calls with that token. A key is a long-lived secret, so sending it with every request would leave it in proxy logs and debug output, whereas a token that leaks expires within an hour.
| Items | Value |
|---|---|
Authorization | Bearer <ACCESS_TOKEN> — send the data.access_token from the token response as is. |
| Token lifetime | 1 hour (3,600 seconds). When it expires, get a new one with the same key. |
| Scope | The single workspace you chose when getting the token. To work with another workspace, get a new token with that workspace's code. |
| Renewal | There is no dedicated renewal endpoint. Just issue a new token before or after it expires. |
When you revoke a key, tokens created with it are blocked from the next call onward. You don't have to wait for them to expire.
03 Requests and responses
3.1 Walk through your first request
The values below are fake examples that show the format. No real keys or tokens are included.
REQUEST · bash — POST /auth/token
curl -X POST https://moacast.com/api/moacast/v1/auth/token \
-H 'Content-Type: application/json' \
-d '{"api_key":"mc_live_xxxxxxxxxxxx","workspace":"a1b2c3d4"}'RESPONSE · JSON — 200 OK
{
"result": "SUCCESS",
"result_code": 0,
"origin_time": 1790385521,
"message": "토큰을 발급했습니다.",
"data": {
"access_token": "<ACCESS_TOKEN>",
"token_type": "Bearer",
"expires_in": 3600,
"workspace": "a1b2c3d4"
},
"elapsed_time": "0.0291"
}Subsequent requests use the Authorization: Bearer <ACCESS_TOKEN> header. A token is valid for one workspace only and expires after 1 hour.
curl https://moacast.com/api/moacast/v1/workspaces \
-H 'Authorization: Bearer <ACCESS_TOKEN>'3.2 Response format
Every response comes in the same envelope. Two values tell success from failure — the HTTP status code and the envelope's result.
| Field | Meaning |
|---|---|
result | SUCCESS or FAILED |
result_code | 0 on success; on failure, one of the codes in the errors section below. |
message | A human-readable line. It may be absent from read responses, so don't branch on it. |
data | The actual payload. Its shape differs by endpoint. |
origin_time | When the server received the request (Unix seconds). |
elapsed_time | How long the server took to process it (seconds). |
Success
{
"result": "SUCCESS",
"result_code": 0,
"origin_time": 1790385521,
"data": {},
"elapsed_time": "0.0291"
}Failed
{
"result": "FAILED",
"result_code": 1001,
"origin_time": 1790385678,
"message": "...",
"elapsed_time": "0.0240"
}Failure responses have no data. When it can tell you which field was the problem, field or missing_params is included at the top level of the envelope.
Paging in lists
Endpoints that return multiple items also return pagination. If has_more is true, there is a next page.
"pagination": {
"mode": "page",
"page": 1,
"limit": 20,
"total": 1,
"total_pages": 1,
"has_more": false
}04 Parameters
4.1 Values a request needs
Parameters, using token issuance as an example. Check the linked detail pages for each endpoint's actual spec.
Token issuance parameters
| Name | Category | Description |
|---|---|---|
api_key | Required | API key issued in the app |
workspace | Required | Code of the workspace the token will access |
05 Errors and limits
5.1 Failures that are easy to read
Check both the response's HTTP status and result_code. If you exceed the rate limit, retry according to the Retry-After header.
Common errors
| HTTP | result_code | Meaning |
|---|---|---|
| 401 | 1001 | Authentication header is missing or invalid |
| 400 | 9912 | Required parameter missing |
| 429 | 4290 | Rate limit exceeded |
The table below lists other errors you may run into and how to handle them.
| Code | HTTP | When | What to do |
|---|---|---|---|
1001 | 401 | The Authorization header is missing or the token is invalid. | Get a new token with your key and send it in the header. |
4013 | 401 | The token has expired. | Get a new token with the same key. |
4014 | 401 | The API key that created the token has been revoked. | Create a new key and get a new token. |
1004 | 400 | A parameter value doesn't meet the rules. | Fix the field named in field and send it again. |
9912 | 400 | A required parameter is missing. | Fill in the name given in missing_params and send it. |
2000 | 404 | The specified workspace or channel doesn't exist. | Check the code and channel key. Targets you don't have access to return the same response. |
4013 | 409 | The channel's authorization has expired and can't be restored. | Reconnect that channel on the Channels screen in the app. |
4290 | 429 | Too many requests. | Wait the number of seconds given in the Retry-After header, then send it again. |
5000 | 500 | The server couldn't process the request. | Try again in a moment. If it keeps happening, let us know. |
9901–9904 | 400 · 405 | The endpoint was called with a method it doesn't accept. | Send with a method the endpoint accepts. PATCH is not accepted, so use PUT. |
9999 | 404 | No such endpoint. | Check the path spelling and version (v1). |
5.2 Rate limits
When you exceed a limit, we respond with 429 and a header telling you when you can send again.
| Target | Limit |
|---|---|
| All calls | 600 per minute per IP |
POST /auth/token | 30 per minute per IP. Since tokens last an hour, this is plenty for normal use. |
POST /channels/sync | Once per 60 seconds per channel |
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Number of requests allowed in this window |
X-RateLimit-Remaining | Remaining requests |
Retry-After | Seconds until you can send again. Only included with 429. |
06 endpoint
Browse endpoints by feature
Endpoints published in the customer API docs index. Click a row to go to its detail page. Exchanges an issued API key for a short-lived token. This is the first call of the customer API, and the only endpoint you can call without authentication. Your workspace. Channels, feeds, and keys all belong to it. Tokens are issued for one workspace, so the code you get here is a parameter in almost every call that follows. Platform accounts the workspace has connected. Creating a new connection is the one thing you can't do through the API — it requires going through the platform's consent screen in a browser. Posts actually live on your connected channels. Reads return only what has already been fetched, so they're fast; fetching new data is a separate call. Where you register what you're going to publish. Videos are uploaded along with the file, and if you provide an external ID, sending the same request again won't create a duplicate. You can also schedule per channel at the same time you register. See what goes out to which channel and when, in time order. Both the calendar and the timeline are drawn from this one endpoint. 6.1 Authentication
POST /auth/token6.2 Workspace
GET /workspacesPUT /workspaces/{code}6.3 Channels
GET /channelsPOST /channels/syncDELETE /channels6.4 Feed
GET /feedPOST /feed6.5 Content
GET /contentsPOST /contentsGET /contents/{id}PUT /contents/{id}POST /contents/schedule6.6 Scheduled
GET /publishes
