PUT
/
api
/
v2
/
public
/
linked-account
curl --request PUT \
  --url https://api.gocobalt.io/api/v2/public/linked-account \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "linked_account_id": "<string>",
  "name": "<string>",
  "your_app": {},
  "udf": {}
}'
{
    "_id": "63cabcc596d0d10508a69bdf",
    "associated_org": "63c93da0b46b7243785a1e17",
    "account_id": "12345678",
    "environment": "test",
    "name": "Mark Wood",
    "udf": [
        {
            "key_name": "some_key1",
            "key_value": "Updated Value",
            "_id": "64d5d69bfb78da0950f5e18f",
            "updatedAt": "2023-08-11T06:35:07.574Z",
            "createdAt": "2023-08-11T06:35:07.574Z"
        },
        {
            "key_name": "some_key2",
            "key_value": "some data 2",
            "_id": "64d5d69bfb78da0950f5e190",
            "updatedAt": "2023-08-11T06:35:07.574Z",
            "createdAt": "2023-08-11T06:35:07.574Z"
        },
        {
            "key_name": "some_key3",
            "key_value": "some data 3",
            "_id": "64d5d69bfb78da0950f5e191",
            "updatedAt": "2023-08-11T06:35:07.574Z",
            "createdAt": "2023-08-11T06:35:07.574Z"
        }
    ],
    "createdAt": "2023-01-20T16:09:41.700Z",
    "updatedAt": "2023-08-11T06:35:07.574Z",
    "__v": 326
}

This API updates a linked account’s details OR creates a linked account if no account present for the account id provided .

Request description

Body Parameters

linked_account_id
string
required

Unique customer identification id. For Eg: markwood@some_email.com

name
string

User name. for Eg: Mark Wood

your_app
object

An object containing the details of your application associated with you account

udf
object

An object containing user-defined fields (if any) associated with the linked account.

Response description

_id
string

index id of the record created

associated_org
string

Organization Id

account_id
string

Linked account id

environment
string

Environment in which the account was created

name
string

Name of the linked account

udf
array

Initial values passed while creating the linked account. User can pass any values of primitive datatypes.

createdAt
date

Creation time

updatedAt
date

`Last update time

__v
integer