uAPI limits

No more than 10,000 requests per hour are allowed for a single API token on one site.

Plan retries and batch processing so they stay within the hourly limit. When the limit is exceeded, the API returns REQUESTS_LIMIT.

Some modules have additional restrictions. See the uCoz limits page for per-module details.

Entry creation limit

Entry creation requests (POST) in the Site news, Blog, Publisher, Site directory, Ad board, File catalog, Online games, FAQ, Photo album, and Video modules are counted together for the whole site β€” across all these modules, regardless of API token or IP address β€” in a sliding 60-minute window:

  • free site β€” no more than 100 creation requests per hour; a site with an expired paid plan counts as free;
  • site with an active paid plan β€” no more than 500 creation requests per hour.

Entry edits (PUT) are not counted. This limit is separate from the per-token request limit described above.

Requests from the site owner, administrators, and module editors are counted separately from requests from other users β€” visitors and ordinary registered users, including requests made with their API tokens. Other users' activity never prevents the owner, administrators, and editors from creating entries. Other users' requests get HTTP 429 with the AUTOPOST_RATE_LIMIT error as soon as the site's total number of creation requests for the hour, including those of the owner, administrators, and editors, reaches the limit.

When a request from the owner, an administrator, or an editor exceeds the limit, the entry is not created and a 60-second warning period starts. Creation requests get HTTP 429 with the AUTOPOST_RATE_LIMIT error, the Retry-After header β€” the number of seconds until a slot for a new entry frees up (at least until the warning period ends) β€” and the Cache-Control: no-store header.

When many creation requests run concurrently on one site, the API may also return HTTP 429 with the AUTOPOST_RATE_LIMIT error and a short Retry-After (a few seconds). Always wait for the time in Retry-After before retrying.

If you keep sending creation requests with an owner, administrator, or editor API token after the warning period without waiting for Retry-After while the hourly limit is used up, the site is blocked for automatic posting, and entry creation requests get HTTP 403 with the AUTOPOST_BANNED error. Only support can lift the block. Requests from other users never block the site. A client that waits for Retry-After is not blocked: honor this header and spread publishing over time.

The AUTOPOST_BANNED error is returned only when the site is blocked under this rule. If support blocked the site for another reason, the module returns its usual error.

uAPI errors

Error response format

Error messages are returned in the following format:

{"error":{"msg":"Error message","code":"Error code"}}

For uAPI (Bearer) validation errors, the response body may also include a numeric num field β€” the specific reason number when code is VALIDATION_ERROR:

{"error":{"msg":"…","code":"VALIDATION_ERROR","num":2}}

Error code list

INVALID_API_KEY
Invalid API key

The API key was not found or is incorrect. The provided API key does not exist in the system. This usually means the key was mistyped, deleted, or a non-existent value is being used.

API_KEY_INACTIVE
API key is inactive

The API key exists but is disabled. The key was found in the system but is inactive and cannot be used to execute requests.

NOT_SUPPORTED_METHOD
Method not supported

You are requesting a URL that does not support the HTTP method used (GET, POST, DELETE, or PUT).

API_ACCESS_DENY
The site administrator disabled API for this module

To fix this error, open the module settings in the site Control Panel (/admin) and enable β€œEnable uAPI for module”.

REQUESTS_LIMIT
Hourly request limit exceeded

Your token is temporarily blocked: the hourly request limit was reached. See uAPI limits for details.

AUTOPOST_RATE_LIMIT
Request limit exceeded

HTTP 429 Too Many Requests: the site's hourly limit on entry creation requests was exceeded, or too many creation requests are running concurrently on the site, and the entry was not created. Retry no earlier than the number of seconds in the Retry-After header. If requests with an owner, administrator, or editor API token continue without waiting after the warning period, the site will be blocked for automatic posting. See Entry creation limit for details.

AUTOPOST_BANNED
Website is blocked

HTTP 403 Forbidden: the site is blocked for automatic posting because entry creation requests with an owner, administrator, or editor API token continued after the warning period without waiting for Retry-After. This error is returned only when the site is blocked under this rule: if support blocked the site for another reason, the module returns its usual error. Contact support to unblock it. See Entry creation limit for details.

MISSING_REQUIRED_PARAMETER
A required parameter is missing

The request does not include all required parameters. The list for each method is given in the uAPI documentation.

VALIDATION_ERROR
Data validation error (uAPI, Bearer)

The request was rejected because data does not match module rules. The response includes a num field with the specific reason number (see the response schema in Swagger for the corresponding method).

Pages module (POST /pages, PUT /pages): num: 2 β€” when owntmpl=1, a non-empty custom template body (tmpl) was sent, but the markup is missing the required $POWERED_BY$ placeholder. See the tmpl field description on the Pages module documentation page.

File Manager errors

Codes FM_* come from the File Manager API. The HTTP status below applies when the error fails the whole request. In a batch results[] item the same code and msg are used, but HTTP stays 200. If the API adds a detail, it is appended to msg after a colon.

FM_INVALID_PATH
Invalid path

The path is empty where that is forbidden, contains illegal characters, is too long, or the operation has no effect (source equals destination, or the target is the site root).

FM_INVALID_NAME
Invalid name

The file or folder name does not match the rules: a file must have an extension, a folder name cannot contain a dot, and a leaf name cannot contain slashes.

FM_INVALID_URL
Invalid URL

The download URL does not start with http:// or https://, or it has no file name with an extension.

FM_NAME_TOO_LONG
Name is too long

The name is longer than the site limit (see limits.file_name_max_len and limits.dir_name_max_len from GET /files/quota).

FM_FOLDER_DEPTH_EXCEEDED
Maximum folder depth exceeded

The folder path has more segments than limits.folder_depth.

FM_DIR_OBJECTS_LIMIT
Maximum number of objects in the folder reached

The folder already has the maximum number of visible objects (limits.files_per_dir).

FM_FORBIDDEN_EXT
Files with this extension are not allowed

The extension is on the blocked list (for example executable scripts). Current list: limits.forbidden_ext.

FM_FORBIDDEN_EXT_FREE_PLAN
Files with this extension are not allowed on the free plan

The extension is also blocked on the free plan. List: limits.forbidden_ext_free_plan.

FM_BAD_CONTENT
Forbidden content found

Forbidden content was found in the text. A block-code detail may be appended to msg.

FM_ALREADY_EXISTS
An object with this name already exists

A file or folder with this name already exists. The API does not overwrite existing files on upload or rename.

FM_RESERVED_NAME
This name is reserved by the system

The name is reserved by the system (see limits.reserved_root_names).

FM_PAGE_EXISTS
A site page with this address already exists

A site page already uses this address. Choose a different folder name.

FM_NOT_FOUND
Not found

The object was not found, or the path is inside a reserved tree.

FM_PARENT_NOT_FOUND
Parent folder not found

The parent folder does not exist. There is no recursive mkdir.

FM_FORBIDDEN
Operation is not allowed for this path

Write access to this path is denied (for example the read-only folders _fr and graffiti).

FM_UPLOAD_DISABLED
Uploading is disabled for this site

Uploading is disabled for this site. Check upload_enabled in GET /files/quota.

FM_DISK_QUOTA_EXCEEDED
Disk quota exceeded

Not enough disk space or file slots. msg may include the detail no_space or too_many_files.

FM_NO_FILE
No file received

The multipart request has no file field.

FM_EMPTY_FILE
File is empty

The file is 1 byte or smaller.

FM_FILE_TOO_LARGE
File is too large

The file is larger than limits.max_file_size (when that limit is set).

FM_TOO_MANY_FILES_IN_REQUEST
Too many files in one request

One POST /files/upload has more files than limits.max_files_per_upload.

FM_REMOTE_NOT_FOUND
Remote file could not be downloaded

The remote file could not be downloaded (10-second timeout or a network error).

FM_NOT_A_FILE
Path is not a file

A file was expected, but the path is empty or points to a folder.

FM_NOT_A_DIRECTORY
Path is not a directory

A folder was expected, but the path points to a file.

FM_NOT_TEXT
File is not a text file

The extension is not in limits.text_ext. The content methods do not read binary files.

FM_TOO_LARGE_TO_READ
File is too large to read via API

The file on disk is larger than limits.edit_max_length bytes. The API does not truncate content.

FM_TOO_LARGE_TO_EDIT
Content is too large

The content string is longer than limits.edit_max_length characters.

FM_ROOT_NOT_REMOVABLE
Root folder cannot be removed

The site root cannot be deleted.

FM_MOVE_INTO_ITSELF
Folder cannot be moved into itself

A folder cannot be moved into itself or into one of its descendants.

FM_MISSING_PARAM
Required parameter is missing

A required parameter is missing. The parameter name is appended to msg.

FM_SERVER_ERROR
Internal Server Error

An internal error occurred (for example the folder could not be read, or quota accounting is unavailable). Unknown internal codes are also replaced with this one.

AUTH_REQUIRED
Valid site API Bearer token is required

The request has no valid site-owner Bearer token.

SITE_NOT_OWNED
Site does not belong to the authenticated GUID

The token belongs to a different account, not the owner of this site.

Possible errors with legacy GUID API authorization

INVALID_CONSUMER_KEY
Invalid Consumer Key

You are using an invalid Consumer Key. Check it on the uAPI panel page.

INVALID_SIGNATURE
Invalid signature

Signature generation failed. Possible causes: incorrect Token secret; wrong parameter sorting when building the signature; missing urlencode or base64 step.

UNKNOWN_TOKEN
Token not registered in uAPI

You are using a token that does not exist. To create a token, go to the uAPI panel.

USED_NONCE
Nonce already used

The nonce value you sent was already used. nonce must be unique for each request.

ERROR_AUTH_1
Cannot process request: uID user not found or uID authorization service temporarily unavailable

Possible causes: you are using a uID user token that was deleted, or the uID.me authorization service is temporarily unavailable.

INVALID_VERIFICATION_CODE
Invalid verification code

Invalid verification code. The code is issued after you confirm app access to your data in the application. The issue is often caused by copying the code incorrectly from the browser address bar.

DUPLICATED_OAUTH_PARAMETER
Duplicate OAuth parameter

In the signed request, oauth_version (or another OAuth parameter) appears more than once. Each OAuth parameter must appear only once in the request.

INVALID_TOKEN
Invalid token

An invalid token is being used. Check it on the uAPI panel page.

If you believe the error is incorrect, contact us via the Feedback form or in the uAPI Telegram community.

Please include in your message:

  • all request parameters;
  • the signed request (signature);
  • a description of the action that triggers the error.

This will help us investigate faster and provide an accurate answer.