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

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

## Descripción general

Sigue un **Asset** (activo digital: URL, dirección, perfil, app, etc.) para recibir correos
sobre él. Una vez que sigues un asset, ChainPatrol te envía un correo cuando:

* su estado cambia a `BLOCKED` (bloqueado) o `ALLOWED` (permitido), y
* se completa su **Takedown** (solicitud de baja de contenido fraudulento).

Es lo mismo que hacer clic en **Follow** (seguir) en un takedown dentro de la app de
ChainPatrol. Los seguimientos hechos aquí y en la app son los mismos, así que puedes
deshacerlos desde cualquiera de los dos lugares.

Un seguimiento pertenece a una **persona**, porque esa persona es quien recibe el correo.
Requiere una clave de API de usuario (user-scoped) o una sesión iniciada.
Las claves de API de organización no tienen una persona a quien enviarle el correo y se
rechazan con `403`.

> [!NOTE]
>
> Para crear una clave de usuario, abre **API Keys** (claves de API) en la configuración de tu
> organización dentro de la app de ChainPatrol y elige el tipo de clave **User** ("for personal
> access", es decir, para acceso personal). Los correos se envían a la dirección de la persona
> a la que pertenece la clave.

## Inicio rápido

### Autenticación

Incluye tu clave de API de usuario en el encabezado `X-API-KEY`:

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

### Solicitud de ejemplo

Indica el asset por su contenido (una URL, un dominio, una dirección, un perfil de red
social, …) o por su `assetId` de ChainPatrol: exactamente uno de los dos.

```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()
```

## Cuerpo de la solicitud

| Campo | Tipo | Obligatorio | Descripción |
| - | - | - | - |
| `content` | `string` | Uno de los dos | Contenido del asset: una URL, un dominio, una dirección de wallet, un perfil de red social, etc. |
| `assetId` | `number` | Uno de los dos | ID del asset en ChainPatrol. |
| `slug` | `string` | No | Slug de la organización. Obligatorio solo cuando tus credenciales tienen acceso a más de una organización. |

## Respuesta

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

| Campo | Tipo | Descripción |
| - | - | - |
| `assetId` | `number` | El asset que seguiste. |
| `following` | `boolean` | `true` una vez que el seguimiento queda registrado. |
| `followCount` | `number` | Cuántos assets sigues ahora en esta organización. |
| `limit` | `number` | La cantidad máxima de assets que una persona puede seguir por organización (100). |
| `warnThreshold` | `number` | La cantidad a partir de la cual se define `warning` (90). |
| `canFollowMore` | `boolean` | `false` una vez que alcanzas `limit`. |
| `warning` | `string \| null` | Se define a partir de `warnThreshold`, y te pide dejar de seguir los assets que ya no necesitas. |

> [!NOTE]
>
> Seguir un asset que ya sigues no es un error: devuelve el estado actual y no consume nada
> de tu límite.

## Errores

| Estado | Cuándo |
| - | - |
| `400` | Se enviaron `content` y `assetId` a la vez o ninguno de los dos, o ya sigues 100 assets. |
| `403` | La clave es una clave de organización, o no eres miembro de la organización. |
| `404` | ChainPatrol no tiene ese asset, o pertenece a otra organización. |

## Relacionado

* [Dejar de seguir asset](https://chainpatrol.com/docs/es/external-api/asset-unfollow.md)
* [Listar assets seguidos](https://chainpatrol.com/docs/es/external-api/asset-follows-list.md)


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