Skip to content

Your first API call

Before you build a larger integration, confirm your setup with one request. The goal is to make a single authenticated call against a project-scoped endpoint, inspect the response, and prove that your token and project access work.

You need:

  • An MK.IO account with access to at least one project.
  • A personal API token.
  • The name of the project you want to query.

If you still need a token, follow Authentication and tokens.

Export the values the request needs, so the command stays readable and retries are less error-prone:

Terminal window
export MKIO_BASE_URL="https://app.mk.io"
export MKIO_PROJECT="<PROJECT_NAME>"
export MKIO_TOKEN="<YOUR_TOKEN>"

Run the Media API list-assets operation:

Terminal window
curl -X GET "$MKIO_BASE_URL/api/v1/projects/$MKIO_PROJECT/media/assets" \
-H "Authorization: Bearer $MKIO_TOKEN" \
-H "Accept: application/json"

To see the HTTP status line as well, add -i:

Terminal window
curl -i -X GET "$MKIO_BASE_URL/api/v1/projects/$MKIO_PROJECT/media/assets" \
-H "Authorization: Bearer $MKIO_TOKEN" \
-H "Accept: application/json"

A successful response is HTTP 200 with a list body. List endpoints return two top-level fields:

  • value: the returned assets.
  • supplemental: list metadata, including supplemental.pagination with the record counts.
{
"value": [
{ "name": "example-asset" }
],
"supplemental": {
"count": 1,
"kind": "Asset",
"operation": "list",
"pagination": { "start": 0, "end": 1, "records": 1, "total": 1 }
}
}

Many MK.IO list endpoints use this same shape, so it is worth recognising now. See Pagination and filtering for how to page and narrow these responses.

This endpoint returns the platform’s standard error responses:

Status codeMeaningWhat to check next
400Bad RequestRecheck the URL, query parameters, and request syntax.
401UnauthorizedRecheck the bearer token and Authorization header.
403ForbiddenRecheck that the user has access to the target project and operation.
404Not FoundRecheck the project name and path.
429Too Many RequestsSlow down and retry later.
500Internal Server ErrorRecord the response ref value before retrying or contacting support.

The error body carries error.code for programmatic handling, error.detail for logs, and ref for support follow-up. See Error handling for the full model.

A successful request proves that your token is valid, your base URL is correct, your project name is correct, and you can reach a real project-scoped endpoint. That is enough to move on to resource creation with far less guesswork.

© 2026 MediaKind. All rights reserved.