API overview

The Genuin API has two parts:

  • The third-party API, under /api/thirdparty. It creates communities and groups, adds members and moderators, and posts videos for your brand.
  • The Business Account API (v1), at https://api.begenuin.com/v1. It creates, configures and runs a Business Account. Account owners, partners and aggregators acting for many accounts, and AI agents all use it.

This page covers what every call has in common: base URLs, authentication, the status check, responses and errors, and rate limits. For each call, see the two collections:

  • GET APIs: every call that reads.
  • POST APIs: every call that creates or changes something, plus PUT, PATCH and DELETE.

Base URLs

APIProductionQA
Third-party APIhttps://api.begenuin.com/api/thirdpartyhttps://api.qa.begenuin.com/api/thirdparty
Business Account API (v1)https://api.begenuin.com/v1Sandbox keys on the production URL

Send JSON with the Content-Type: application/json header. Without that header, the server doesn't parse the body and returns 412 Precondition Failed.

Authentication

Third-party API: access token

Exchange your brand's api_key and api_secret for a gn-access-token, then send it as a bearer token on every other third-party call. The token acts as your brand's owner account, so anything you do with it is done as that account.

You need an api_key and an api_secret for your brand. The Genuin team issues one pair per brand and environment: a 48-character hexadecimal key and a 32-character hexadecimal secret. The pair works only while your brand is active.

Caution

Your api_secret is a server-side credential. Don't put it in browser JavaScript, mobile apps or any code you ship to users. Keep it in an environment variable or a secrets manager, and call the token endpoint from your backend only.

cURL
bash
curl -i -X POST https://api.begenuin.com/api/thirdparty/auth \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "<<YOUR_API_KEY>>",
    "api_secret": "<<YOUR_API_SECRET>>"
  }'

The endpoint takes no Authorization header. It returns 200 OK with the access token in the gn-access-token response header and a refresh token in the gn-refresh-token header. The -i flag prints the headers.

Response headers
http
HTTP/1.1 200 OK
Content-Type: application/json
gn-access-token: {{GN_ACCESS_TOKEN}}
gn-refresh-token: {{GN_REFRESH_TOKEN}}
Response body
json
{
  "code": 200,
  "message": "Token Generated Successfully.",
  "data": {
    "user_id": "b12f13af-ef5a-4906-b0a0-2995e106200d",
    "login_source": "{{LOGIN_SOURCE}}",
    "device_type": null
  }
}

data.user_id is the UUID of your brand's owner account.

Use the token. Send it in the Authorization header with the Bearer scheme. One token serves every third-party endpoint.

cURL
bash
curl -X POST https://api.begenuin.com/api/thirdparty/community/create \
  -H "Authorization: Bearer {{GN_ACCESS_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{ "handle": "{{COMMUNITY_HANDLE}}", "name": "{{COMMUNITY_NAME}}" }'

Token lifetime. An access token lasts 14 days in production and 3 hours in QA. A refresh token lasts 100 days in production and 24 hours in QA. Each call to the token endpoint creates a new session, and doesn't invalidate the tokens you already hold. When an access token expires, calls return 401 with code 1003. Call the token endpoint again, or exchange the refresh token for a new pair:

cURL
bash
curl -i -X POST https://api.begenuin.com/api/v4/auth/session/refresh \
  -H "Authorization: Bearer {{GN_REFRESH_TOKEN}}"

The response carries a new gn-access-token and gn-refresh-token in its headers. Don't send an x-brand-id header with this request: a mismatched brand ID makes it fail with 401.

Rotate credentials. To replace a token you think was exposed, call the token endpoint again and switch to the new value; the old token stays valid until it expires, so ask the Genuin team if you need it revoked. To replace the api_key and api_secret, contact the Genuin team. The old pair stops working as soon as the new one is issued.

Brand API key

Two calls and the SDKs use your brand API key instead of a token: Delete a member account and the community lookup in GET APIs. Copy the key from your Business Account under Build > Publish Brand Community > SDK Integration.

CredentialIssued byUsed for
api_key and api_secretThe Genuin team, one pair per brand and environmentExchanged for a gn-access-token on your server
gn-access-tokenPOST /api/thirdparty/authEvery other third-party call
Brand API keyYour Business AccountThe SDKs, Delete a member account, and the community lookup

Business Account API (v1): API keys and OAuth

WhoHowScope
The account owner or a teammateAn API key from Settings > Developers, a sandbox key at sign-up and a live key at launch, scoped to the account and the key holder's roleOne Business Account
A partner, aggregator or platform acting for many accountsOAuth 2.0 client credentials: POST /v1/oauth/token with client_id, client_secret, scope and the account_id to act on. Tokens expire in 1 hourEvery account that granted the client access
A partner provisioning a new customerPOST /v1/accounts creates the Business Account, its first brand and a sandbox key, and returns the owner's verification linkThe created account
An AI buyer agentAdCP endpoints with a buyer keyPackages only

Scopes: account:read, account:write, brand:read, brand:write, content:write, network:write, members:write, partners:write, monetize:write, reports:read, intelligence:act. A key or token never exceeds the role it was issued for. intelligence:act lets an integration raise proposals, but not approve them unless it also holds the matching write scope.

cURL
bash
curl -X POST https://api.begenuin.com/v1/oauth/token \
  -d client_id=$CLIENT_ID -d client_secret=$CLIENT_SECRET \
  -d account_id=acc_123 -d scope="brand:write network:write reports:read"

Send the token as Authorization: Bearer <token>. Rotate a key with POST /v1/keys/{keyId}:rotate; the old key keeps working for 24 hours.

Status check

Check that the API is up with GET /healthcheck. It takes no authentication.

cURL
bash
curl https://api.begenuin.com/healthcheck
Response
json
{ "message": "Server is running." }

A 200 with this body means the API server is answering. It doesn't check your credentials: to confirm those work, request a token from POST /api/thirdparty/auth. Use the health check for uptime monitoring, and before you retry after a 1099 or a 422.

Responses and errors

Third-party responses share one shape: code, message and data. A successful call sets code to the number 200. An error sets it to a string, such as "5218", and comes with an HTTP status in the 4xx range.

Error response
json
{
  "code": "5218",
  "message": "The community you are looking for is no longer available.",
  "data": {}
}
FieldTypeDescription
codestringGenuin's error code. 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 add details: data.err_msg lists rejected link-out URLs, and data.video_id names the video a duplicate upload matched.

Business Account API (v1) errors are JSON with code, message and docs_url.

Validation errors

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

EndpointHTTP statusWhat comes back
POST /auth412code 5166 when a field is missing or isn't a string; 5272 with data.err_msg when the body isn't valid JSON
POST /community/create400No code or message. data.message names the failing fields, such as handle or type
POST /group/create, POST /users/conversation/reply, PATCH /update_conversation400{"data": {}} and nothing else. The failing field isn't reported
POST /community/add_users, POST /community/add_moderators412code 5166

For the 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, a value outside its allowed set, or a missing required field.

Error codes

Codes are shared across the third-party endpoints.

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
4015033The token wasn't issued by the token endpoint, such as a device token from an app session. 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.POST /auth, any endpoint that takes a token
4045025The brand's owner account is inactive. Message: The user you are looking for is no longer available.POST /auth
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]POST /auth, create a community, create a group, post a video, add members, add moderators
4125174The signed-URL request used a content type other than video, image, audio or 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 detailsPOST /auth
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 you send 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, because the duplicate checks turn a second save into a 409. Pass your own message_id when you post a video, and keep the same handle when you create a community. A repeated call is then rejected as a duplicate instead of creating a second record. A repeated group update is harmless: fields already at the new value come back with false in their _updated flag.

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 on the server side, by its timestamp.

Rate limits

APILimit
Third-party APINone. A retry only needs to wait for a server-side failure to clear; a second or two is enough.
Business Account API (v1)600 requests per minute per key or token, and 60 per minute for report queries. Every response carries X-RateLimit-Remaining.

Business Account API conventions

  • Ids are prefixed: acc_, brd_, plc_, cmt_, vid_, fd_, mbr_, prt_, agr_, prp_.
  • List calls page with cursor and limit. Filters are query parameters.
  • A write that your Business Account would ask you to confirm returns 202 with a proposal object. POST /v1/proposals/{proposalId}:approve applies it and :decline discards it. See Supervised Intelligence Autonomy and Approvals.
  • Every change emits a webhook event, such as proposal.created, placement.published or partner.accepted. See Webhooks and events.

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.
  • Messages are English only, and some carry the literal XXXX- prefix. Map codes to your own text rather than showing messages to members.
  • No test credential pair. Use the QA base URL with the credentials issued for QA.

Next

TRUST AND COMPLIANCE

© 2026 Genuin Inc.

Genuin Footer