> ## 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.

# Follow Asset

> Email the person behind these credentials when the asset's status changes and when its takedown completes. Name the asset by `content` or `assetId`. Needs a user-scoped API key or a signed-in session — organization API keys are refused. Following twice is not an error; up to 100 assets per person per organization.

## Overview

Follow an asset to be emailed about it. Once you follow an asset, ChainPatrol emails
you when:

* its status changes to **blocked** or **allowed**, and
* its takedown completes.

This is the same as clicking **Follow** on a takedown in the ChainPatrol app. Follows
made here and in the app are the same follows, so either place can undo them.

A follow belongs to a **person**, because that person is who gets the email. It
needs a user-scoped API key or a signed-in session.
Organization API keys have no person to email and are refused with `403`.

<Note>
  To create a user-scoped key, open **API Keys** in your organization's settings in the
  ChainPatrol app and choose the **User** key type ("for personal access"). Emails go to
  the address of the person the key belongs to.
</Note>

## 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

Name the asset by its content (a URL, domain, address, social profile, …) or by its
ChainPatrol `assetId` — exactly one of the two.

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

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

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

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

  response = requests.post(
      "https://app.chainpatrol.io/api/v2/asset/follow",
      headers={"X-API-KEY": "<api-key>"},
      json={"content": "your-brand-login.example"},
  )
  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

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

| Field | Type | Description |
| - | - | - |
| `assetId` | `number` | The asset you followed. |
| `following` | `boolean` | `true` once the follow is in place. |
| `followCount` | `number` | How many assets you now follow in this organization. |
| `limit` | `number` | The most assets one person can follow per organization (100). |
| `warnThreshold` | `number` | The count from which `warning` is set (90). |
| `canFollowMore` | `boolean` | `false` once you reach `limit`. |
| `warning` | `string \| null` | Set from `warnThreshold` upward, asking you to unfollow assets you no longer need. |

<Note>
  Following an asset you already follow is not an error — it returns the current state
  and does not use up any of your limit.
</Note>

## Errors

| Status | When |
| - | - |
| `400` | Both or neither of `content` and `assetId` were sent, or you already follow 100 assets. |
| `403` | The key is an organization key, or you are not a member of the organization. |
| `404` | ChainPatrol has no such asset, or it belongs to another organization. |

## Related

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


## OpenAPI

````yaml POST /asset/follow
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/follow:
    post:
      tags:
        - asset
      summary: Follow an asset
      description: >-
        Email the person behind these credentials when the asset's status
        changes and when its takedown completes. Name the asset by `content` or
        `assetId`. Needs a user-scoped API key or a signed-in session —
        organization API keys are refused. Following twice is not an error; up
        to 100 assets per person per organization.
      operationId: assetFollow
      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: >-
                Follow an asset


                The person behind the credentials is emailed when the asset's
                status changes (blocked or allowed) and when its takedown
                completes. Requires a user-scoped API key or a signed-in session
                — organization API keys have no person to notify and are
                refused.


                Following an asset you already follow is not an error. One
                person can follow up to 100 assets per organization.
      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.