/api/public/v1/bindingsbindings.create
Bind an app account to a profile; one binding per (app_id, external_account_id), a second is CONFLICT with the existing binding_id. metadata (at most 4 KiB) cannot hold credentials.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
command_idbody | string (uuid) | Yes | Client-generated UUID for this command. Send the same id (and body) again to get the stored receipt instead of a second change; a different body under the same id is CONFLICT. |
app_idbody | string | Yes | Your app's id, e.g. fb-poster |
external_account_idbody | string | Yes | The account's id inside your app (no secrets) (min length 1, max length 200) |
profile_idbody | string (uuid) | Yes | |
labelbody | string | No | (max length 120) |
metadatabody | object | No | At most 4 KiB of your own non-secret data; keys that look like credentials (password, token, cookie, secret, otp, auth, api key) are refused |
Examples
curl -X POST "https://browlix.com/api/public/v1/bindings" \
-H "Authorization: Bearer $BROWLIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command_id":"<uuid>","app_id":"<app_id>","external_account_id":"<external_account_id>","profile_id":"<profile_id>"}'Response
201 with { data, replayed: false, correlation_id } the first time; 200 with replayed: true when the same command_id and body come again.
| Field | Type | Always present | Description |
|---|---|---|---|
| data | object | Yes | |
| data.id | string (uuid) | Yes | |
| data.app_id | string | Yes | |
| data.external_account_id | string | Yes | |
| data.label | string | null | Yes | |
| data.profile_id | string (uuid) | Yes | |
| data.profile | object | null | Yes | |
| data.profile.id | string (uuid) | Yes | |
| data.profile.os | "windows" | "linux" | Yes | |
| data.profile.name | string | Yes | |
| data.profile.state | string | Yes | |
| data.profile.number | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.metadata | object | Yes | |
| data.revision | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.created_at | string (date-time) | Yes | |
| data.updated_at | string (date-time) | Yes | |
| correlation_id | string (uuid) | Yes | |
| replayed | boolean | No | true when this command_id was already applied and the stored receipt came back |
Errors
| Code | HTTP | Retryable |
|---|---|---|
| UNAUTHENTICATED | 401 | No |
| FORBIDDEN | 403 | No |
| RATE_LIMITED | 429 | Yes |
| VALIDATION_FAILED | 422 | No |
| CONFLICT | 409 | No |
| OUTCOME_UNKNOWN | 202 | Yes |
| DEPENDENCY_UNAVAILABLE | 503 | Yes |
| UNKNOWN | 500 | No |
