How to update identity?

Process of updating an identity

Arrange Identity

Arrange identity in the format

  • If want to remove addresses from secondary, do not add them in the list

  • If want to add new addresses in secondary, add them in secondary list

  • If want to keep some addresses in secondary, then keep them in the data

{
  "id": "string",
  "identifier": "string",
  "provider": "string",
  "default": {
    "address": "address",
    "chain": number,
    "isContract": boolean
  },
  "secondary": [
    {
      "address": "address",
      "chain": number,
      "isContract": boolean
    },
    {
      "address": "address",
      "chain": number,
      "isContract": boolean
    }
  ]
}

Generate Message

Using the above arranged identity, generate a message using the below endpoint and sign it using default address by following guide for respective chains

Generate Message

post
Authorizations
Body
idstringRequired
identifierstringRequired
providerstringRequired
currentSignaturestringOptional
previousSignaturestringOptional
Responses
200Success
application/json
post
POST /v1/identity/generate-message HTTP/1.1
Host: sandbox-api.fetcch.xyz
secret-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 280

{
  "id": "text",
  "identifier": "text",
  "provider": "text",
  "default": {
    "address": "text",
    "chain": 1,
    "isSmartContractWallet": true,
    "isMultisig": true
  },
  "secondary": [
    {
      "address": "text",
      "chain": 1,
      "isSmartContractWallet": true,
      "isMultisig": true
    }
  ],
  "currentSignature": "text",
  "previousSignature": "text"
}
{
  "data": {
    "message": "ds"
  },
  "status": 200,
  "timestamp": ""
}

After generating message, you need to sign message using appropriate functions for respective chains, check our guide for each blockchain here

There are 2 signatures needed while updating identity

  • currentSignature - Will be signed by current (new) default address

  • previousSignature - Will be signed by previous (old) default address, only if default is updated

  • If default isn't updated, you need to use same signature for both currentSignature and previousSignature

Update Identity

After signing the message, add the generated signature in the arranged identity, at currentSignature and previousSignature respectively

Now, data should look something like this

{
  "id": "string",
  "identifier": "string",
  "provider": "string",
  "default": {
    "address": "address",
    "chain": number,
    "isMultisig": boolean,
    "isSmartContractWallet": boolean
  },
  "secondary": [
    {
      "address": "address",
      "chain": number,
      "isMultisig": boolean,
      "isSmartContractWallet": boolean
    },
    {
      "address": "address",
      "chain": number,
      "isMultisig": boolean,
      "isSmartContractWallet": boolean
    }
  ],
  "currentSignature": "string",
  "previousSignature": "string"
}

Call Update Identity API

Important Note

  • If default chain is APTOS, then while calling this API, swap default address with public key of the same address, so that we can easily verify signatures

  • If default is changing in this request, then send previous default address's public key in extraData: { publicKey: "" }

  • For example

    • satyam@martian has APTOS has default chain

    • In this request, we are updating it to EVM

    • Signed message using EVM address will be in currentSignature

    • Signed message using APTOS address will be in previousSignature

    • To verify previousSignature, we need to have publicKey of the APTOS address, which we will send in extraData

So now, data will look something like this

{
  "id": "string",
  "identifier": "string",
  "provider": "string",
  "default": {
    "address": "address",
    "chain": number,
    "isMultisig": boolean,
    "isSmartContractWallet": boolean
  },
  "secondary": [
    {
      "address": "address",
      "chain": number,
      "isMultisig": boolean,
      "isSmartContractWallet": boolean
    },
    {
      "address": "address",
      "chain": number,
      "isMultisig": boolean,
      "isSmartContractWallet": boolean
    }
  ],
  "currentSignature": "string",
  "previousSignature": "string",
  "extraData": {
    "publicKey": "string"
  }
}

Update Identity

patch
Authorizations
Body
idstringRequired
currentSignaturestringRequired
previousSignaturestringOptional
Responses
200Success
application/json
patch
PATCH /v1/identity HTTP/1.1
Host: sandbox-api.fetcch.xyz
secret-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 242

{
  "id": "text",
  "default": {
    "address": "text",
    "chain": 1,
    "isSmartContractWallet": true,
    "isMultisig": true
  },
  "secondary": [
    {
      "address": "text",
      "chain": 1,
      "isSmartContractWallet": true,
      "isMultisig": true
    }
  ],
  "currentSignature": "text",
  "previousSignature": "text"
}
{
  "id": "text",
  "identifier": "text",
  "providerId": "text",
  "provider": {
    "id": "text",
    "logo": "text",
    "apiKey": "text",
    "delimiter": "text",
    "txHash": "text",
    "registry": [
      {
        "address": "text",
        "chainType": "EVM",
        "txHash": "text",
        "providerId": "text",
        "provider": {
          "id": "text",
          "logo": "text",
          "apiKey": "text",
          "delimiter": "text",
          "txHash": "text",
          "registry": [
            "[Circular Reference]"
          ],
          "dataSourceId": 1,
          "ownerId": "text",
          "updatedAt": "2025-06-25T11:20:59.892Z",
          "createdAt": "2025-06-25T11:20:59.892Z"
        }
      }
    ],
    "dataSourceId": 1,
    "ownerId": "text",
    "updatedAt": "2025-06-25T11:20:59.892Z",
    "createdAt": "2025-06-25T11:20:59.892Z"
  },
  "defaultAddress": "text",
  "default": {
    "address": "text",
    "chain": {
      "id": 1,
      "name": "text",
      "symbol": "text",
      "icon": "text",
      "rpc": [
        "text"
      ],
      "type": "EVM",
      "shortName": "text",
      "infoURL": "text",
      "chainId": 1,
      "updatedAt": "2025-06-25T11:20:59.892Z",
      "createdAt": "2025-06-25T11:20:59.892Z"
    },
    "chainId": 1,
    "isMultisig": false,
    "isSmartContractWallet": false,
    "walletId": {
      "id": 1,
      "name": "text",
      "symbol": "text",
      "icon": "text",
      "rpc": [
        "text"
      ],
      "type": "EVM",
      "shortName": "text",
      "infoURL": "text",
      "chainId": 1,
      "updatedAt": "2025-06-25T11:20:59.892Z",
      "createdAt": "2025-06-25T11:20:59.892Z"
    },
    "updatedAt": "2025-06-25T11:20:59.892Z",
    "createdAt": "2025-06-25T11:20:59.892Z"
  },
  "secondary": [
    {
      "id": "text",
      "address": "text",
      "isMultisig": false,
      "isSmartContractWallet": false,
      "chainId": 1,
      "chain": {
        "id": 1,
        "name": "text",
        "symbol": "text",
        "icon": "text",
        "rpc": [
          "text"
        ],
        "type": "EVM",
        "shortName": "text",
        "infoURL": "text",
        "chainId": 1,
        "updatedAt": "2025-06-25T11:20:59.892Z",
        "createdAt": "2025-06-25T11:20:59.892Z"
      },
      "walletId": "text",
      "identity": {
        "id": "text",
        "identifier": "text",
        "providerId": "text",
        "provider": {
          "id": "text",
          "logo": "text",
          "apiKey": "text",
          "delimiter": "text",
          "txHash": "text",
          "registry": [
            {
              "address": "text",
              "chainType": "EVM",
              "txHash": "text",
              "providerId": "text",
              "provider": {
                "id": "text",
                "logo": "text",
                "apiKey": "text",
                "delimiter": "text",
                "txHash": "text",
                "registry": [
                  "[Circular Reference]"
                ],
                "dataSourceId": 1,
                "ownerId": "text",
                "updatedAt": "2025-06-25T11:20:59.892Z",
                "createdAt": "2025-06-25T11:20:59.892Z"
              }
            }
          ],
          "dataSourceId": 1,
          "ownerId": "text",
          "updatedAt": "2025-06-25T11:20:59.892Z",
          "createdAt": "2025-06-25T11:20:59.892Z"
        },
        "defaultAddress": "text",
        "default": {
          "address": "text",
          "chain": {
            "id": 1,
            "name": "text",
            "symbol": "text",
            "icon": "text",
            "rpc": [
              "text"
            ],
            "type": "EVM",
            "shortName": "text",
            "infoURL": "text",
            "chainId": 1,
            "updatedAt": "2025-06-25T11:20:59.892Z",
            "createdAt": "2025-06-25T11:20:59.892Z"
          },
          "chainId": 1,
          "isMultisig": false,
          "isSmartContractWallet": false,
          "walletId": {
            "id": 1,
            "name": "text",
            "symbol": "text",
            "icon": "text",
            "rpc": [
              "text"
            ],
            "type": "EVM",
            "shortName": "text",
            "infoURL": "text",
            "chainId": 1,
            "updatedAt": "2025-06-25T11:20:59.892Z",
            "createdAt": "2025-06-25T11:20:59.892Z"
          },
          "updatedAt": "2025-06-25T11:20:59.892Z",
          "createdAt": "2025-06-25T11:20:59.892Z"
        },
        "secondary": [
          {
            "id": "text",
            "address": "text",
            "isMultisig": false,
            "isSmartContractWallet": false,
            "chainId": 1,
            "chain": {
              "id": 1,
              "name": "text",
              "symbol": "text",
              "icon": "text",
              "rpc": [
                "text"
              ],
              "type": "EVM",
              "shortName": "text",
              "infoURL": "text",
              "chainId": 1,
              "updatedAt": "2025-06-25T11:20:59.892Z",
              "createdAt": "2025-06-25T11:20:59.892Z"
            },
            "walletId": "text",
            "identity": "[Circular Reference]",
            "updatedAt": "2025-06-25T11:20:59.892Z",
            "createdAt": "2025-06-25T11:20:59.892Z"
          }
        ],
        "nonce": 0,
        "currentSignature": "text",
        "previousSignature": "text",
        "isContract": false,
        "syncedAt": "2025-06-25T11:20:59.892Z",
        "createdAt": "2025-06-25T11:20:59.892Z"
      },
      "updatedAt": "2025-06-25T11:20:59.892Z",
      "createdAt": "2025-06-25T11:20:59.892Z"
    }
  ],
  "nonce": 0,
  "currentSignature": "text",
  "previousSignature": "text",
  "isContract": false,
  "syncedAt": "2025-06-25T11:20:59.892Z",
  "createdAt": "2025-06-25T11:20:59.892Z"
}

Identity should now be created, if faced with any error, check our troubleshooting guide or ask in our discord

Resolve Identity

Get Identity

get
Authorizations
Query parameters
idstringOptionalExample: satyams@fetcch
addressstringOptionalExample: 0x8E9e20b90efa7d0A072bfc8b0C74D96104F1F6FE
signedMessagestringOptionalExample: 0x8E9e20b90efa7d0A072bfc8b0C74D96104F1F6FE34423232
Responses
200Success
application/json
get
GET /v1/identity HTTP/1.1
Host: sandbox-api.fetcch.xyz
secret-key: YOUR_API_KEY
Accept: */*
{
  "data": {
    "id": "text",
    "identifier": "text",
    "providerId": "text",
    "provider": {
      "id": "text",
      "logo": "text",
      "apiKey": "text",
      "delimiter": "text",
      "txHash": "text",
      "registry": [
        {
          "address": "text",
          "chainType": "EVM",
          "txHash": "text",
          "providerId": "text",
          "provider": {
            "id": "text",
            "logo": "text",
            "apiKey": "text",
            "delimiter": "text",
            "txHash": "text",
            "registry": "[Circular Reference]",
            "dataSourceId": 1,
            "ownerId": "text",
            "updatedAt": "2025-06-25T11:20:59.892Z",
            "createdAt": "2025-06-25T11:20:59.892Z"
          }
        }
      ],
      "dataSourceId": 1,
      "ownerId": "text",
      "updatedAt": "2025-06-25T11:20:59.892Z",
      "createdAt": "2025-06-25T11:20:59.892Z"
    },
    "defaultAddress": "text",
    "default": {
      "address": "text",
      "chain": {
        "id": 1,
        "name": "text",
        "symbol": "text",
        "icon": "text",
        "rpc": [
          "text"
        ],
        "type": "EVM",
        "shortName": "text",
        "infoURL": "text",
        "chainId": 1,
        "updatedAt": "2025-06-25T11:20:59.892Z",
        "createdAt": "2025-06-25T11:20:59.892Z"
      },
      "chainId": 1,
      "isMultisig": false,
      "isSmartContractWallet": false,
      "walletId": {
        "id": 1,
        "name": "text",
        "symbol": "text",
        "icon": "text",
        "rpc": [
          "text"
        ],
        "type": "EVM",
        "shortName": "text",
        "infoURL": "text",
        "chainId": 1,
        "updatedAt": "2025-06-25T11:20:59.892Z",
        "createdAt": "2025-06-25T11:20:59.892Z"
      },
      "updatedAt": "2025-06-25T11:20:59.892Z",
      "createdAt": "2025-06-25T11:20:59.892Z"
    },
    "secondary": [
      {
        "id": "text",
        "address": "text",
        "isMultisig": false,
        "isSmartContractWallet": false,
        "chainId": 1,
        "chain": {
          "id": 1,
          "name": "text",
          "symbol": "text",
          "icon": "text",
          "rpc": [
            "text"
          ],
          "type": "EVM",
          "shortName": "text",
          "infoURL": "text",
          "chainId": 1,
          "updatedAt": "2025-06-25T11:20:59.892Z",
          "createdAt": "2025-06-25T11:20:59.892Z"
        },
        "walletId": "text",
        "identity": {
          "id": "text",
          "identifier": "text",
          "providerId": "text",
          "provider": {
            "id": "text",
            "logo": "text",
            "apiKey": "text",
            "delimiter": "text",
            "txHash": "text",
            "registry": [
              {
                "address": "text",
                "chainType": "EVM",
                "txHash": "text",
                "providerId": "text",
                "provider": {
                  "id": "text",
                  "logo": "text",
                  "apiKey": "text",
                  "delimiter": "text",
                  "txHash": "text",
                  "registry": "[Circular Reference]",
                  "dataSourceId": 1,
                  "ownerId": "text",
                  "updatedAt": "2025-06-25T11:20:59.892Z",
                  "createdAt": "2025-06-25T11:20:59.892Z"
                }
              }
            ],
            "dataSourceId": 1,
            "ownerId": "text",
            "updatedAt": "2025-06-25T11:20:59.892Z",
            "createdAt": "2025-06-25T11:20:59.892Z"
          },
          "defaultAddress": "text",
          "default": {
            "address": "text",
            "chain": {
              "id": 1,
              "name": "text",
              "symbol": "text",
              "icon": "text",
              "rpc": [
                "text"
              ],
              "type": "EVM",
              "shortName": "text",
              "infoURL": "text",
              "chainId": 1,
              "updatedAt": "2025-06-25T11:20:59.892Z",
              "createdAt": "2025-06-25T11:20:59.892Z"
            },
            "chainId": 1,
            "isMultisig": false,
            "isSmartContractWallet": false,
            "walletId": {
              "id": 1,
              "name": "text",
              "symbol": "text",
              "icon": "text",
              "rpc": [
                "text"
              ],
              "type": "EVM",
              "shortName": "text",
              "infoURL": "text",
              "chainId": 1,
              "updatedAt": "2025-06-25T11:20:59.892Z",
              "createdAt": "2025-06-25T11:20:59.892Z"
            },
            "updatedAt": "2025-06-25T11:20:59.892Z",
            "createdAt": "2025-06-25T11:20:59.892Z"
          },
          "secondary": [
            "[Circular Reference]"
          ],
          "nonce": 0,
          "currentSignature": "text",
          "previousSignature": "text",
          "isContract": false,
          "syncedAt": "2025-06-25T11:20:59.892Z",
          "createdAt": "2025-06-25T11:20:59.892Z"
        },
        "updatedAt": "2025-06-25T11:20:59.892Z",
        "createdAt": "2025-06-25T11:20:59.892Z"
      }
    ],
    "nonce": 0,
    "currentSignature": "text",
    "previousSignature": "text",
    "isContract": false,
    "syncedAt": "2025-06-25T11:20:59.892Z",
    "createdAt": "2025-06-25T11:20:59.892Z"
  },
  "status": 1,
  "timestamp": "2025-06-25T11:20:59.892Z"
}

Last updated