Handle API errors

Every third-party API error carries an HTTP status, a string code, and a message. Match on the code, and retry only what's safe to retry.

This page covers the endpoints under /api/thirdparty: the access token, communities, groups, members, moderators, and video posts. Each endpoint's reference lists the errors it returns. This page explains the shape they share and what to do about each one.

The error response

An error has an HTTP status in the 4xx range and a JSON body with three fields.

Error response
json
{
  "code": "5218",
  "message": "The community you are looking for is no longer available.",
  "data": {}
}
FieldTypeDescription
codestringGenuin's error code, such as "5218". It identifies the cause more precisely than the HTTP status, and it's the value to match on.
messagestringA sentence for logs and support tickets. Some messages carry a literal XXXX- prefix, such as XXXX-[Invalid Use of API].
dataobjectUsually {}. A few errors put details here: data.err_msg lists rejected link-out URLs, and data.video_id names the video a duplicate upload matched.

A successful call uses the same three fields with code set to the number 200, so a client can read every response the same way. On errors the code is a string; on success it's a number.

Validation errors

Each endpoint checks the body against its schema before doing anything. How it reports a failure differs by endpoint.

EndpointHTTP statusWhat comes back
Generate an access token412code 5166 when a field is missing or isn't a string; 5272 with data.err_msg when the body isn't valid JSON.
Create a community400No code or message. data.message names the failing fields, such as handle, type.
Create a group, Post a video, Update a group400{"data": {}} and nothing else. The failing field isn't reported.
Add members, Add moderators412code 5166.

For the three endpoints that return an empty body, compare your request with the endpoint's Parameters table. The usual causes are a value of the wrong type, such as a number where a string is expected, a value outside its allowed set, and a missing required field.

Authentication errors

Every endpoint except the token endpoint reads the bearer token from the Authorization header before anything else. Three errors come from that check.

HTTP statuscodeCauseFix
401 Unauthorized1003The header is missing, the token has expired, or the account behind it is no longer active. Message: authentication is required.Request a new token with Generate an access token and send it as Authorization: Bearer <token>.
401 Unauthorized5033The token wasn't issued by the token endpoint, such as a device token from an app session. Message: Invalid or tempered token.Use a token from POST /api/thirdparty/auth.
404 Not Found5235The brand the token belongs to isn't active. Message: Brand not exists.Contact the Genuin team.

Error codes

Codes are shared across endpoints. This table lists every code the third-party endpoints return, grouped by HTTP status.

HTTP statuscodeMeaningReturned by
4001099The server failed while handling a valid request. Message: An unexpected error occurred processing the requestAny endpoint
4011003Missing, expired, or revoked token. Message: authentication is required.Any endpoint that takes a token
4015033Token not issued by the token endpoint. Message: Invalid or tempered token.Any endpoint that takes a token
4015159The account can't make this call: it isn't a member of the community, isn't the group's owner or an admin, or sent a brand_id it isn't a user of. Message: Invalid Use of APICreate a community, Create a group, Update a group
4035230A community or group setting excludes the account, such as who can create groups or who can post. Message: XXXX-[Access Denied].Create a group, Post a video
4035243The community or group belongs to a brand outside your network. Message: XXXX-[given user's brand_id is being conflicted with asked content's brand_id].Create a group, Post a video
4045044No group with that chat_id, or it's deleted or flagged. Message: Can't find group. It may have been deleted by you or the other person in the group.Post a video, Update a group
4045218No community with that id, or it's deleted. Message: The community you are looking for is no longer available.Add members, Add moderators
4045235No active brand matches the credentials or the token. Message: Brand not exists.Generate an access token, any endpoint that takes a token
4045025The brand's owner account is inactive. Message: The user you are looking for is no longer available.Generate an access token
4095057The video_name or message_id was posted before. Message: You have already replied to this video.Post a video
4095156The opening video's video_name was posted before; data.video_id names the earlier post. Message: You have already published this videoCreate a group
4095167A group with the same share string exists. Message: XXXX-[You have already published this group]Create a group
4095216The handle is taken. Message: XXXX-[community handle already exists.]Create a community
4095217The profile image file name is used by another community. Message: XXXX-[community dp already exists.]Create a community
4125166The request breaks a rule: wrong action ids, a missing field, many users to many communities, a link-out URL outside your allowed domains, or an account without the required role. Message: XXXX-[Invalid Use of API]Generate an access token, Create a community, Create a group, Post a video, Add members, Add moderators
4125174The signed-URL request used a content type outside video, image, audio, and text. Message: Pre Condition failedUpload step of Post a video
4125227The community already has a welcome group. Message: XXXX-[welcome group already exists]Create a group
4125272The body isn't valid JSON; data.err_msg explains. Message: Pass payload is invalid. please read err_msg for more detailsGenerate an access token
4225023The server couldn't sign an upload URL. Message: Could not fetch credentials.Upload step of Post a video
4225059The post couldn't be saved. Message: Error in sending reply.Post a video
4225158The update couldn't be applied. Message: Could not update the group.Update a group

What to retry

HTTP statusRetryWhy
400 with code 1099, and 422Once, after a short waitThe request was valid and the server failed. A second attempt usually succeeds.
400 from validation, 401, 403, 404, 412NoThe request itself is the problem. Fix it before sending it again.
409NoThe record already exists. Treat it as success when the earlier call was yours.

Treat a 422 or a 1099 on a write as indeterminate: the change may have been saved. Retrying is still safe on these endpoints, because the duplicate checks turn a second save into a 409.

  • A repeated Post a video to a group with the same video_name or message_id returns 409 with code 5057. That tells you the first call succeeded.
  • A repeated Create a community with the same handle returns 409 with code 5216.
  • A repeated Update a group and its members is harmless. Fields already at the new value come back with false in their _updated flag, and members already in the group aren't added twice.

Pass your own message_id on Post a video, and keep the same handle on Create a community. A repeated call is then rejected as a duplicate instead of creating a second record. The third-party endpoints have no rate limit, so a retry only needs to wait for the server-side failure to clear; a second or two is enough.

When you contact the Genuin team about an error, include the HTTP status, the code, the message, the endpoint, and the request time in UTC. A 1099 can only be traced from the server side, and the timestamp is how it's found.

Limitations

  • Codes aren't unique across the platform: 5243 also names an unrelated server error elsewhere. On the third-party endpoints it always means the brand mismatch above.
  • Three endpoints report no validation detail: Create a group, Post a video, and Update a group return 400 with an empty body.
  • Messages are English only, and some carry the literal XXXX- prefix. Map codes to your own text rather than showing messages to members.

See also

TRUST AND COMPLIANCE

© 2026 Genuin Inc.

Genuin Footer