DEVELOPERS / V1

A clear guide for developers.

A documentation layout for quickly finding the authentication flow and main endpoints you need when using the moaCast API.

Version: v1

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.

  1. Create an API key on the /app/w/{워크스페이스}/api-keys screen in the app. The plaintext key is shown only once, at the moment it is created, so store it somewhere safe right away.
  2. Call POST /auth/token from your server to get a token valid for 1 hour.
  3. Send the token in the Authorization: Bearer <ACCESS_TOKEN> header of subsequent requests.

Base URL · v1

https://moacast.com/api/moacast/v1

The endpoint sections below omit the base URL.

02 Authentication flow

2.1 From key to token

  1. Create an API key
  2. Issue a token
  3. 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.

Authentication spec
ItemsValue
AuthorizationBearer <ACCESS_TOKEN> — send the data.access_token from the token response as is.
Token lifetime1 hour (3,600 seconds). When it expires, get a new one with the same key.
ScopeThe single workspace you chose when getting the token. To work with another workspace, get a new token with that workspace's code.
RenewalThere 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.

If you suspect a key has leaked, revoke it immediately on the API key screen in the app and create a new one. Revoked keys cannot be restored.

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

Terminal — bash
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

Response — JSON
{
  "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.

Terminal — bash
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.

Response envelope fields
FieldMeaning
resultSUCCESS or FAILED
result_code0 on success; on failure, one of the codes in the errors section below.
messageA human-readable line. It may be absent from read responses, so don't branch on it.
dataThe actual payload. Its shape differs by endpoint.
origin_timeWhen the server received the request (Unix seconds).
elapsed_timeHow long the server took to process it (seconds).

Success

Response — JSON
{
  "result": "SUCCESS",
  "result_code": 0,
  "origin_time": 1790385521,
  "data": {},
  "elapsed_time": "0.0291"
}

Failed

Response — JSON
{
  "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.

Response — JSON
"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

Token issuance parameters
NameCategoryDescription
api_keyRequiredAPI key issued in the app
workspaceRequiredCode of the workspace the token will access

Token issuance details

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

Common errors
HTTPresult_codeMeaning
4011001Authentication header is missing or invalid
4009912Required parameter missing
4294290Rate limit exceeded

The table below lists other errors you may run into and how to handle them.

Error code
CodeHTTPWhenWhat to do
1001401The Authorization header is missing or the token is invalid.Get a new token with your key and send it in the header.
4013401The token has expired.Get a new token with the same key.
4014401The API key that created the token has been revoked.Create a new key and get a new token.
1004400A parameter value doesn't meet the rules.Fix the field named in field and send it again.
9912400A required parameter is missing.Fill in the name given in missing_params and send it.
2000404The specified workspace or channel doesn't exist.Check the code and channel key. Targets you don't have access to return the same response.
4013409The channel's authorization has expired and can't be restored.Reconnect that channel on the Channels screen in the app.
4290429Too many requests.Wait the number of seconds given in the Retry-After header, then send it again.
5000500The server couldn't process the request.Try again in a moment. If it keeps happening, let us know.
9901–9904400 · 405The endpoint was called with a method it doesn't accept.Send with a method the endpoint accepts. PATCH is not accepted, so use PUT.
9999404No such endpoint.Check the path spelling and version (v1).

4013 means different things depending on the HTTP status code — with 401 the token has expired, and with 409 the channel needs to be reconnected.

We don't distinguish between targets that don't exist and targets you can't access. This keeps responses from revealing whether someone else's workspace exists.

5.2 Rate limits

When you exceed a limit, we respond with 429 and a header telling you when you can send again.

Rate limits
TargetLimit
All calls600 per minute per IP
POST /auth/token30 per minute per IP. Since tokens last an hour, this is plenty for normal use.
POST /channels/syncOnce per 60 seconds per channel
Rate limit response headers
HeaderMeaning
X-RateLimit-LimitNumber of requests allowed in this window
X-RateLimit-RemainingRemaining requests
Retry-AfterSeconds until you can send again. Only included with 429.

Plan-based rate limits and credit deductions are not applied yet. Once they are, the numbers will appear in this section.

06 endpoint

Browse endpoints by feature

Endpoints published in the customer API docs index. Click a row to go to its detail page.

6.1 Authentication

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.

View all Authentication endpoints

6.2 Workspace

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.

View all Workspace endpoints

6.3 Channels

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.

View all Channels endpoints

6.4 Feed

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.

View all Feed endpoints

6.5 Content

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.

View all Content endpoints

6.6 Scheduled

See what goes out to which channel and when, in time order. Both the calendar and the timeline are drawn from this one endpoint.

View all Scheduled endpoints