> ## Documentation Index
> Fetch the complete documentation index at: https://chainpatrol.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Unfollow Asset

> Stop the status emails for an asset. Name it by `content` or `assetId`. Never refused for capacity, and unfollowing an asset you do not follow is not an error.

## Overview

Stop the emails for an asset you follow. It undoes [Follow Asset](/docs/external-api/asset-follow),
and a follow made with the **Follow** button in the app can be undone here too.

Unfollowing is never refused because of the follow limit — it is how you get back
under it. Unfollowing an asset you do not follow is not an error.

Like following, it needs a user-scoped API key or a
signed-in session.

## Quick Start

### Authentication

Include your user-scoped API key in the `X-API-KEY` header:

```bash theme={null}
X-API-KEY: <api-key>
```

### Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST 'https://app.chainpatrol.io/api/v2/asset/unfollow' \
    -H 'X-API-KEY: <api-key>' \
    -H 'Content-Type: application/json' \
    -d '{ "assetId": 4175269 }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch("https://app.chainpatrol.io/api/v2/asset/unfollow", {
    method: "POST",
    headers: {
      "X-API-KEY": "<api-key>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ assetId: 4175269 }),
  });

  const { following, followCount } = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://app.chainpatrol.io/api/v2/asset/unfollow",
      headers={"X-API-KEY": "<api-key>"},
      json={"assetId": 4175269},
  )
  data = response.json()
  ```
</CodeGroup>

## Request Body

| Field | Type | Required | Description |
| - | - | - | - |
| `content` | `string` | One of | Asset content: a URL, domain, wallet address, social profile, etc. |
| `assetId` | `number` | One of | ChainPatrol asset ID. |
| `slug` | `string` | No | Organization slug. Required only when your credentials can reach more than one organization. |

## Response

The same shape as [Follow Asset](/docs/external-api/asset-follow#response), with
`following` set to `false`.

```json theme={null}
{
  "assetId": 4175269,
  "following": false,
  "followCount": 11,
  "limit": 100,
  "warnThreshold": 90,
  "canFollowMore": true,
  "warning": null
}
```

## Related

* [Follow Asset](/docs/external-api/asset-follow)
* [List Followed Assets](/docs/external-api/asset-follows-list)


## OpenAPI

````yaml POST /asset/unfollow
openapi: 3.0.3
info:
  title: ChainPatrol External API - OpenAPI 3.0
  description: ChainPatrol External API documentation
  version: 2.0.0
servers:
  - url: https://app.chainpatrol.io/api/v2
security: []
tags:
  - name: asset
  - name: report
  - name: dark-web
externalDocs:
  url: https://chainpatrol.com/docs
paths:
  /asset/unfollow:
    post:
      tags:
        - asset
      summary: Unfollow an asset
      description: >-
        Stop the status emails for an asset. Name it by `content` or `assetId`.
        Never refused for capacity, and unfollowing an asset you do not follow
        is not an error.
      operationId: assetUnfollow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  description: >-
                    Organization slug. Optional when your API key is scoped to
                    one organization. Required when your credentials can reach
                    more than one.
                content:
                  type: string
                  minLength: 1
                  description: >-
                    Asset content: a URL, domain, wallet address, social
                    profile, etc.
                assetId:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  description: ChainPatrol asset ID
              description: >-
                Unfollow an asset


                Stops the status emails for this asset. Never refused for
                capacity, and unfollowing an asset you do not follow is not an
                error.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  assetId:
                    type: integer
                    description: The asset that was followed or unfollowed
                  following:
                    type: boolean
                    description: Whether this person now follows the asset
                  followCount:
                    type: integer
                    description: How many assets this person follows in this organization
                  limit:
                    type: integer
                    description: The most assets one person may follow
                  warnThreshold:
                    type: integer
                    description: The count from which `warning` is set
                  canFollowMore:
                    type: boolean
                    description: >-
                      False once `followCount` reaches `limit`; following more
                      is refused
                  warning:
                    type: string
                    nullable: true
                    description: >-
                      Set from `warnThreshold` upward, asking the caller to
                      unfollow assets
                required:
                  - assetId
                  - following
                  - followCount
                  - limit
                  - warnThreshold
                  - canFollowMore
                  - warning
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - ApiKey: []
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your API key. This is required by most endpoints to access our API
        programatically. Reach out to us at
        [support@chainpatrol.io](mailto:support@chainpatrol.io?subject=Re:%20API%20Key%20for%20SDK&body=Company:%20%0AName:%20%0APurpose:%20)
        to get an API key for your use.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.